Webpack 4 “size exceeds the recommended limit (244 KiB)”

前端 未结 8 1612
旧巷少年郎
旧巷少年郎 2020-12-07 23:51

I have two files which are combined under 600 bytes (.6kb) as below.

So how is it that my app.bundle.js is so large (987kb) and more importantly how does one manage

8条回答
  •  Happy的楠姐
    2020-12-08 00:34

    Nuxt solution nuxt.config.js:

    module.exports = {
     build: {
      extend(config, { isDev , isClient }) {
        if (isClient && !isDev) {
          config.optimization.splitChunks.maxSize = 250000
        }
      }
     }
    }
    

提交回复
热议问题