Skip to content

fix: generated path inside sourcemaps#1273

Open
danielbarion wants to merge 1 commit into
masterfrom
fix/ISSUE-1272-source-maps
Open

fix: generated path inside sourcemaps#1273
danielbarion wants to merge 1 commit into
masterfrom
fix/ISSUE-1272-source-maps

Conversation

@danielbarion
Copy link
Copy Markdown
Member

@danielbarion danielbarion commented May 16, 2026

closes #1272

Summary by CodeRabbit

  • Chores
    • Improved source map path handling in production builds for better debugging experience with generated files.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ae3a2dd1-e8b0-4dcb-b0db-99aa51c5cdfe

📥 Commits

Reviewing files that changed from the base of the PR and between 0368a0c and 4ddc812.

📒 Files selected for processing (1)
  • rollup.config.prod.mjs

📝 Walkthrough

Walkthrough

The production build configuration now normalizes source map paths generated during TypeScript compilation. A sourcemapPathTransform function rewrites malformed relative paths to ensure bundled source maps correctly reference their original sources relative to the final dist/ output directory.

Changes

Source Map Path Normalization

Layer / File(s) Summary
Source map path transform configuration
rollup.config.prod.mjs
Adds sourcemapPathTransform to Rollup output to normalize TypeScript-generated source map paths by replacing patterns of repeated ../ segments and /src/ with a single ../src/ reference, ensuring source maps resolve correctly from the bundle location.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 In dist/ where bundles do dwell,
Source maps once wandered through paths gone to hell,
A regex appears with a caring transform,
Now ../src/ points true, the new norm!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: generated path inside sourcemaps' accurately describes the main change: fixing sourcemap path generation issues in the Rollup configuration.
Linked Issues check ✅ Passed The code change directly addresses issue #1272 by implementing a sourcemapPathTransform function to normalize and fix incorrect sourcemap paths.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to the Rollup configuration file with only sourcemap path transformation logic, directly addressing the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ISSUE-1272-source-maps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Beta version released with the last commit 🚀

yarn add react-tooltip@6.0.3-beta.1273.rc.0

or

npm install react-tooltip@6.0.3-beta.1273.rc.0

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.

[BUG] Production version 6.x is asking for source maps

1 participant