Skip to content

Commit

Permalink
Merge pull request #10 from dontpanic/master
Browse files Browse the repository at this point in the history
Fix for Github Pages 404 issue
  • Loading branch information
CollinHerber authored Oct 12, 2024
2 parents 76b7723 + f385fd6 commit 40cd3a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@

npm run build

It builds all files to dist folder. To deploy to production server, copy all the `dist/*` files to production root folder.
It builds all files to docs folder. To deploy to production server, copy all the `docs/*` files to production root folder.

For example

```
dist/index.html
dist/foo.12345.js
docs/index.html
docs/404.html
docs/foo.12345.js
```

Copy to production root folder

```
root_folder/index.html
root_folder/404.html
root_folder/foo.12345.js
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"vite-plugin-static-copy": "^1.0.6"
},
"scripts": {
"build": "rimraf dist/assets && vite build",
"build": "rimraf docs/assets && vite build && cp docs/index.html docs/404.html",
"dependencies:check": "pnpm dlx npm-check-updates",
"dependencies:update": "pnpm dlx npm-check-updates -u",
"dependencies:update:patch": "pnpm dlx npm-check-updates -u --target patch",
Expand Down

0 comments on commit 40cd3a6

Please sign in to comment.