Skip to content

fix(webpack): avoid duplicate import core package#3871

Merged
chenjiahan merged 2 commits intomainfrom
duplicate_core_1031
Oct 31, 2024
Merged

fix(webpack): avoid duplicate import core package#3871
chenjiahan merged 2 commits intomainfrom
duplicate_core_1031

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Oct 31, 2024

Summary

In #3713, @rsbuild/webpack has been changed to a pure ESM package (with a CJS shim wrapper).

But this change introduces the dual package hazard: @rsbuild/core will be loaded twice times when @rsbuild/webpack is used by a CommonJS package (like Modern.js).

This PR reverts @rsbuild/webpack to a dual package to avoid this problem.

Related Links

Checklist

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

@netlify
Copy link
Copy Markdown

netlify bot commented Oct 31, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit f31b834
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/672340da82825f00082d2489
😎 Deploy Preview https://deploy-preview-3871--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🔴 down 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

@chenjiahan
Copy link
Copy Markdown
Member Author

!eco-ci

@rspack-bot
Copy link
Copy Markdown

rspack-bot commented Oct 31, 2024

📝 Ran ecosystem CI: Open

suite result
modernjs ✅ success
plugins ✅ success
rspress ✅ success
rslib ✅ success
examples ✅ success

@chenjiahan chenjiahan merged commit d594eb0 into main Oct 31, 2024
@chenjiahan chenjiahan deleted the duplicate_core_1031 branch October 31, 2024 08:52
This was referenced Oct 31, 2024
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