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

feat!: use 'commonjs-import' as CJS external type by default #438

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Nov 17, 2024

Summary

It's hard to cover all cases of whether it's under node 13.2.0 without calling Browserslist API. Since Node 13.2 has reach EOL for years (https://endoflife.date/nodejs). I think it's fine to set commonjs-import as the default external type for Node.js and demonstrate the differences between the externals type on library build scenario next.

Also bump Rsbuild to ~1.1.4

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Nov 17, 2024

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit 2c6fbf3
🔍 Latest deploy log https://app.netlify.com/sites/rslib/deploys/673d73d572a3050008cba3eb
😎 Deploy Preview https://deploy-preview-438--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codspeed-hq bot commented Nov 17, 2024

CodSpeed Performance Report

Merging #438 will degrade performances by 10.65%

Comparing commonjs-import (2c6fbf3) with main (17f7c6e)

Summary

❌ 1 (👁 1) regressions
✅ 4 untouched benchmarks

Benchmarks breakdown

Benchmark main commonjs-import Change
👁 examples/express-plugin 107.2 ms 120 ms -10.65%

@fi3ework
Copy link
Member Author

fi3ework commented Nov 17, 2024

Done.

TODO: don't merge this until Rsbuild has relaid on @rspack/core 1.1.2. It strictly requires at least 1.1.3 version of Rsbuild (assume that Rsbuild will bump @rspack/core on 1.1.3). We need to change the dependent Rsbuild version to ^1.1.3 alongside.

@fi3ework fi3ework marked this pull request as draft November 17, 2024 13:50
@fi3ework fi3ework marked this pull request as ready for review November 20, 2024 05:44
@fi3ework fi3ework merged commit 25d52d8 into main Nov 20, 2024
19 checks passed
@fi3ework fi3ework deleted the commonjs-import branch November 20, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants