From e28c2f8064a3110e2e94eec4a7693dd12e0c6369 Mon Sep 17 00:00:00 2001 From: ModPhoenix Date: Mon, 25 Jan 2021 22:01:25 +0200 Subject: [PATCH 1/2] Enable historyApiFallback for webpack devServer config --- webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.config.js b/webpack.config.js index a2eeb72..f397a35 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ const distPath = path.resolve(__dirname, "dist"); module.exports = (env, argv) => { return { devServer: { + historyApiFallback: true, contentBase: distPath, compress: argv.mode === 'production', port: 8000 From 99628b71f03eb2da90b9e75e1a18a344063f3246 Mon Sep 17 00:00:00 2001 From: ModPhoenix Date: Tue, 26 Jan 2021 23:14:09 +0200 Subject: [PATCH 2/2] Add support for nested routes --- webpack.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index f397a35..a7b1511 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,16 +6,17 @@ const distPath = path.resolve(__dirname, "dist"); module.exports = (env, argv) => { return { devServer: { - historyApiFallback: true, contentBase: distPath, compress: argv.mode === 'production', - port: 8000 + port: 8000, + historyApiFallback: true }, entry: './bootstrap.js', output: { path: distPath, filename: "todomvc.js", - webassemblyModuleFilename: "todomvc.wasm" + webassemblyModuleFilename: "todomvc.wasm", + publicPath: "/" }, module: { rules: [