added SPA 404 to build
This commit is contained in:
parent
a31cd6746b
commit
563a80c6ba
|
|
@ -5,7 +5,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"prebuild": "node scripts/prebuild.mjs",
|
"prebuild": "node scripts/prebuild.mjs",
|
||||||
"build": "node scripts/prebuild.mjs && vite build",
|
"build": "node scripts/prebuild.mjs && vite build && cp 404.html dist/404.html",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@ export function App() {
|
||||||
return (
|
return (
|
||||||
<MantineProvider withGlobalStyles withNormalizeCSS theme={theme}>
|
<MantineProvider withGlobalStyles withNormalizeCSS theme={theme}>
|
||||||
<Box mb="xl">
|
<Box mb="xl">
|
||||||
<SubfolderRouter>
|
<Router>
|
||||||
<Home path="/" />
|
<Home path="/" />
|
||||||
<Posts path="/posts" />
|
<Posts path="/posts" />
|
||||||
<Post path="/posts/:title" />
|
<Post path="/posts/:title" />
|
||||||
<Stream path="/stream" />
|
<Stream path="/stream" />
|
||||||
<NotFound default />
|
<NotFound default />
|
||||||
</SubfolderRouter>
|
</Router>
|
||||||
</Box>
|
</Box>
|
||||||
</MantineProvider>
|
</MantineProvider>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue