module.exports = { // publicPath: process.env.NODE_ENV === 'production' ? './' : '/', publicPath: '/', pages: { index: { // page 的入口 entry: 'src/main.js', // 模板来源 template: 'public/index.html', // 在 dist/index.html 的输出 filename: 'index.html', // 当使用 title 选项时,template 中的 title 标签需要是 <%= htmlWebpackPlugin.options.title %> title: '公共安全技术研究中心' } }, lintOnSave: process.env.NODE_ENV !== 'production', css: { // 开启 CSS source maps. sourceMap: process.env.NODE_ENV !== 'production' }, devServer: { open: true, port: 9090, overlay: { warnings: true, errors: true }, proxy: { '/portal': { target: process.env.VUE_APP_SERVER_URL, secure: false, changeOrigin: true } } } }