启项目启不来出现以下提示:
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: main (19.8 MiB) static/js/bundle.js?t=1663899929861 static/js/41.chunk.js?t=1663899·····················
原因是webpack打包文件体积过大。
解决方法:
在生产环境打包配置文件中加代码⬇️
performance: {
// 入口起点的最大体积
maxEntrypointSize: 50000000,
// 生成文件的最大体积
maxAssetSize: 30000000,
},