mirror of
https://github.com/jquery/jquery.git
synced 2026-01-09 14:18:03 -05:00
Core: Use named exports in src/
The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
This commit is contained in:
committed by
GitHub
parent
42e50f8c21
commit
f75daab091
@@ -221,7 +221,7 @@ module.exports = function( grunt ) {
|
||||
// Remove the jQuery export from the entry file, we'll use our own
|
||||
// custom wrapper.
|
||||
setOverride( inputRollupOptions.input,
|
||||
read( inputFileName ).replace( /\n*export default jQuery;\n*/, "\n" ) );
|
||||
read( inputFileName ).replace( /\n*export \{ jQuery, jQuery as \$ };\n*/, "\n" ) );
|
||||
|
||||
// Replace exports/global with a noop noConflict
|
||||
if ( excluded.includes( "exports/global" ) ) {
|
||||
|
||||
Reference in New Issue
Block a user