Skip to content

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

@jasopolis jasopolis requested a review from kulshekhar as a code owner August 21, 2023 22:42
@kulshekhar
Copy link
Owner

Thank you @jasopolis!

@sonarqubecloud
Copy link

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.

2 participants