removeAvailableModules #18871
jianxingyao
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
removeAvailableModules 这个配置项的作用需要怎么搭建例子才能看到效果呢,我的理解是如下
util.js 共享模块
parent.js 动态 imoprt 引入 children.js 引入 util.js
children.js 引入 util.js
如果 removeAvailableModules :false 那么 util.js 会被打包在 parent.js 和 动态 import 分割出的模块中,
如果 removeAvailableModules :true 那么 util.js 只会被打包在 parent.js 中 因为对于 children.js , parent.js 是 父模块,而父模块中包含了子模块 children.js 需要导入的模块,所以只有一个结果
但打包后并不是这样。是我理解错了吗?
Beta Was this translation helpful? Give feedback.
All reactions