-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
require(package) makes webpack fail #363
Comments
This is a problem with Webpack and its bad compatibility with the Node.js ecosystem. Open an issue on Webpack: https://github.com/webpack/webpack/issues |
I understand that @sindresorhus . However it won't break your code to use |
I understand that and I'm sorry for the trouble, but I don't want to set a precedence that Webpack can do whatever they want and force the Node.js ecosystem to change. Webpack is the one that is interacting badly and should be fixed, not every Node.js module using a supported feature. See: https://nodejs.org/api/modules.html#modules_file_modules Please do open an issue on Webpack and let them know they're causing pain for both Webpack users and Node.js module maintainers. |
I understand your position @sindresorhus , I do. And the However I don't think it is about setting a precedence and giving up to webpack. Ultimately it comes to making life easier for the users. And it is true that nowadays, lots of user are using webpack. You chose to open-source your code and that's wonderful because your tool is damn fine. But open sourcing is also about listening to the community. And as you said, lots of issues has been opened regarding this I don't want to create a debate here, I just want to express my opinion, hoping that you'll consider it. Thank you anyway for creating got |
got/index.js
Line 27 in 8b040af
Could it be possible to replace
const pkg = require('./package');
withconst pkg = require('./package.json');
? It would remove ambiguity and avoid fiddling with webpack conf just to fix this issue.Thank you
The text was updated successfully, but these errors were encountered: