Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Fix source map source path when using multiple environments, see #6450 (comment)

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 28, 2025 08:25
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 64eb057
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/690081439b40b10008258382
😎 Deploy Preview https://deploy-preview-6456--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 57 (🔴 down 9 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

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

This PR fixes an issue with source map generation when using multiple environments with different output paths. The fix ensures that source paths in source maps are correctly calculated relative to each environment's specific distPath rather than using a shared global path.

Key Changes:

  • Updated the source map plugin to use environment-specific distPath instead of the global context's distPath
  • Added test coverage for multi-environment source map generation

Reviewed Changes

Copilot reviewed 4 out of 9 changed files in this pull request and generated no comments.

File Description
packages/core/src/plugins/sourceMap.ts Changed to use environment-specific distPath parameter instead of global context
e2e/cases/source-map/multi-environments/src/index.js Added simple test source file
e2e/cases/source-map/multi-environments/rsbuild.config.ts Added test configuration with two environments having different output paths
e2e/cases/source-map/multi-environments/index.test.ts Added test to verify correct relative paths in source maps for each environment

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

@chenjiahan chenjiahan merged commit f221010 into main Oct 28, 2025
10 of 11 checks passed
@chenjiahan chenjiahan deleted the source_map_path_1028 branch October 28, 2025 08:49
@chenjiahan chenjiahan mentioned this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants