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

fix: ignored module should be compiled to empty es module #946

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

xusd320
Copy link
Contributor

@xusd320 xusd320 commented Mar 12, 2024

问题:

ignored 替换为 "" 空字符串,swc 会将其识别为 cjs module,导致产物模块导出内容多一个 default 属性,内容为 { default: {} }

解法:

ignored 替换为 "export {};", 显示标记为 es module,产物模块导出内容为 {} 空对象,和 webpack 对齐。

@xusd320 xusd320 merged commit 8cc33c3 into master Mar 12, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/ignored-module-compile branch March 12, 2024 10:15
xusd320 added a commit that referenced this pull request Mar 13, 2024
* fix: ignored module should be compiled to empty es module

* test: update e2e resolve.ignored

* test: update e2e resolve.ignored
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.

3 participants