feat: swc loader support emitAssertForImportAttributes config#9826
Merged
fireairforce merged 1 commit intomainfrom Apr 21, 2025
Merged
feat: swc loader support emitAssertForImportAttributes config#9826fireairforce merged 1 commit intomainfrom
fireairforce merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
CodSpeed Performance ReportMerging #9826 will not alter performanceComparing 🎉 Hooray!
|
assert tranform to withassert tranform to with for webpack test case
c3773f7 to
12f0c1f
Compare
assert tranform to with for webpack test case
GiveMe-A-Name
previously approved these changes
Apr 17, 2025
chenjiahan
requested changes
Apr 17, 2025
Member
chenjiahan
left a comment
There was a problem hiding this comment.
You may need to update the schema too: #10055
chenjiahan
previously approved these changes
Apr 17, 2025
972066a
972066a to
cf381bf
Compare
Member
|
CI failed |
GiveMe-A-Name
approved these changes
Apr 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
closes: #9780
related issue: swc-project/swc#10286 (comment)
The default behavior of swc will transform
import-attributes's keyword fromasserttowith, in this case, we can use configjsc.experimental.emitAssertForImportAttributesto keep theassertkeyword to align the output test case with webpack.Juat as the playground show:
https://play.swc.rs/?version=1.11.13&code=H4sIAAAAAAAAA8vMLcgvKlEoSEzOTkxP9Qr291NIK8rPVVDS04eK6WUV5%2BcpKSQWF6cCFVaXVBakWikogQVrrbmS8%2FOK83NS9XLy0zWQDNG0BgDW5p%2FHWQAAAA%3D%3D&config=H4sIAAAAAAAAA0WPMQ7CMAxF954i8twBdWBgY0Fi4BChWCjQNJHtSK2q3B23Tcpmfz9%2Ffy%2BNMfDhHi5m0VKbaImRjl4Vnkexkyogc0TuyUWBbZjbfUcsvVFWArk7dR0UHaeI5Dzq%2FrA6mmr5RYx3HwPJlfWauDCyAkIJ28qgd2V6C1RgEXLPJFjhwuamZAEfXmnA%2Fzdr4j3XGQ7I8aNim0lufpUNp%2B0HAQAA
Checklist