Skip to content

v5.0.0-rc.0

Pre-release
Pre-release

Choose a tag to compare

@KidkArolis KidkArolis released this 21 May 15:07
· 15 commits to master since this 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 { ... }. Use jetpack.config.cjs for CommonJS config.
  • Public API exports were trimmed:
    • jetpack now exports only defineConfig and resolveConfig
    • jetpack/serve now exports a serve(config) factory
    • jetpack/rspack.config moved to jetpack/rspack-config
    • jetpack/options and jetpack/proxy were removed; the proxy config option still works
  • Build targets changed. Use --target modern|legacy|all and target: 'modern' | 'legacy' | 'all' instead of --modern, --legacy, or target: { modern, legacy }.
  • The modern browser target changed from Browserslist defaults to baseline widely available with downstream.
  • Dropped the implicit ./src/index.js entry fallback.
  • Removed -x / --exec and the exec config option.
  • Renamed, moved, or removed several config options:
    • publicPath -> assetBaseUrl
    • dist -> build.outDir
    • build options -> build.outDir, build.sourceMaps, build.minify, and build.chunkLoadRetry
    • HTML options -> html.title, html.cspNonce, and html.render
    • polyfills is now top-level: polyfills: 'usage' | 'entry' | false
    • removed static, config-file dir, and css.features
  • For advanced customization, use the rspack config hook. The old webpack hook alias was removed, rspack(config, options) is now rspack(config, context)
  • sass-loader resources should use additionalData.

Fixes

  • Fixed --no-hot and --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 nested build, html, css, and assets overrides.
  • Asset filenames now use [contenthash:8] for better cache busting.
  • jetpack inspect now writes a self-contained dist/inspect.html treemap 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, and clean --dry-run.
  • Added --log=all and --log=silent presets.
  • Added a define option for build-time constants backed by rspack.DefinePlugin.
  • Added context.findLoader(name) to the rspack config hook for customizing generated loaders by string or RegExp.
  • Added assets.inlineLimit to control which image assets are inlined as data URLs. Fonts and media are now emitted as files.
  • Added transpileDependencies to control dependency JS transpilation: use true, 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.