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

docs: add note for Babel config #4197

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasopolis
Copy link

Summary

Update the troubleshooting docs page to include a note that Babel configured with .babelrc will not work when trying to compile any part of node_modules, even when transformIgnorePatterns is updated. Instead, the Babel config must be renamed to babel.config.js. (See Babel docs: https://babeljs.io/docs/configuration#whats-your-use-case)

This is not well documented elsewhere, so this could be helpful for folks debugging the fairly common "Cannot use import statement outside a module" error.

Test plan

(n/a, docs update)

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Since this is pretty minor, I just created the PR here, but am happy to open an issue/discussion if preferred! Thank you

@kulshekhar
Copy link
Owner

Thank you @jasopolis!

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

Successfully merging this pull request may close these issues.

None yet

2 participants