-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Modified exports in package.json #5414
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
Conversation
|
Thanks for the PR but I don't think the proposed changes are correct. Bundlers work differently than Node and they're perfectly able to load an ESM module via a CommonJS Is there any concrete issue you're facing with Webpack or just a feeling that the setup is not what you expected? I'd prefer if we focused on real issues here; I spent a lot of time thinking about this setup and discussing it with experts in the area; any changes to this setup should be a result of real demonstrable issues. |
Also, please sign our CLA, it's a hard requirement for us to accept any PRs. |
Correct, I understood problem of "two copies" just few minutes after this PR ( in fact, I returned here to close it). |
Can you post a full test case with detailed instructions on how to run it? I don’t think we’ll be able to proceed until we have it; there are too many edge cases here to be able to act just on reading incomplete code snippets. |
https://github.com/cocco111/jQuery4Test |
Thanks for the test case, I think I understand the issue now. The fact that we started exporting more than a single thing from jQuery - apart from the Let me create an issue out of it. The PR as it stands is not going to work due to state duplication but we need to think how to handle this. |
Issue: #5416 |
Thanks. |
Summary
Proposal to change exports settings in package.json
Use case: webpack with target
browser
, the export proposed will be alwaysdevelopment
/production
(so jquery-module).But if someone uses require('jquery') for example in old CJS packages, is more correct and compatible loading jquery.js, as it is for node target.
Checklist