-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts: Import CSS files before optimization #61121
Scripts: Import CSS files before optimization #61121
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
405718b
to
477c36d
Compare
@gziolo A few tests have failed at npm install. Should I rebase and force push this PR? Would you have some time to review it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as advertised in my testing. It will need a rebase to resolve conflicts with the latest changes in trunk
.
It would be also nice to add an entry in the changelog file under ## Unreleased section
:
### Enhancements
- Inlines CSS files imported from other CSS files before optimization in the `build` command ([#61121](https://github.com/WordPress/gutenberg/pull/61121)).
477c36d
to
2806097
Compare
2806097
to
a401b48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for taking it to the finish line.
* Import CSS files before optimization Closes WordPress#61112. * Update changelog Co-authored-by: benoitchantre <[email protected]> Co-authored-by: gziolo <[email protected]>
There is a new report that references this PR: Is it possible that there is more work necessary to make this additional loader configured accordingly? At the moment, it uses the default config: require( 'postcss-import' ), |
@gziolo I will not be able to find the required time to look for an additional configuration. The easiest path if nobody can jump on this would be to revert this commit. |
I opened a PR that reverts the changes: #66975. |
What?
Import CSS files before the minification process.
Closes #61112.
Why?
Small performance improvement for people using CSS imports and the @wordpress/scripts package.
How?
postcss-import is run before cssnano
Testing Instructions
npm run build
Testing Instructions for Keyboard
Screenshots or screencast