Conversation
0cdd1b7 to
ec5e53a
Compare
ec5e53a to
eb769cc
Compare
eb769cc to
4573bbc
Compare
xusd320
approved these changes
Oct 24, 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: #2249
支持一个 enableNodePolyfills 的配置,类似于 https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill
使用了 next.js 的预构建好的 polyfills 产物,处理一下
resolve_fallback的 import_map alias 配置即可。使用方式:
{ "config": { "entry": [ { "import": "input/index.ts", "name": "main" } ], "nodePolyfill": true } }参考:
Test Plan
参考快照测试,fallback 的逻辑是只会把用户使用到的 polyfill alias bundle 进产物,不会把所有的 node polyfill 一次性打包进来。