-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Build Tooling: Update development tools to work with PostCSS (try 2) #30347
Conversation
Screen.Recording.2021-03-29.at.15.17.33.mov |
Size Change: +1.63 kB (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
2821581
to
d2acef7
Compare
Co-authored-by: Kai Hao <kevin830726@gmail.com>
d2acef7
to
4ec3226
Compare
npm.run.dev.movI also upgraded Storybook to the stable version: Thank you @gwwar and @kevin940726 for help, much appreciated 🥇 |
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.
LGTM 👍
Reserving this comment for testing:
|
I hope it goes smoothly this time, and let's say hello to Storybook 6.2 🎉 |
I was seeing my changes not picked up. However before reporting this, I tested |
The above fixed the issue for me on the branch in which I was working. However I'm seeing npm run dev not working on this branch, despite being freshly rebased, and having run the nuclear reinstall: #30805 |
It must be related to the special handling that individual blocks have like |
I was using a non block theme. But switching to a block theme did not make it work, I'm afraid. |
That means it doesn't work in both cases. That's good feedback. So it looks like it generally works with CSS but might not work for the block library at all. |
Potentially. Feel free to try that branch, and make a change to the navigation block such as:
If you add that to a stylesheet after having started npm run dev, it should add red borders everywhere. |
Description
Fixes #27028.
Previous attempt: #27821.
This should allow to use @wordpress/scripts with PostCSS 8 but doesn't actually require it since it doesn't have it as a dependency at all.
See also https://github.com/webpack-contrib/postcss-loader/blob/v4.1.0/CHANGELOG.md
This PR also further improves the watch options for webpack build as tried in #30343 that caused the revert of #27821.
I also upgraded Storybook to the latest version:
6.2.5
(it was rc.8 before).How has this been tested?
npm run dev
andnpm run build
still work properly,Create Block still build correctly. Testing is a bit cumbersome but it follows what happens on CI (https://github.com/WordPress/gutenberg/blob/master/bin/test-create-block.sh):
npx wp-create-block esnext-example --no-wp-scripts
cd esnext-example
../node_modules/.bin/wp-scripts start
build
folder.../node_modules/.bin/wp-scripts build
build
folder.npm run dev
for Gutenberg works as expected.Checklist: