//开发环境配置 const HtmlWebpackPlugin = require('html-webpack-plugin'); // vue-loader15.*之后的版本都必须要加上这个,否则会报错 const VueLoaderPlugin = require('vue-loader/lib/plugin'); module.exports = { mode: 'development', output: { filename: 'bundle.js' }, devtool: 'source-map', plugins: [ new HtmlWebpackPlugin({ template: 'index.html', BASE_URL:'src/U/' }), new VueLoaderPlugin() ], devServer: { index: "index.html", //默认文件名 hot: true, //热更新 host: "0.0.0.0", compress: true, port: 8000, disableHostCheck: true, proxy: { "/mtsy": { // target: 'http://172.16.90.238:21008', // target: 'http://172.16.90.64:21009', target: 'http://172.16.90.77:21008', pathRewrite: { "^/mtsy": "" }, changeOrigin: true } } } }