-
-
Notifications
You must be signed in to change notification settings - Fork 616
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: 🐛 use unknown module type in SWC #2406
Conversation
🦋 Changeset detectedLatest commit: 7df5aa5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
bd3d863
to
399bb1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hyf0 Can you take a look at the change of tree-shaking part?
Block by swc-project/swc#7118 |
Fixed in swc ≥ 1.3.45. |
399bb1f
to
f1ab44e
Compare
8a25954
to
2d9b08a
Compare
|
@andersk Sorry for the delay, I encountered some more SWC issues(7312, 7287) in this PR, so it takes this long, now is should be OK to continue |
5b2d59a
to
e959710
Compare
e959710
to
6f47b42
Compare
a882c6a
to
7df5aa5
Compare
@web-infra-dev/rspack please review carefully |
Some tests snapshot result and webpack.config.js are changed, could you add some explanation? |
Stats hash changes because "use strict" disappears when moduleType is asset or script. |
Should I extract the bump SWC part to another PR @hyf0 |
* chore: bump-swc * feat: parse script * fix(visitor): handle script strict mode * chore: update test hash
Summary
Bump SWC
Should parse CJS as Script instead of Module, we can let SWC automatically do that for us.
Related issue (if exists)
fixed #2339
Types of changes
Checklist
pnpm run changeset
.