babel-plugin-dynamic-import-webpack
babel-plugin-dynamic-import-webpack copied to clipboard
[breaking][do-not-merge] CJS interop changes
Relates to https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/12
Has breaking change, unclear on intent here so marked as do not merge until discussion.
@ljharb fixed up, can move the proto to be the module.exports
value if desired, but using named property access is still up in the air, using .default
is the future safe option.
@ljharb with potential change to _interopRequireWildcard
, going to change recommendation to just use _interopRequireWildcard
rather than a custom interop boilerplate
@bmeck Can you clarify what you mean by "potential change to _interopRequireWildcard
"? As of today the helper hasn't changed in > 2 years.
Do we know yet whether import()
will allow access to named exports?
@gdborton we do know that; import()
will provide a ModuleRecord, which will provide (i believe) a .default
, and definitely .foo
for all named exports.