23 lines
603 B
JavaScript
23 lines
603 B
JavaScript
var path = require('./'); //引文文件路径
|
||
const htmlWebpackPlugin = require('html-webpack-plugin');
|
||
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||
|
||
module.exports = {
|
||
entry: ['./src/main'], //入口文件
|
||
output: {
|
||
path: path.join(__dirname, 'dist'), //打包出口文件路径
|
||
filename: 'index.js', //打包文件名
|
||
},
|
||
plugins: [
|
||
new htmlWebpackPlugin({
|
||
template: './test-element-ui.html',
|
||
}),
|
||
new VueLoaderPlugin(),
|
||
],
|
||
devServer: {
|
||
//配置nodejs本地服务器,
|
||
contentBase: './dist',
|
||
hot: true, //本地服务器热更新
|
||
},
|
||
};
|