Skip to content

fix: support sourcemaps stored in chunk.map#11

Open
RodionKorneev wants to merge 2 commits into
codex-team:mainfrom
RodionKorneev:fix/vite-sourcemap-detection
Open

fix: support sourcemaps stored in chunk.map#11
RodionKorneev wants to merge 2 commits into
codex-team:mainfrom
RodionKorneev:fix/vite-sourcemap-detection

Conversation

@RodionKorneev
Copy link
Copy Markdown

Fix sourcemap detection for Vite builds.

In some Vite/Rollup configurations sourcemaps are not emitted as separate
assets but attached to chunks via the map property:

{
  type: 'chunk', 
  fileName: 'chunk.js', 
  map: {...}
  // other props
}

The current implementation only checks for asset entries ending with .map,
which causes sourcemaps to be skipped.

This change adds support for chunk-based sourcemaps while preserving the
existing behaviour.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for Vite/Rollup configurations where sourcemaps are attached directly to chunk.map (instead of being listed as separate .map assets in the bundle metadata), so the plugin can still discover and upload sourcemaps.

Changes:

  • Update sourcemap filename detection to also consider chunk.map entries.
  • Preserve existing detection of .map assets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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