Skip to content

feat: add polyfillServer option#18

Merged
chenjiahan merged 2 commits intorstackjs:mainfrom
DasBlackfur:main
Jan 30, 2025
Merged

feat: add polyfillServer option#18
chenjiahan merged 2 commits intorstackjs:mainfrom
DasBlackfur:main

Conversation

@DasBlackfur
Copy link
Copy Markdown
Contributor

In some environments, rsbuild should behave exactly like it does with the " target: 'node' option, except those environments don't provide nodejs modules and require a polyfill. In particular goja and inherently sobek, which is used by the k6 framework.

Unfortunately the node target sets isServer to true and this plugin disables itself which to be fair, is reasonable.
However an option to explicitly enable that behavior is infinitely useful in such situations.

If you have any questions regarding the implementation, please mention me.
Best regards Blackfur

@DasBlackfur
Copy link
Copy Markdown
Contributor Author

The force push was necessary since I had leaked my private email 😬

Copy link
Copy Markdown
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT👍 thank you!

@chenjiahan chenjiahan merged commit 9c808d1 into rstackjs:main Jan 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants