人民医院前端

vue.config.js 685B

123456789101112131415161718192021222324
  1. const webpack = require('webpack')
  2. module.exports = {
  3. publicPath: "./",
  4. // 输出文件目录
  5. outputDir: process.env.outputDir,
  6. lintOnSave: false,
  7. devServer: { //启动项目在8080端口自动打开
  8. open: true,
  9. port: 8080,
  10. proxy: null,
  11. disableHostCheck: true
  12. },
  13. // 打包体积大报的错
  14. configureWebpack: (config) => {
  15. if (process.env.NODE_ENV === 'production') {// 为生产环境修改配置...
  16. config.mode = 'production';
  17. config["performance"] = {//打包文件大小配置
  18. "maxEntrypointSize": 10000000,
  19. "maxAssetSize": 30000000
  20. }
  21. }
  22. }
  23. }