Skip to content

Build: Fix CSS rebuilds#73380

Merged
youknowriad merged 1 commit intotrunkfrom
fix/css-watch-rebuild
Nov 24, 2025
Merged

Build: Fix CSS rebuilds#73380
youknowriad merged 1 commit intotrunkfrom
fix/css-watch-rebuild

Conversation

@youknowriad
Copy link
Contributor

What?

Fixes SCSS file changes in dependencies not being reflected in dependent packages during watch mode.

Why?

When editing SCSS files in one package (e.g., global-styles-ui), packages that import the compiled CSS from that package's build-style/ directory (e.g., edit-site) weren't automatically rebuilding. The watch mode was only rebundling scripts but not recompiling styles for dependent packages.

How?

Added compileStyles() call for affected packages before rebundling them in watch mode. This ensures CSS is recompiled for all packages that depend on the changed package.

Testing Instructions

  1. Run npm run dev
  2. Edit packages/global-styles-ui/src/style.scss and save
  3. Verify that packages/edit-site/build-style/style.css is automatically updated
  4. Verify no manual save of edit-site/src/style.scss is needed

Closes #73373

@youknowriad youknowriad requested a review from t-hamano November 18, 2025 08:58
@youknowriad youknowriad self-assigned this Nov 18, 2025
@youknowriad youknowriad added the [Type] Build Tooling Issues or PRs related to build tooling label Nov 18, 2025
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: youknowriad <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the quick fix.

@youknowriad youknowriad merged commit c045ec0 into trunk Nov 24, 2025
39 checks passed
@youknowriad youknowriad deleted the fix/css-watch-rebuild branch November 24, 2025 12:42
@github-actions github-actions bot added this to the Gutenberg 22.2 milestone Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build v2: SCSS file changes in dependencies are not reflected in dependent packages during watch mode

2 participants