-
-
Notifications
You must be signed in to change notification settings - Fork 652
fix(template-react-ts): work with newer Node #10304
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
base: main
Are you sure you want to change the base?
Conversation
Summary: On my machine running Node v23.11.0, running this example fails with two errors: 1. `__dirname` is undefined 2. `RefreshPlugin` is an object instead of a class This commit fixes both of these errors. Test Plan: 1. use Node v23.11.0 2. run `pnpm create rspack@latest` 3. select react-typescript config 4. run `pnpm run dev` Before this commit: it doesn't work After this commit: it works
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
CodSpeed Performance ReportMerging #10304 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related to nodejs/node#57298 (comment) and open-telemetry/opentelemetry-js#5415 it seems there's no ideal way to handle this right now, maybe we can generate different template for Node.js >23 |
@hardfist It seems that ts-node will have this problem. Rsbuild uses jiti and it works fine. |
Here is another issue with |
In the meantime I suggest we make two templates that the |
Summary:
On my machine running Node v23.11.0, running this example fails with two errors:
__dirname
is undefinedRefreshPlugin
is an object instead of a classThis commit fixes both of these errors.
Test Plan:
pnpm create rspack@latest
pnpm run dev
Before this commit: it doesn't work
After this commit: it works