Passing path to .babelrc as a packager option (programmatic and CLI)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 696
- Avg merge
- 8m
- Merged PRs (30d)
- 7
Description
In the transformer there's this comment referring to the .babelrc lookup:
// In the future let's look into adding a command line option to specify
// this location.
https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/transformer.js#L54
At Expo we use a different .babelrc internally (for monorepo reasons) than in our OSS repos so being able to specify a different .babelrc without having to fork the default transformer is helpful. I was going to work on a PR for this, is this still a feature you'd want? I was thinking it'd probably be a CLI option like --babelrc and programmatic option like babelRCPath that gets passed through to the transformer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/metro-bundler/src/transformer.js at the .babelrc lookup comment, then trace how packager options reach the transformer from the CLI and programmatic API. The work is done when both interfaces accept a custom .babelrc path and use it for transformation without requiring a fork of the default transformer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100