Skip to content

build(css): resolve @import in unminified CSS output - #44

Open
Hug0-Drelon wants to merge 2 commits into
masterfrom
build/css-resolve-import-unminified
Open

build(css): resolve @import in unminified CSS output#44
Hug0-Drelon wants to merge 2 commits into
masterfrom
build/css-resolve-import-unminified

Conversation

@Hug0-Drelon

Copy link
Copy Markdown
Member

What?

Resolve CSS @import statements at build time for both unminified (.css) and minified (.min.css) outputs.

Why?

Closes the gap where only minified CSS had imports bundled, forcing plugins to ship css/build/lib/ partials for SCRIPT_DEBUG users. Aligns CSS with the existing JS bundling behavior (part of polylang/polylang-pro#1430).

How?

  • Remove CopyPlugin from transformCssEntry; emit [name].css and [name].min.css from the same entry.
  • Bump to v2.4.0; drop copy-webpack-plugin peer dependency.
  • Add unit and integration tests for the CSS transformer.

Test plan

  • npm test passes (51 tests)
  • Publish @wpsyntex/polylang-build-scripts@2.4.0 before merging dependent PRs

Bundle CSS @import statements at build time for both .css and .min.css
outputs, mirroring the existing JS build behavior and removing the need
for css/build/lib/ copy workarounds.
@Hug0-Drelon Hug0-Drelon self-assigned this Sep 2, 2026
@Hug0-Drelon Hug0-Drelon added the enhancement New feature or request label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant