Skip to content

Switch unstable_compactSourceMaps and unstable_allowIndexMap defaults to true (#1763)#1763

Open
robhogan wants to merge 1 commit into
mainfrom
export-D110759649
Open

Switch unstable_compactSourceMaps and unstable_allowIndexMap defaults to true (#1763)#1763
robhogan wants to merge 1 commit into
mainfrom
export-D110759649

Conversation

@robhogan

@robhogan robhogan commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary:

Flip these defaults to:

  • Change Metro's internal source map format to VLQ strings rather than decoded tuples
  • Emit index maps for .map requests and programmatic and CLI source map builds.

These are coupled, because allowing index maps without enabling compact source maps is a no-op, and enabling compact source maps without index maps is a performance regression for source map generation.

Together, though, this reduces Metro's total memory footprint by more than 50%, and makes serving source maps ~2x faster. /symbolicate performance is preserved.

 - **[Breaking]**: Metro now emits source maps as [index maps](https://tc39.es/ecma426/#sec-index-source-map).
 - **[Breaking]**: Custom serialisers now receive a module list with maps in `VlqMap` form (`module.output[].data.map`)

Reviewed By: GijsWeterings, hoxyq

Differential Revision: D110759649

@meta-codesync meta-codesync Bot force-pushed the export-D110759649 branch from 051f012 to 51016e6 Compare July 6, 2026 15:18
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 6, 2026
…ults to `true` (#1763)

Summary:
Pull Request resolved: #1763

Flip these defaults to:
 - Change Metro's internal source map format to VLQ strings rather than decoded tuples
 - Emit [index maps](https://tc39.es/ecma426/#sec-index-source-map) for `.map` requests and programmatic and CLI source map builds.

These are coupled, because allowing index maps without enabling compact source maps is a no-op, and enabling compact source maps without index maps is a performance regression for source map generation.

Together, though, this reduces Metro's total memory footprint by more than 50%, and makes serving source maps ~2x faster. `/symbolicate` performance is preserved.

```
 - **[Breaking]**: Metro now emits source maps as [index maps](https://tc39.es/ecma426/#sec-index-source-map).
 - **[Breaking]**: Custom serialisers now receive a module list with maps in `VlqMap` form (`module.output[].data.map`)
```

Reviewed By: GijsWeterings, hoxyq

Differential Revision: D110759649
@robhogan robhogan force-pushed the export-D110759649 branch from 51016e6 to 50ce77f Compare July 6, 2026 15:22
@meta-codesync meta-codesync Bot changed the title Switch unstable_compactSourceMaps and unstable_allowIndexMap defaults to true Switch unstable_compactSourceMaps and unstable_allowIndexMap defaults to true (#1763) Jul 6, 2026
@meta-codesync

meta-codesync Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110759649.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant