Skip to content
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

Compilation errors when using create-react-app and Babel macros #608

Open
csboling opened this issue Nov 10, 2021 · 0 comments
Open

Compilation errors when using create-react-app and Babel macros #608

csboling opened this issue Nov 10, 2021 · 0 comments

Comments

@csboling
Copy link

From the discussion in #317 I gather that the Babel macro setup ought to work out of the box with create-react-app, but I am unable to produce a working project. Here is my example repository showing an attempt.

To summarize:

  • the default settings don't work because create-react-app forbids any imports outside of the src/ directory, so it refuses to import ../node_modules/.cache/src/... files.
  • changing the cacheDir to src/.cache/ in an attempt to circumvent this restriction reports that the file .cache/src/ExchangeRates-GetRates.tsx is not found, although the file exists on disk. This is the same whether load or gql approaches from graphql-let/macro are used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant