Skip to main content


ยท 4 min read

Framework improvements, eslint fixes, better config directory support, and more.

Updates available

There are patches available for this release. Please update to 6.12.3.

๐Ÿ“ฆ tailwindcss 3.3.0 supportedโ€‹

bud.js now supports the new configuration options from tailwindcss 3.3.0. tailwind configs can now be authored with typescript or esm.

๐Ÿงน default storage location: .budfiles -> os cache dirโ€‹

Less junk in your project is always good, right? The new default @storage directory is now [os-cache dir]/bud-nodejs/[hash of project path].

Breaking change: If you are explicitly setting the @storage directory you need to do it using the --storage CLI flag or the APP_STORAGE_PATH .env variable. By the time config files have been processed most reads and writes to @storage will have already occurred, so bud.setPath won't be effective. There will be a warning logged to the console if you are doing this; the main adverse effect will be slower builds when bud.js can't find caches during bootstrapping.

Potentially breaking change: If you are using remote modules (which lets you import modules from cdns like skypack without installing locally) the bud.lock lockfile will now be written to the root of your project (unless you have configured it to be written somewhere else).

โœจ Config files can be written in TypeScript (without extensions)โ€‹

bud.js configuration files can now be authored in typescript without installing any additional extensions. if you were previously using the ts-bud binary you still can (it executes the bud.js runtime with ts-node), but you can now just use the standard bud command (it is faster). ts-bud remains available in case you were doing some deeper integration with ts-node.

The parsing of TypeScript configs is handled with esbuild-wasm. I have not been able to measure a meaningful difference in timings using this package instead of esbuild and the wasm binary doesn't need to be built so installs are a lot faster. However, if you want to use esbuild instead of esbuild-wasm you can install esbuild as a project dependency and it will be used instead. Again, I don't think it's worth the extra installation time. Especially since the results of config transforms are cached.

This also applies to eslint, tailwindcss, postcss and babel configs.

โœจ Config files can be stored in ./config directoryโ€‹

bud.js configuration files can now be stored in the config directory. This also applies to eslint, tailwindcss, postcss and babel configs.

โœจ @roots/bud-eslint: upgrade eslint-webpack-plugin to v4โ€‹

eslint-webpack-plugin@4 removes need for eslint cache fix

If you were disabling the fix with bud.eslint.cacheFix.enable(false) before you will be prompted to remove that call, as it is now deprecated.

See #2191

๐ŸŽ๏ธ performance: module resolution cachingโ€‹

Module paths resolved by bud.module are cached to [cachedir]/resolutions.yml. This gives a nice performance boost since we can skip a lot of lookups:

The resolve and import methods used by bud.module treat built-in dependencies as fallbacks. So, if you aren't overriding any built-in dependencies and the cache is valid the net result is more than half as many calls to importMetaResolve and import statements.

  • sha1 hashes are calculated for files in root and config/* and an artifact is output to [cachedir]/checksum.yml.
  • Hash mismatches in config files or package.json will invalidate the bud.module resolver cache and the compiler cache.

๐ŸŽ๏ธ performance: reuse context & bud instancesโ€‹

bud.context is now re-used between bootstrap scripts and the cli application.

โœจ improve: unified error handlingโ€‹

Now extending modern-errors for unified error handling.

๐Ÿฉน fix: no postinstall scripts in CIโ€‹

There are some reliability issues with postinstall scripts (for @roots/bud-framework and @roots/browserslists-config) running in CI.

This update disables postinstall scripts when process.env.CI is set (default for gh actions).

See #2169

โœจ improve(@roots/eslint-config): remove react-in-jsx-scopeโ€‹

This rule is not really appropriate as a default for modern React.

See #2154

๐Ÿ‘ฉโ€๐Ÿ”ฌ experimental: pnpm supportโ€‹

Installs with pnpm should work now. They may break again in the future, but we're closer to being able to claim full compatibility. You must install with public hoisting:

pnpm install --public-hoist-pattern=*

pnpm installs peers by default as of pnpm v8 ๐ŸŽ‰, so we suspect that compatibility will be a lot better once people upgrade.

๐Ÿ“ฆ upgrade ink to v4โ€‹

A ton of workarounds were required to make ink work prior to this upgrade. It's now compatible with react 18 and fully esm ๐ŸŽ‰.

๐Ÿ“• Documentation improvementsโ€‹

  • Thanks to @chrillep for improving the @roots/bud-eslint documentation example config
  • Adds documentation for bud.config
  • Improves documentation for bud.define
  • Adds pnpm installation instructions to getting started guide