If you prefer, read the v6.2.0 release notes on bud.js.org. If only for the table of contents.
This release introduces a new extension: @roots/bud-swc.
The extension registers support for swc.
If you have the extension installed
@roots/bud will privilege it over
@roots/bud-babel when it is available. So, you really can give it a go by just adding
@roots/bud-swc to your project dependencies when upgrading.
The swc project claims upwards of a 70x performance improvement over babel. I don’t see that in testing (MacOS ARM arch), but it is definitely faster (~20%).
I hear the difference is particularly pronounced in WSL2, although my means to test that is limited. Let me know how it goes!
For projects using a combination of
@roots/bud-react and either
@roots/bud-babel, react fast refresh is now enabled by default.
If you don’t want react fast refresh then you can disable it with:
If you are currently configuring fast-refresh using
bud.reactRefresh() you will need to update your call to use the new API.
Depending on your project you may be able to use typescript without babel. Why not try it and find out?
If you disable babel react-refresh will be enabled using the
react-refresh-typescript compiler plugin instead.
If you have installed this extension directly to your project you can remove it.
If you are using the new SWC extension terser will automatically be configured to use the swc minifier.
There was an issue with client scripts not being injected in zero configuration setups (more specifically: any setup that didn’t explicitly set entrypoints with bud.entry).
It’s been corrected; see #1506 for details
TypeScript users can call
bud typecheck to run typechecking outside of compilation. There are a couple requirements, at least for this initial effort:
- You must have
- You must have a
tsconfig.jsonin your project root
This is honestly not much more than a
tsc --noEmit alias right now.
But, it might be useful for you as-is and it will get better and more useful in future releases.
Thanks to @robrecord for a nice set of documentation fixes.