-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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: support node:
prefix for Node.js core modules in runtime code
#18316
Conversation
For maintainers only:
|
@vankop I want to drop azure CI, it is slow and often failed, what do you think? |
you are right, but ci speed in general slow.. maybe keep it for stability, we can force merge anyway. |
/^(async-)?node(\d+(?:\.(\d+))?)?$/, | ||
(asyncFlag, major, minor) => { | ||
/^(async-)?node((\d+)(?:\.(\d+))?)?$/, | ||
(asyncFlag, _, major, minor) => { |
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.
Bugfix, before when you have 14.18
- major was 14.18
and minor was 18
, so if you have node14.8
in your target, you always have true, same here for other places
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.
how this work before 🙈
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.
Looks like nobody used it before 😄
I've created an issue to document this in webpack/webpack.js.org. |
What kind of change does this PR introduce?
fixes #18277
Did you add tests for your changes?
Yes
Does this PR introduce a breaking change?
No, because we generate it only when your env supported it
What needs to be documented once your changes are merged?
Yes
Shorty:
We generate
node:
prefix forimport ... from "module"
only when your env supported it and it is only abour webpack runtime code. We need document that you can disable it using theoutput.environment.nodePrefixForCoreModules
option