Metro bundler doesn't include source map for dependency packages
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 696
- Avg merge
- 8m
- Merged PRs (30d)
- 7
Description
I am setting up JS monorepo which consists of two packages, A and B. The code is in TypeScript. It uses yarn and lerna.
A is a JS library package. B is a react native test app which consumes library. B uses the metro bundler to produce the bundle. I want to include source map in the bundle, hence I'm setting the sourceMap parameter to true.
I found that the bundle only contains the source map data for files in B, but not in A. How can I configure the Metro bundler to also include source map for dependency package A?
The Metro bundler that I'm using is from react-native 0.60.
Thanks
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 by reproducing the reported setup with Metro, React Native 0.60, Yarn, Lerna, and the sourceMap option enabled for package B consuming package A. Trace how Metro handles source maps for dependency packages; done means the generated bundle includes source-map data for both B and A.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100