Skip to content

Conversation

@hai-x
Copy link
Member

@hai-x hai-x commented Nov 29, 2025

Summary

What kind of change does this PR introduce?

TODO

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

If relevant, what needs to be documented once your changes are merged or what have you already documented?

devtool and experiments.css

@changeset-bot
Copy link

changeset-bot bot commented Nov 29, 2025

⚠️ No Changeset found

Latest commit: 222c667

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 29, 2025

This PR is packaged and the instant preview is available (222c667).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@222c667
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@222c667
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@222c667

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 29, 2025

CodSpeed Performance Report

Merging #20191 will not alter performance

Comparing feat-css-devtool (222c667) with main (e8dca82)

Summary

✅ 72 untouched

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Looks good, let's add a test cases

Another problem - we should allow to set CSS source map values by user too, like hidden-source-map and etc

So I am think about to allow devtool accepts arrays, but because we can't change devtool type for webpack@5, let's add an internal option (devtoolByTypes, maybe better name in normalization) and store source map values for types there, i.e.

devtool can be string | { test: Rule, type: "source-map" | "hidden-source-map" | "etc" }, but then in normalization we found a JS value and set it to devtool (to keep devtool a string), technically we can just take the first value of an array (but feel free to think here)