webpack打包配置项 在config.js 中 module.exports = {publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', //静态资源目录outputDir: 'dist', //打包名称assetsDir: 'static',//静态资源,目录devServer: {port: port,open: false,overlay: {warnings: false,errors: true},proxy: {//配置跨域"/api":{target:'http://localhost:3000', //代理服务器changeOrigin: true,pathRewrite: {"^/api": "/"}},}},configureWebpack:{name: name,resolve: {alias: {'@': resolve('src') //@可以直接访问src目录下的文件}},plugins: [new FileManagerPlugin({events: {onEnd: {delete: ['./dist.zip'],//列出了应该被删除的文件或目录archive: [{source: './dist', destination: `./dist.zip`}]//source应该被压缩的源文件或目录//destination压缩后的文件应该被保存的位置和名称}}})]} }