Skip to content
New issue

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

Split deps #161

Open
wants to merge 8 commits into
base: dev-ts
Choose a base branch
from
Open

Split deps #161

wants to merge 8 commits into from

Conversation

sparklinm
Copy link
Contributor

主包依赖分离,可将没有被主包的引用的依赖打包进分包:

  1. optimization.splitDeps.enable,是否启用依赖分离,默认为false
  2. optimization.splitDeps.enableLocalDep,是否启用本地依赖分离,默认为false,即分离npm依赖
  3. optimization.splitDeps.filter.maxDeps,当依赖所在分包数量小于等于maxDeps时,依赖被打包进分包
  4. optimization.splitDeps.filter.minDeps,当依赖所在分包数量大于等于minDeps时,依赖被打包进分包
  5. optimization.splitDeps.filter.maxDepSize,当依赖大小小于等于maxDepSize时,依赖被打包进分包
  6. optimization.splitDeps.filter.minDepSize,当依赖大小大于等于minDepSize时,依赖被打包进分包

当filter内某个属性未被指定时,即不启用该项过滤。filter可以为一个数组,每个数组元素可以包含上面filter描述的选项,会依次对将每个数组元素作为过滤条件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants