-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export __esModule when bundling to CJS or UMD in named mode. #650
Comments
We should do that. I've been meaning to for a long time. |
This is enabled in 0.26.7 – thanks |
I've started receiving some issues people ran into with because of this change. They were incorrectly importing the default export of React Intl which does not have a default export, then accessing a named export off of it.
Obviously the user's |
When the
format
option is set to'umd'
or'cjs'
and theexports
option is set to'named'
, we should automatically export the__esModule
property (with valuetrue
).This means that a library compiled using rollup can be imported using an app which uses ES6 syntax for imports, then compiles to CommonJS using babel.
Can anyone see any downsides to doing this? If not, I'd be happy to submit a pull request.
The text was updated successfully, but these errors were encountered: