美文网首页
打包警告消除

打包警告消除

作者: 纱云 | 来源:发表于2024-03-10 11:25 被阅读0次

The following asset(s) exceed the recommended size limit (244 KiB)

  configureWebpack: {
    name: name,
    resolve: {
      alias: {
        '@': resolve('src')
      }
    },
    performance: {
      hints: 'warning',
      //入口起点的最大体积 整数类型(以字节为单位)
      maxEntrypointSize: 50000000,
      //生成文件的最大体积 整数类型(以字节为单位 300k)
      maxAssetSize: 30000000,
      //只给出 js 文件的性能提示
      assetFilter: function (assetFilename) {
        return assetFilename.endsWith('.js');
      }
    }
  },

Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

1602578-20220720141220312-645466621.png

element-ui图标乱码
sass版本改为1.39.0
"sass": "1.39.0",
vue.config.js配置

module.exports = {
  publicPath: '/',
  outputDir: 'dist',
  assetsDir: 'static',
  lintOnSave: false,
  productionSourceMap: false,
  css: {
    loaderOptions: {
      scss: {
        sassOptions: {outputStyle: 'expanded'} // fix: 解决 element-ui 图标 icon 偶现乱码问题
      }
    }
  },
}

相关文章

网友评论

      本文标题:打包警告消除

      本文链接:https://www.haomeiwen.com/subject/zxhpzdtx.html