We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response
目前支持 splitChunks: false 禁止多余 chunks 的生成,但是框架默认进行了路由级别的 lazy import,导致依旧产出多个 bundle,期望支持 bundle 级别的定制
splitChunks: false
统一分包概念,增加 codeSpiliting 的配置,支持以下预置配置:
vendors
page
chunks
暂时不在 userConfig 上开放 webpack 的 splitChunks,根据用户使用场景逐步优化或增加内置策略
The text was updated successfully, but these errors were encountered:
入参类型:Boolean | Enum | Function
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Summary | 概述
No response
Motivation | 背景
目前支持
splitChunks: false
禁止多余 chunks 的生成,但是框架默认进行了路由级别的 lazy import,导致依旧产出多个 bundle,期望支持 bundle 级别的定制Usage example | 使用示例
No response
Detailed design | 方案设计
统一分包概念,增加 codeSpiliting 的配置,支持以下预置配置:
vendors
策略:将异步 chunks 里的三方依赖统一打入到 vendor.js 中,避免重复,在依赖不变的情况下有效利用缓存。缺陷是如果项目过大会导致单文件尺寸过大。page
策略:所有路由级别组件按需加载,效果同splitChunks: false
。chunks
策略:在路由级别组件按需加载的基础上,根据模块体积大小自动拆分 chunks,为框架默认推荐策略。暂时不在 userConfig 上开放 webpack 的 splitChunks,根据用户使用场景逐步优化或增加内置策略
The text was updated successfully, but these errors were encountered: