直接拋出問題:
vue-cli打包項目時警告: entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
解決辦法:
直接在vue.config.js文件中配置:
performance: { hints: 'warning', // 入口起點的最大體積 maxEntrypointSize: 50000000, // 生成文件的最大體積 maxAssetSize: 30000000, // 只給出 js 文件的性能提示 assetFilter: function (assetFilename) { return assetFilename.endsWith('.js') } }