babel-plugin-relay
bug: eagerEsModules: true
only works with single-project Relay configs.
#4909
Labels
babel-plugin-relay
bug: eagerEsModules: true
only works with single-project Relay configs.
#4909
Summary of the bug
When
"eagerEsModules": true
is set in a multi-project Relay config,babel-plugin-relay
transformsgraphql
tagged templates into require calls, like this:Expected behavior
Just like it does with a single-project Relay config,
babel-plugin-relay
should transformgraphql
tagged templates into import declarations when"eagerEsModules": true
is set, like this:Reproducing the bug
I created a reduced test case to demonstrate this behavior. If you want to reproduce the bug yourself, you can clone the repo, run the build commands, and compare the output. The repo also includes the dist files (one each for single and multi-project configs), so if you want to take my word for It, you can just compare the outputs on GitHub. More detail in the README.
The text was updated successfully, but these errors were encountered: