symes-web/webpack.config.js

23 lines
603 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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, //本地服务器热更新
},
};