Closed guybedford closed 6 years ago
The alternative workaround here could be to somehow detect the system output format and add the exports('exportName', ...)
to the wrapper assignment manually...
It seems I got this wrong - was under the impression this plugin was returning the AST for use in Rollup, but it seems like that isn't the case due.
The wrapper in https://github.com/rollup/rollup-plugin-commonjs/blob/master/src/transform.js#L360 should ideally also have a corresponding representation in the AST returned in order to properly retain the invariants of the transformation process.
Not having this results in the variable assignment not being exported when outputting to the system module format, which requires rendering on the assignment identifier of the export default AST node to be applied.