fix(concatenate): ignored module should be treated as external #1149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
内部发现用例,如果 ignore module 参与合并,因为 tree-shaking 后 ast 为空,所以不插入任何代码
那么所有引用自 ignored modules 的变量都会变成 undefined 变量。
解:
ignored module 不参与合并
Summary by CodeRabbit
pkg
模块的index.js
文件添加了额外的console.log
语句。pkg
模块的package.json
文件中指定了在浏览器环境中忽略index.js
。