Scripts: The build
command does not minify CSS files
#33643
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Status] In Progress
Tracking issues with work in progress
[Tool] WP Scripts
/packages/scripts
[Type] Bug
An existing feature does not function as intended
Description
When using
@wordpress/scripts
,npm run build
does not minify CSS files (from /src to /build) - but it does minify SCSS files.Also see https://wordpress.slack.com/archives/C5UNMSU4R/p1626967073250600.
Step-by-step reproduction instructions
Create a very basic project:
package.json
:/src/index.css
:/src/index.js
:npm install
.npm run build
.Expected behaviour
There should be a minified
index.css
file in/build
.Actual behaviour
index.css
is not minified, but just an unminified copy from/src
.(The
index.js
andindex.asset.php
files are fine.)The console output of
npm run build
isIf all this is done with a SCSS file
/src/index.scss
, the/build/index.css
is properly minified. Thus, this seems to be affecting CSS files only!Version information
The text was updated successfully, but these errors were encountered: