-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
babel-plugin-relay and relay-compiler are not compatible with ES6 modules #2445
Comments
Is there a workaround for this? I'm using rollup to bundle my package and |
@SpaceHeroGuide https://github.com/rollup/rollup-plugin-commonjs |
@TrySound Thanks, but I'm already using this rollup plugin after the rollup babel plugin and it's not replacing the |
@SpaceHeroGuide is correct. This is not an issue that |
Could you provide reproducing repo where commonjs plugin doesn't work? |
My language plugin PR also happens to fix (part of) this situation, but the overall scope of that PR is a bit larger #2293 Specifically what it does is look for a default export. The exports from the artifacts, though, are left up to the specific language plugin to define, which in the case of JS/Flow would remain the same as currently the case is. |
Inspired by: - facebook/relay#2445 - facebook/relay#2781 - facebook/relay#2841 kiwicom-source-id: a0181e85ec323a361502ef8275739cf18ef114ac
Inspired by: - facebook/relay#2445 - facebook/relay#2781 - facebook/relay#2841 kiwicom-source-id: a0181e85ec323a361502ef8275739cf18ef114ac
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This seems related to #2706 which is also as yet unresolved. Has the community found a sustainable solution to this yet? I'm using rollupjs and ran into this yesterday as well |
Yes, enable eagerESModules option in relay config. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The output of using
babel-plugin-relay
usesrequire
, and the output ofrelay-compiler
usesmodule.exports
.I'd like to request that there be an option to use ES6
import
statements instead ofrequire
and thatrelay-compiler
output ES6 modules.TIA.
The text was updated successfully, but these errors were encountered: