v5.0.0-rc.0
Pre-release
Pre-release
Breaking changes
- Updated to Rspack 2.0. If you customize Rspack, see the Rspack v1 -> v2 migration guide.
- Jetpack is now ESM-only. Use
import,require('jetpack/...')is no longer supported. - Use ESM config in
"type": "module"projects:export default { ... }. Usejetpack.config.cjsfor CommonJS config. - Public API exports were trimmed:
jetpacknow exports onlydefineConfigandresolveConfigjetpack/servenow exports aserve(config)factoryjetpack/rspack.configmoved tojetpack/rspack-configjetpack/optionsandjetpack/proxywere removed; theproxyconfig option still works
- Build targets changed. Use
--target modern|legacy|allandtarget: 'modern' | 'legacy' | 'all'instead of--modern,--legacy, ortarget: { modern, legacy }. - The modern browser target changed from Browserslist
defaultstobaseline widely available with downstream. - Dropped the implicit
./src/index.jsentry fallback. - Removed
-x/--execand theexecconfig option. - Renamed, moved, or removed several config options:
publicPath->assetBaseUrldist->build.outDir- build options ->
build.outDir,build.sourceMaps,build.minify, andbuild.chunkLoadRetry - HTML options ->
html.title,html.cspNonce, andhtml.render polyfillsis now top-level:polyfills: 'usage' | 'entry' | false- removed
static, config-filedir, andcss.features
- For advanced customization, use the
rspackconfig hook. The oldwebpackhook alias was removed,rspack(config, options)is nowrspack(config, context) sass-loaderresources should useadditionalData.
Fixes
- Fixed
--no-hotand--no-minify. - Unknown commands now fail instead of being treated as entry paths.
- Extra positional CLI arguments now fail instead of being ignored.
resolveConfig({ overrides })now honors the full public config shape, including nestedbuild,html,css, andassetsoverrides.- Asset filenames now use
[contenthash:8]for better cache busting. jetpack inspectnow writes a self-containeddist/inspect.htmltreemap and opens it automatically in interactive runs.
Improvements
- Runtime asset URLs now work better for CDN deployments and sub-path mounts.
- Added command-specific help,
dev --host,clean --yes, andclean --dry-run. - Added
--log=alland--log=silentpresets. - Added a
defineoption for build-time constants backed byrspack.DefinePlugin. - Added
context.findLoader(name)to therspackconfig hook for customizing generated loaders by string orRegExp. - Added
assets.inlineLimitto control which image assets are inlined as data URLs. Fonts and media are now emitted as files. - Added
transpileDependenciesto control dependency JS transpilation: usetrue,false, a package list, or{ include, exclude }. - Expanded asset extension list:
avif,webp,bmp,ico,aac,flac,m4a,mp3,opus,wav,m4v. - Replaced webpack dev middleware/HMR with Rspack dev-server and added Jetpack's development error overlay.
- Smaller install: dropped seven runtime dependencies in favour of Node built-ins.