转载请注明预见才能遇见的博客:http://my.csdn.net/
原文地址:https://blog.csdn.net/pcaxb/article/details/81775334
WebPack 警告WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).解决
目录
2.WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).解决
1.webpack 警告
2.WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).解决
方式一 webpack中添加如下配置
performance: {
hints:false
}
方式二 webpack中添加如下配置
performance: {
hints: "warning", // 枚举
maxAssetSize: 30000000, // 整数类型(以字节为单位)
maxEntrypointSize: 50000000, // 整数类型(以字节为单位)
assetFilter: function(assetFilename) {
// 提供资源文件名的断言函数
return assetFilename.endsWith('.css') || assetFilename.endsWith('.js');
}
},
WebPack 警告WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).解决
博客地址:https://blog.csdn.net/pcaxb/article/details/81775334