module.exports = { // publicPath: process.env.NODE_ENV === "production" ? "/dist/" : "./", // publicPath: "./", productionSourceMap: false, // 生产环境是否生成 sourceMap 文件 lintOnSave: false, devServer: { open: true, port: 8081, proxy: { "/api": { target: "https://api.github.com", changeOrigin: true, ws: false, pathRewrite: { "^/api": "" } } } }, configureWebpack: { // 把原本需要写在webpack.config.js中的配置代码 写在这里 会自动合并 externals: { 'jquery' : '$', 'echarts': 'echarts', // // 'axios' : 'axios' } } };