Skip to content

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

@t-hamano

Description

@t-hamano

Description

Some packages import compiled CSS files, for example, the edit-site package imports the following CSS file:

@use "@wordpress/admin-ui/build-style/style.css" as admin-ui;
@use "@wordpress/dataviews/build-style/style.css" as dataviews;
@use "@wordpress/fields/build-style/style.css" as fields;
@use "@wordpress/global-styles-ui/build-style/style.css" as global-styles-ui;

This can be a bit confusing during development, as when a dependency style is recompiled, the dependent package is not recompiled.

cc @youknowriad

Step-by-step reproduction instructions

Below is one way to reproduce the problem.

  • npm run dev
  • Make changes to the packages/global-styles-ui/src/style.scss file and save it.
    • ✅ The packages/global-styles-ui/build-style/style.css file will be updated immediately.
    • ❌ The packages/edit-site/build-style/style.css file will not be updated.
    • ❌ The build/styles/edit-site/style.css file will not be updated.
  • Simply resave the packages/edit-site/src/style.scss file.
    • ✅ The packages/edit-site/build-style/style.css file will not be updated.
    • ✅ The build/styles/edit-site/style.css file will not be updated.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions