This release is mainly focused around addressing errors related to @roots/bud-preset-wordpress and @roots/sage users.
Fixed: module reload problems
The origin of this problem stems from WordPress not enqueuing assets that depend on wp-react-refresh-runtime
if the WordPress config variable SCRIPT_DEBUG
is not true
. bud.js will now check the SCRIPT_DEBUG
env variable, and if true
will use wp-react-refresh-runtime
. Otherwise, that runtime will be included in the bundle and the script dependency will be left undeclared. In lieu of an environment variable you can call bud.wp.setScriptDebug(true)
in your bud.js configuration.
If you opt in (either by calling the config function or setting the environment variable) you must make sure it is set in your WordPress config. If you do nothing, you’ll probably be fine, but we recommend either setting the environment variable or calling the new config function if you experience conflicts between the WordPress core dev runtime and bud.js dev runtime.
Feature: Support for mapping tailwindcss theme.spacing
values to theme.json
Call bud.wp.json.useTailwindSpacing()
to source spacing values from your tailwind config.
Fix: Node 16 compatibility
Downgraded globby from v14 to v13 so as to maintain compatibility with Node 16. We will be moving to Node 20 with the next major release of bud.js but we want to maintain compatibility with Node 16 for all bud@6.x.x releases. You should see major benefits in performance and reliability using Node 20 so we definitely recommend upgrading as soon as possible, if you can.
What’s Changed
- deps(patch): downgrade globby to v13 by @kellymears in 📦 deps(patch): downgrade globby to v13 by kellymears · Pull Request #2532 · roots/bud · GitHub
- fix(patch): WordPress module reload failures by @kellymears in https://github.com/roots/bud/pull/2530
- deps(patch): upgrade dependencies by @kellymears in https://github.com/roots/bud/pull/2534
- feat(patch): add theme.spacing support to theme.json generator by @kellymears in https://github.com/roots/bud/pull/2528
Full Changelog: https://github.com/roots/bud/compare/v6.19.1...v6.20.0