Skip to content

Commit a1a4ae4

Browse files
committed
Enable historyFallback for client routing
1 parent 7ab8f8a commit a1a4ae4

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

webpack.config.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,10 @@ module.exports = {
1919
plugins: [
2020
new CleanWebpackPlugin(['dist']),
2121
new ErrorOverlayPlugin(),
22-
new WorkboxPlugin.GenerateSW({
23-
clientsClaim: true,
24-
skipWaiting: true
25-
}),
26-
new HtmlWebPackPlugin({
27-
template: './public/index.html'
28-
})
22+
new WorkboxPlugin.GenerateSW({ clientsClaim: true, skipWaiting: true }),
23+
new HtmlWebPackPlugin({ template: './public/index.html' })
2924
],
3025
devtool: 'cheap-module-source-map',
31-
output: {
32-
filename: '[name].[hash].js',
33-
path: path.resolve(__dirname, 'dist')
34-
}
26+
devServer: { historyApiFallback: true },
27+
output: { filename: '[name].[hash].js', path: path.resolve(__dirname, 'dist') }
3528
}

0 commit comments

Comments
 (0)