Skip to content

Update the JSDoc of configureBabel to warn about .babelrc and node_modules #788

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

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

stof
Copy link
Member

@stof stof commented Jun 10, 2020

Babel supports 2 different types of config files:

  • .babelrc stops at package boundaries
  • babel.config.* applies to the whole project, including node_modules

Once node_modules is not excluded anymore in the babel-loader configuration, this distinction matters.

Refs #785

…dules

Babel supports 2 different types of config files:

- .babelrc stops at package boundaries
- babel.config.* applies to the whole project, including node_modules

Once node_modules is not excluded anymore in the babel-loader configuration, this distinction matters.
@jdreesen
Copy link
Contributor

babel.config.* files are supported in encore since v0.30.0: #738

@stof
Copy link
Member Author

stof commented Jun 10, 2020

@jdreesen sure. But this doc update is to warn about the case of #785: if you use a .babelrc file and you decide to apply babel on some node_modules packages, it won't do what you might expect, because it will run babel without your project config (and so probably with an empty config)

@jdreesen
Copy link
Contributor

Yes, you're absolutely right!

I just wanted to add that for the reference. Sorry for the confusion.

@Rodrigo001-dev

This comment has been minimized.

@Lyrkan Lyrkan merged commit 431f20f into master Jul 31, 2020
@Lyrkan
Copy link
Collaborator

Lyrkan commented Jul 31, 2020

Thanks @stof

We should still implement what I described in #785 (comment), I'll open another issue about it.

@stof stof deleted the stof-patch-1 branch July 31, 2020 07:52
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.

4 participants