Skip to content

feat(CLI): add output-metro-dir option to copy Metro output files#144

Merged
floydkim merged 1 commit intomasterfrom
feature/output-metro-dir
Apr 2, 2026
Merged

feat(CLI): add output-metro-dir option to copy Metro output files#144
floydkim merged 1 commit intomasterfrom
feature/output-metro-dir

Conversation

@floydkim
Copy link
Copy Markdown
Collaborator

@floydkim floydkim commented Apr 2, 2026

closes: #71

Background

Tools like Sentry and Datadog use Debug IDs to match runtime errors back to source maps. In a Hermes setup, the Debug ID written into the JS bundle also needs to be inserted into the Hermes bytecode source map.

To do that, we need access to the Metro bundle and source map before Hermes compilation runs. The npx code-push CLI currently sends Metro output straight into hermesc, so there isn't a clean way to copy or post-process those pre-Hermes artifacts.

Changes

Adds --output-metro-dir <path> to bundle and release command.

When this option is set, the CLI copies the Metro JS bundle and source map to the specified directory before Hermes compilation. It keeps the original bundle filename, including platform defaults and custom names.

@floyd-soomgo floyd-soomgo force-pushed the feature/output-metro-dir branch from 1eaf7b0 to 958eb4d Compare April 2, 2026 16:27
@floydkim floydkim force-pushed the feature/output-metro-dir branch from 958eb4d to ca43e77 Compare April 2, 2026 16:33
@floydkim floydkim merged commit 2c183e8 into master Apr 2, 2026
3 checks passed
@floydkim floydkim deleted the feature/output-metro-dir branch April 2, 2026 16:34
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.

Uploading the source map on Sentry for stack trace

1 participant