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
Simple explanation: Re-exporting the default of an external module doesn't work.
Expected Behavior
If 'interop' is on, then the interop function should unwrap the default value and that value should then be returned (AMD module) / assigned to exports (CJS module) / ...
If 'interop' is off, then no unwrap should be done and the value from the module should be returned / assigned to exports as-is.
Actual Behavior
The 'interop' function unwraps the default value. Then value.default is returned / assigned to exports.
My use-case for Rollup has recently been with compiling ESM files into single AMD modules for use. The usage of these AMD modules does not care at all about original ESM format of the data and as such a simple return statement is enough. Occasionally, still, Rollup has been adding "exports" into the dependencies and using that as the means of output. It would be nice if there was a way to forbid this. But that's not really in any way connected with this bug report. Sorry about that.
The text was updated successfully, but these errors were encountered:
How Do We Reproduce?
Link to Repl
Simple explanation: Re-exporting the default of an external module doesn't work.
Expected Behavior
If 'interop' is on, then the interop function should unwrap the default value and that value should then be returned (AMD module) / assigned to exports (CJS module) / ...
If 'interop' is off, then no unwrap should be done and the value from the module should be returned / assigned to exports as-is.
Actual Behavior
The 'interop' function unwraps the default value. Then
value.default
is returned / assigned to exports.While I'm here
My use-case for Rollup has recently been with compiling ESM files into single AMD modules for use. The usage of these AMD modules does not care at all about original ESM format of the data and as such a simple return statement is enough. Occasionally, still, Rollup has been adding "exports" into the dependencies and using that as the means of output. It would be nice if there was a way to forbid this. But that's not really in any way connected with this bug report. Sorry about that.The text was updated successfully, but these errors were encountered: