Skip to content

fix: changeDevtoolModuleFilename not work problem#1402

Merged
yifancong merged 2 commits intomainfrom
fix/devtoolModuleFilenameTemplate
Nov 12, 2025
Merged

fix: changeDevtoolModuleFilename not work problem#1402
yifancong merged 2 commits intomainfrom
fix/devtoolModuleFilenameTemplate

Conversation

@yifancong
Copy link
Contributor

@yifancong yifancong commented Nov 12, 2025

Summary

This mr fix two problem:

  1. changeDevtoolModuleFilename not work, when set the output.changeDevtoolModuleFilename === '[absolute-resource-path]' , this not work.
  2. source-map's _absoluteSources has wrong source path, so set consumer._absoluteSources = consumer._sources;.

Related Links

Copilot AI review requested due to automatic review settings November 12, 2025 07:50
@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit c76e3e5
🔍 Latest deploy log https://app.netlify.com/projects/rsdoctor/deploys/691441ec83c61b0009573395
😎 Deploy Preview https://deploy-preview-1402--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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 where the changeDevtoolModuleFilename configuration was not being applied correctly. The fix includes:

  • Updating rspack dependencies from v1.4.11 to v1.6.1
  • Adding fallback fields (moduleIdentifier and moduleName) to handle differences in rspack's stats API
  • Correcting the devtoolFallbackModuleFilenameTemplate to be a function
  • Moving the changeDevtoolModuleFilename call outside the compilation hook to ensure it runs once during compiler setup

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-lock.yaml Updates rspack dependencies from v1.4.11 to v1.6.1 and removes unused packages
packages/types/src/plugin/baseStats.ts Adds moduleIdentifier and moduleName fields as alternatives to support rspack stats format
packages/graph/src/transform/module-graph/transform.ts Implements fallback logic to use moduleIdentifier/moduleName when identifier/name are missing
packages/core/src/inner-plugins/plugins/bundle.ts Fixes changeDevtoolModuleFilename to run once during apply and corrects the fallback template to be a function
examples/*/package.json Updates rspack dependencies to v1.6.1 in example projects
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@yifancong yifancong removed the request for review from fi3ework November 12, 2025 08:36
Copy link
Member

@fi3ework fi3ework left a comment

Choose a reason for hiding this comment

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

could you add a more detailed description? i really didn't get what this PR resolves.

@yifancong
Copy link
Contributor Author

could you add a more detailed description? i really didn't get what this PR resolves.

OK

@yifancong yifancong merged commit aaa31cf into main Nov 12, 2025
9 checks passed
@yifancong yifancong deleted the fix/devtoolModuleFilenameTemplate branch November 12, 2025 11:27
@yifancong yifancong mentioned this pull request Nov 13, 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.

3 participants