When using a babel.config.js as well as specifying options in webpack babel loader, would it merge both or ignore babel.config.js?

Viewed 146

Hypothetically, if someone puts configuration of babel in three files at the same time:

  1. babel.config.js
  2. babel key in package.json
  3. babel loader options/query in webpack.config.js

Then which one of them will be actually used as configurations during babel compilation? How does Babel resolve which configuration to use in case of conflicting options given to it? I couldn't find exact priority order in the documentations.

Context of my question : I have a monorepo in which each package extends from root directory babel configuration and a webpack configuration also of the package itself which has its own babel configuration. In this case babel will use which configurations during compilation?

0 Answers
Related