-
Notifications
You must be signed in to change notification settings - Fork 186
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
Subpath imports don't work for built-in Node modules #310
Comments
As a hack for now I could suggest to put
|
The workaround by @vankop sounds good. This is a little bit complicated to fix... |
Does it? For non-subpath imports, Webpack already knows to avoid trying to bundle |
@nex3 I have created small example, take a look https://github.com/vankop/bundle-fs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Support for subpath imports was added in #293, but they're broken if one of the subpaths is a built-in Node.js module. To reproduce:
package.json
:lib/main.js
:Run
npx webpack build --target node --entry ./lib/main.js
. It produces this error:The text was updated successfully, but these errors were encountered: