How to force webpack to use "node:" prefixes? #18265
-
Hi, im trying to build node app and i need to tell webpack to use For example in result file i see:
I want to change such specifiers from How can i do this? |
Beta Was this translation helpful? Give feedback.
Answered by
alexander-akait
Apr 2, 2024
Replies: 1 comment 4 replies
-
Hi, we don't have options for this, why do you need it? Both work fine with Node.js |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it, we need to implement
nodePrefixForCoreModules
here https://github.com/webpack/webpack/blob/main/lib/config/browserslistTargetHandler.js#L336, put version there, than implementsupportsModePrefixForCoreModules() {}
inRuntimeTemplate.js
and use it everywhere we generate external exports for core modules, do you want to send a PR, if yes - feel free to do it, if no - feel free to open an issue, I will try to implement it tomorrow (easy task)