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',
      }
    }
  },

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM