修改bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { VueLoaderPlugin } = require('vue-loader');
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
const isDevelopment = argv.mode === 'development';
|
||||
@@ -8,7 +9,8 @@ module.exports = (env, argv) => {
|
||||
entry: './src/main.js',
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist')
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -31,13 +33,20 @@ module.exports = (env, argv) => {
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin()
|
||||
new VueLoaderPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './index.html',
|
||||
filename: 'index.html'
|
||||
})
|
||||
],
|
||||
devServer: {
|
||||
static: './dist',
|
||||
static: {
|
||||
directory: path.join(__dirname, 'dist'),
|
||||
},
|
||||
hot: true,
|
||||
open: true,
|
||||
historyApiFallback: true
|
||||
historyApiFallback: true,
|
||||
port: 8080
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user