You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling source from ES modules to AMD with --preserveModules, I'd expect default exports in the module to be transformed into unwrapped return values in the resulting AMD module. An example:
At least when a module doesn't use named exports but only default ones, I'd expect the generated AMD modules to be using the usual return-style exports.
This is, in particular, important to jQuery which wants to transform its new ES modules-based source back to AMD keeping previous idiomatic semantics of those modules.
Expected Behavior / Situation
When compiling source from ES modules to AMD with
--preserveModules
, I'd expect default exports in the module to be transformed into unwrapped return values in the resulting AMD module. An example:Input:
Output:
Actual Behavior / Situation
The module using a default export is converted to one putting what was exported into
exports.default
:Input:
Output:
Check with Rollup
1.25.2
&1.27.5
.Modification Proposal
At least when a module doesn't use named exports but only default ones, I'd expect the generated AMD modules to be using the usual
return
-style exports.This is, in particular, important to jQuery which wants to transform its new ES modules-based source back to AMD keeping previous idiomatic semantics of those modules.
Ref #2979 (comment)
The text was updated successfully, but these errors were encountered: