const webpack = require('webpack') module.exports = { publicPath: "./", // 输出文件目录 outputDir: process.env.outputDir, lintOnSave: false, devServer: { //启动项目在8080端口自动打开 open: true, port: 8080, proxy: null, disableHostCheck: true }, // 打包体积大报的错 configureWebpack: (config) => { if (process.env.NODE_ENV === 'production') {// 为生产环境修改配置... config.mode = 'production'; config["performance"] = {//打包文件大小配置 "maxEntrypointSize": 10000000, "maxAssetSize": 30000000 } } } }