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 🥇 |
|
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 devandnpm run buildstill 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-scriptscd esnext-example../node_modules/.bin/wp-scripts startbuildfolder.../node_modules/.bin/wp-scripts buildbuildfolder.npm run devfor Gutenberg works as expected.Checklist: