-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Core: Use named exports in src/
#5262
Comments
mgol
added
the
Discuss in Meeting
Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting.
label
May 30, 2023
Adding the |
timmywil
removed
the
Discuss in Meeting
Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting.
label
Jul 10, 2023
Will be using named exports in the |
mgol
added a commit
to mgol/jquery
that referenced
this issue
Jul 10, 2023
mgol
added a commit
to mgol/jquery
that referenced
this issue
Jul 10, 2023
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The code in
src/
on themain
branch is authored using ECMAScript modules with default exports. Each file exports a single API.In the
exports
PR (#5255) for 4.0, a concern has been raised by @GeoffreyBooth that default exports are generally discouraged so we should ideally provide namedjQuery
&$
exports in addition, even if we keep the default export as well. There's a link to a Webpack docs page there that says:I just wondered how that affects our approach to jQuery source code. Since we plan to expose the ESM files from
src/
, should we switch them to use named exports as well?If we switch, this is likely to affect our AMD output published to the
amd
directory. We can either accept it, or tweak the AMD output or maybe even give up on AMD for individual modules and just bet on ESM here.Link to test case
N/A
The text was updated successfully, but these errors were encountered: