webpack dev server configured with react-router

This commit is contained in:
NikolaBorislavovHristov 2018-06-07 13:39:56 +03:00
parent 11a7ed572b
commit f09cb42160

View file

@ -6,7 +6,8 @@ module.exports = {
entry: './src/index.js', entry: './src/index.js',
output: { output: {
path: path.join(__dirname, 'dist'), path: path.join(__dirname, 'dist'),
filename: 'bundle.js' filename: 'bundle.js',
publicPath: '/'
}, },
module: { module: {
rules: [ rules: [
@ -52,6 +53,9 @@ module.exports = {
'stremio-common': path.resolve(__dirname, 'src/common') 'stremio-common': path.resolve(__dirname, 'src/common')
} }
}, },
devServer: {
historyApiFallback: true
},
plugins: [ plugins: [
new HtmlWebPackPlugin({ new HtmlWebPackPlugin({
template: './src/index.html' template: './src/index.html'