大飞_dafei

导航

Webpack打包警告提示文件过大,超过了默认值

 Webpack打包警告提示文件过大,超过了默认值

 

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  js/app.97f1754e.js (1.18 MiB)
  css/chunk-vendors.ccb705f1.css (270 KiB)
  js/chunk-vendors.bbb65845.js (2.8 MiB)

 warning                                                                                                                                        
                                                                                                                                                
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:                                                                                                                                    
  app (4.25 MiB)
      css/chunk-vendors.ccb705f1.css
      js/chunk-vendors.bbb65845.js
      css/app.c84f6e5f.css
      js/app.97f1754e.js

 

 

 

 解决办法,优化或者关闭提示

  configureWebpack:{
    performance: { // 关闭性能提示
      hints: false,
    },
    optimization:{
      minimize:true,
      splitChunks:{
        chunks: 'all',
      }
    }
  },

 

posted on 2022-02-17 14:28  大飞_dafei  阅读(5141)  评论(0编辑  收藏  举报