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
+4 -1
View File
@@ -2,6 +2,7 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const { VueLoaderPlugin } = require('vue-loader')
const utils = require('./utils')
@@ -67,8 +68,10 @@ module.exports = {
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
inject: true,
alwaysWriteToDisk: true
}),
new HtmlWebpackHarddiskPlugin(),
new VueLoaderPlugin(),
new CopyWebpackPlugin([{
from: utils.resolve('static/img'),