Skip to content

Disable dist sourcemaps for publish builds to prevent src 404s (internal-1596)#13648

Open
anthony0030 wants to merge 1 commit intomapbox:mainfrom
anthony0030:main
Open

Disable dist sourcemaps for publish builds to prevent src 404s (internal-1596)#13648
anthony0030 wants to merge 1 commit intomapbox:mainfrom
anthony0030:main

Conversation

@anthony0030
Copy link
Copy Markdown

Prevent sourcemap-related 404s in production error reporting by disabling distributable sourcemaps during publish builds.

Background:

Root cause was introduced in: Do not include source in NPM package (internal-1596) Commit: 8bbf4bd
Since src/ is no longer shipped in the npm package, sourcemap sources pointing to src/* cause Honeybadger/browser fetch attempts to return 404. Changes:

Add env-controlled sourcemap toggle for Rollup dist outputs. Set NO_DIST_SOURCEMAPS=true in prepublishOnly so publish artifacts are generated without .map files. Keep compiled JS output unchanged.
Impact:

Eliminates noisy Honeybadger 404s caused by missing src paths referenced by distributed sourcemaps. Maintains existing runtime behavior and bundle contents.

Launch Checklist

  • Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
  • Manually test the debug page.
  • Write tests for all new functionality and make sure the CI checks pass.
  • Document any changes to public APIs.
  • Post benchmark scores if the change could affect performance.
  • Tag @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes.
  • Tag @mapbox/gl-native if this PR includes shader changes or needs a native port.
  • Tag @mapbox/gl-native if this PR disables any test because it also needs to be disabled on their side.
  • Create a ticket for gl-native to groom in the MAPSNAT JIRA queue if this PR includes shader changes or features not present in the native side or if it disables a test that's not disabled there.

…nal-1596)

Prevent sourcemap-related 404s in production error reporting by disabling distributable sourcemaps during publish builds.

Background:

Root cause was introduced in: Do not include source in NPM package (internal-1596)
Commit: 8bbf4bd
Since src/ is no longer shipped in the npm package, sourcemap sources pointing to src/* cause Honeybadger/browser fetch attempts to return 404.
Changes:

Add env-controlled sourcemap toggle for Rollup dist outputs.
Set NO_DIST_SOURCEMAPS=true in prepublishOnly so publish artifacts are generated without .map files.
Keep compiled JS output unchanged.
Impact:

Eliminates noisy Honeybadger 404s caused by missing src paths referenced by distributed sourcemaps.
Maintains existing runtime behavior and bundle contents.
@anthony0030 anthony0030 requested a review from a team as a code owner March 31, 2026 12:56
@anthony0030 anthony0030 requested review from stepankuzmin and removed request for a team March 31, 2026 12:56
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 31, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

Hey, @anthony0030 👋 Thanks for your contribution to Mapbox GL JS!

Important: This repository does not accept direct merges. All changes go through our internal review process.

What happens next:

  1. A team member will review your PR here first
  2. If it looks good, they will import it to our internal repository for further review
  3. If approved, changes will be synced back here via our release process

Please respond to any review comments on this PR. For more details, see CONTRIBUTING.md.

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.

2 participants