feat: add 404 page (#426)

* feat: add 404 page

* chore: lint and format

* fix: remove extra line
This commit is contained in:
doprz
2024-11-12 21:57:59 -06:00
committed by GitHub
parent db04bbb52e
commit 46c76b1703
4 changed files with 527 additions and 0 deletions

View File

@@ -157,6 +157,7 @@ export default defineConfig({
renameFile('src/pages/options/index.html', 'options.html'),
renameFile('src/pages/calendar/index.html', 'calendar.html'),
renameFile('src/pages/report/index.html', 'report.html'),
renameFile('src/pages/404/index.html', '404.html'),
vitePluginRunCommandOnDemand({
// afterServerStart: 'pnpm gulp forceDisableUseDynamicUrl',
closeBundle: 'pnpm gulp forceDisableUseDynamicUrl',
@@ -196,6 +197,10 @@ export default defineConfig({
target: 'http://localhost:5173',
rewrite: path => path.replace('report', 'src/pages/report/index'),
},
'/404.html': {
target: 'http://localhost:5173',
rewrite: path => path.replace('404', 'src/pages/404/index'),
},
},
},
build: {
@@ -209,6 +214,7 @@ export default defineConfig({
calendar: 'src/pages/calendar/index.html',
options: 'src/pages/options/index.html',
report: 'src/pages/report/index.html',
404: 'src/pages/404/index.html',
},
output: {
chunkFileNames: `assets/[name]-[hash].js`,