feat: add 404 page (#426)
* feat: add 404 page * chore: lint and format * fix: remove extra line
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user