发布时间:2023-06-11 19:00
webpack打包提示文件体积过大导致
The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
修改下打包时的配置:
config["performance"] = { "maxEntrypointSize": 10000000, "maxAssetSize": 30000000 }
module.exports = {
publicPath: './', // 基本路径
outputDir: 'dist', // 输出文件目录
assetsDir: "static", //放置生成的静态文件目录(js css img)
productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('assets', resolve('src/assets'))
.set('components', resolve('src/components'))
},
configureWebpack: (config) => {
if (process.env.NODE_ENV === 'production') {// 为生产环境修改配置...
config.mode = 'production';
config["performance"] = {//打包文件大小配置
"maxEntrypointSize": 10000000,
"maxAssetSize": 30000000
}
}
}
}
第九章-----Java集合框架----ArrayList LinkedList HashSet TreeSet Map
[论文阅读笔记]Towards Deep Learning Models Resistant to Adversarial Attacks
SAP Fiori 的附件处理(Attachment handling)
全栈测试工程师有用武之地吗?是做什么的?没跨界的通识,连做螺丝钉的资格都没有
kali-linux 202202 安装w3af命令行版的详细过程
产业洞察 | 眩目的云原生如此诱人,如何能好用,企业又愿意用?