Skip to content

Commit e22942e

Browse files
committed
fix(ssg): generate custom 404.html for GitHub Pages fallback
Resolves #4368. Added '/404.html' to the SSG paths in webpack.ssg.mjs to ensure a fully rendered 404 page is generated during the build process, preventing the default GitHub Pages 404 screen.
1 parent f61447c commit e22942e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

webpack.ssg.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import common from "./webpack.common.mjs";
1515
const contentTree = JSON.parse(fs.readFileSync("./src/_content.json", "utf8"));
1616

1717
// content tree to path array
18-
const paths = [...flattenContentTree(contentTree), "/app-shell"];
18+
const paths = [...flattenContentTree(contentTree), "/app-shell", "/404.html"];
1919

2020
export default (env) =>
2121
merge(common(env), {

0 commit comments

Comments
 (0)