fixed webpack devserver to serve router subpath

This commit is contained in:
2019-09-25 15:54:28 +02:00
parent eaa00aa244
commit 1957aa3dc5
4 changed files with 98 additions and 77 deletions
+14 -6
View File
@@ -10,13 +10,21 @@ const PORT = 8988
module.exports = merge(baseConfig, {
mode: 'development',
output: {
publicPath: '/'
},
devServer: {
clientLogLevel: 'warning',
clientLogLevel: 'debug',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: '/index.html' },
],
// rewrites: [
// { from: /.*/, to: '/index.html' },
// ],
index: '/',
disableDotRule: true,
verbose: true
},
// historyApiFallback: true,
hot: true,
contentBase: 'dist',
compress: true,
@@ -24,10 +32,10 @@ module.exports = merge(baseConfig, {
host: '0.0.0.0',
port: PORT,
disableHostCheck: true,
// open: "firefox-developer-edition",
overlay: { warnings: false, errors: true },
publicPath: '/',
quiet: true,
quiet: false,
// open: "firefox-developer-edition",
},
module: {