直接抛出问题: 

vue-cli打包项目时警告: entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
记一次vue项目打包时提示Entrypoint size limit 的警告

 

 解决办法:

  直接在vue.config.js文件中配置: 

记一次vue项目打包时提示Entrypoint size limit 的警告

 

 performance: {
      hints: 'warning',
      // 入口起点的最大体积
      maxEntrypointSize: 50000000,
      // 生成文件的最大体积
      maxAssetSize: 30000000,
      // 只给出 js 文件的性能提示
      assetFilter: function (assetFilename) {
        return assetFilename.endsWith('.js')
      }
    }

 

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-08-25
  • 2021-10-28
猜你喜欢
  • 2021-10-07
  • 2021-06-08
  • 2022-12-23
  • 2021-09-13
  • 2021-06-08
  • 2021-08-17
相关资源
相似解决方案