-
Notifications
You must be signed in to change notification settings - Fork 192
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
Webpack gives error while bundling modules having "main", "module" or "js:next" attributes set to "." in their package.json #123
Comments
+1 on this @sokra. I've had a similar problem recently with the Jest ecosystem. My thoughts on this are that, at very least, if the target for bundling is "node," Webpack should support all of the quirks of the NodeJS module resolver. |
I just reported this issue in Jest too. |
This package can't be included right now with webpack (Jest also has a similar issue). While it's a bug in webpack, this package is not usable by any web app right now that bundles with webpack. webpack/enhanced-resolve#123 By switching the "main" entry in package.json, this package will be compatible with all resolvers (and also conform to the same pattern as every other repo in the es-shim org)
This package can't be included right now with webpack (Jest also has a similar issue). While it's a bug in webpack, this package is not usable by any web app right now that bundles with webpack. webpack/enhanced-resolve#123 By switching the "main" entry in package.json, this package will be compatible with all resolvers (and also conform to the same pattern as every other repo in the es-shim org)
What would it take to get this fixed? |
…lvers This package can't be included right now with webpack (Jest also has a similar issue). While it's a bug in webpack, this package is not usable by any web app right now that bundles with webpack. webpack/enhanced-resolve#123 By switching the "main" entry in package.json, this package will be compatible with all resolvers
…lvers This package can't be included right now with webpack (Jest also has a similar issue). While it's a bug in webpack, this package is not usable by any web app right now that bundles with webpack. webpack/enhanced-resolve#123 By switching the "main" entry in package.json, this package will be compatible with all resolvers From es-shims/Array.prototype.flat#3
Let us assume I am using a module named do-something in my package.json as a dependency. This module has package.json with entry attributes like
While doing bundling for this module through webpack, I get this error
Module not found: Error: Recursion in resolving
I am in an assumption that, the
"main": "."
attribute path will resolve to"main": "index.js"
I am suspecting webpack is calling do-something module folder again and again.
I investigated more and it is coming from enhanced-resolve package that webpack uses for resolving paths. I use webpack major version 2
"webpack": "^2.4.0"
But I have tried with the latest webpack version as well, it still does not work. Is there a way in webpack to bundle these kinds of dependent modules?
This issue was moved from webpack/webpack#6026 by @sokra. Orginal issue was by @aakashkharche04.
Looks like a bug.
The text was updated successfully, but these errors were encountered: