Render custom 404 page for sapper
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
[[redirects]]
|
||||||
|
from = "/*"
|
||||||
|
to = "/404.html"
|
||||||
|
status = 404
|
||||||
+2
-1
@@ -5,7 +5,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "sapper dev",
|
"dev": "sapper dev",
|
||||||
"build": "sapper build --legacy",
|
"build": "sapper build --legacy",
|
||||||
"export": "sapper export --legacy --entry \"/ login signup courses dashboard discussions people timetable profile discussions\"",
|
"export": "sapper export --legacy --entry \"/ /404 login signup courses dashboard discussions people timetable profile discussions\"",
|
||||||
|
"postexport": "mv __sapper__/export/404/index.html __sapper__/export/404.html",
|
||||||
"start": "node __sapper__/build"
|
"start": "node __sapper__/build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
import { stores, goto } from '@sapper/app';
|
||||||
|
const { page } = stores();
|
||||||
|
|
||||||
|
$: console.log('route', $page);
|
||||||
|
</script>
|
||||||
@@ -1 +0,0 @@
|
|||||||
/* /index.html 200
|
|
||||||
Reference in New Issue
Block a user