Please improve documentation on how config options get merged
- Dominant language
- TypeScript
- Stars
- 777
- Forks
- 1.4k
- Avg merge
- 16h 45m
- Merged PRs (30d)
- 3
Description
Hi,
I was wondering how config options get merged between those passed to the JS API and those specified in config files (`.babelrc`, `babel.config.js*`). My question originally arose in rollup/rollup-plugin-babel#338 but I was told to report it here.
I found babel/babel#6765 and babel/babel#6905 but that seems to be more related to the `env` option...
The documentation over at https://babeljs.io/docs/en/options#merging specifies how merging happens when using `overrides`. But I can't see how it gets merged between the JS API call to Babel (which is what tools like the Rollup plugin use) and the options it picks up from the various config files.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the existing options#merging documentation and the behavior of the JavaScript API alongside .babelrc and babel.config.js* files. Trace the relevant configuration documentation or examples, then clarify the merge order and precedence for API and file-based options; done means the documented behavior answers this question without relying on the overrides section.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100