Bud v5.0.0
The most important change
You no longer need to explicitly require an extension in your configuration file or call bud.use to load it. Bud will automatically load the extensions you have installed.
Breaking
@roots/bud-clihas been deprecated. CLI functionality is packaged with@roots/bud.bud.usemethod is now asynchronous.bud.build.makemethod is now asynchronous.- Hook key
buildnow refers to an asynchronous filter. - Hook key
build.pluginsnow refers to an asynchronous filter. bud.extensions.enqueuecan be used to enqueue a plugin and returns Bud instance for chaining.@roots/budno longer exportsFramework. UseBudor importFrameworkfrom@roots/bud-frameworkinstead.
Added
-
Yaml, json5 and TypeScript config file support.
-
Multi-compiler support:
bud.makewill create a new Bud instance for you to configure.bud.getwill retrieve a previously made child instance for further configuration.bud.setallows setting a Bud instance as abud.childrenentry.bud.rootalways returns the parent compiler. If called from the parent it will return itself.bud.isRootwill be true in the parent context.bud.hasChildrenwill be true in the parent context if there are child Bud instances.
-
Several new hooks:
event.build.make.beforeis called just before the webpack config is created (async).event.build.make.afteris called just after the webpack config is created (async).event.compiler.beforeis called just before the final config is passed to webpack.event.compiler.afteris called just after the final config is passed to webpack.
-
New CLI commands:
- bud clean - removes dist and cache files
- bud doctor - check for missing peer dependencies and configuration errors
- bud install - automatically install/update required dependencies
- bud serve - start the development server and initiate hot module reloading
-
New
bud buildflags:- --target Target a specific Bud instance to be built in isolation. Can be passed multiple times to target more than one compiler.
- --[no]-cache Toggle filesystem caching. [default:
true] - --cache.type Set the cache type. Can be
filesystemormemory. [default:filesystem] - --location.[src|dist|project|storage] Set a project disk location
- --[no]-log - Toggle logging [default:
true] - --[no]-log.level - Set logging level (
v,vv,vvv,vvvv) [default:vvv] - --[no]-log.papertrail - Allow logger lines to overwrite the previous line from the same scope [default:
--no-log.papertrail] - --log-secret - Suppress a string from logger output (can use multiple times) [default:
--log-secret {cwd}] - --[no]-dashboard - Toggle the bud dashboard [default:
--dashboard] - ...many more! add --help after any command to see what options are available.
-
example project demonstrating how to use off-the-shelf webpack plugins with
bud.use
Improved
- Greatly improved performance. The entire Bud lifecycle is asynchronous.
- Installed extensions are now automatically registered and booted.
- Peer dependency requirements are now checked. Missing dependencies will not throw an error but will be logged.
- bud.use now supports using Webpack plugins directly.
- Informative logging.
- The CLI and dashboard have a fresh coat of paint.
- New notification center integration (MacOS only)
- Dashboard warnings and errors are now better displayed in the console.
Fixed
- bud.proxy - fixed proxy interceptor
- bud.serve - fixed development server public path
- bud.serve - disables module hashing in development mode. this is enforced
Internal
@roots/bud-typingshas been deprecated.- Added
@roots/yarn-plugin-kjoto provide utilities in theyarn @budnamespace.
Extension specific notes
The following notes only apply to specific extensions:
@roots/bud-tailwindcss- updated to version 3.@roots/bud-sass- usespostcss-scssto avoid syntax conflicts between sass and postcss.