webpack 打包優化

  • 一、 webpack:
  optimization: {
        minimize: false, // 能夠先測試爲false,不壓縮,打包以後看源碼,是否有優化空間,正式生產環境須要壓縮的設置爲true1
        usedExports: true,  // 先設置爲true,未使用的代碼不該該打包,只有使用到的纔打包
  • 二、@babel/plugin-transform-runtime : 能夠減小重複代碼_createClass
相關文章
相關標籤/搜索