vue.config.js 配置 (代理、打包静态文件路径、文件大小配置)

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  devServer: {
    port: 8081,
    proxy: 'https://daidai.qhwoyoung.com/'
    // proxy: 'http://www.daidai.fun/'
  },
  publicPath: './',
  assetsDir: 'static',
  productionSourceMap: false,
  configureWebpack: config => {
    // 为生产环境修改配置...
    if (process.env.NODE_ENV === 'production') {
      config.mode = 'production'
      // 打包文件大小配置
      config.performance = {
        maxEntrypointSize: 10000000,
        maxAssetSize: 30000000
      }
    }
  }
})