github web-infra-dev/rspack v1.0.0-beta.5

latest releases: v1.0.5, v1.0.4, v1.0.3...
one month ago

Highlights

Improved HtmlRspackPlugin

rspack.HtmlRspackPlugin has a lot of improvements to be more in line with the html-webpack-plugin.

  • [Feat] Support hash to append compilation hash
  • [Feat] Support base to inject base tag
  • [Feat] Support scriptLoading=systemjs-module
  • [Feat] Support [templatehash] in filename template, same as [contenthash]
  • [Breaking] Rename excludedChunks to excludeChunks, aligned with html-webpack-plugin
  • [Breaking] Minify html by default when mode=production
  • [Fix] No doctype parsing error
  • [Fix] Win32 relateive path
  • [Fix] Relative favicon path
  • [Fix] Wrong & escaping in script.src and link.href
  • [Test] Passed html-webpack-plugin basic cases from 45 to 85

PR: #7577

Removed SwcCssMinimizerRspackPlugin

The rspack.SwcCssMinimizerRspackPlugin has been removed to reduce binary size, please use LightningCssMinimizerRspackPlugin instead:

module.exports = {
  optimization: {
    minimizer: [
-     new rspack.SwcCssMinimizerRspackPlugin({
+     new rspack.LightningCssMinimizerRspackPlugin({
        // options
      }),
    ],
  },
};

Rspack also supports using css-minimizer-webpack-plugin.

What's Changed

Breaking Changes 🛠

  • feat!: improve HtmlRspackPlugin by @LingyuCoder in #7577
  • refactor!: disable css minify in html minify and remove SwcCssMinimizerRspackPlugin by @ahabhgk in #7547

Performance Improvements ⚡

Exciting New Features 🎉

  • feat: second param for loader hook by @SyMind in #7537
  • feat(create-rspack): configure Lightning CSS targets by default by @chenjiahan in #7579
  • feat(core): don't inject bundlerInfo in library mode by @hardfist in #7567
  • feat: extract-css-plugin supports layer by @JSerFeng in #7583

Bug Fixes 🐞

  • fix: use intersection runtime for concat module code gen by @ahabhgk in #7523
  • fix: chunk hash unstable by @JSerFeng in #7534
  • fix: should insert semi after import, export, debugger and class field by @CPunisher in #7529
  • fix: check SuperProp in walk_call_expression by @CPunisher in #7530
  • fix: remove useless "module" external runtime by @fi3ework in #7533
  • fix(rust-core): no need to pass resolve_factory when using rust api by @hardfist in #7539
  • fix(cli): wrong entry defaults from cli by @xc2 in #7541
  • fix: source map plugin module should enable by default by @ahabhgk in #7545
  • fix: avoid inner graph top level symbol for nested webpack_require by @ahabhgk in #7584

Document Updates 📖

Other Changes

  • refactor(typescript): packages/rspack/src/node/NodeWatchFileSystem by @wxiaoyun in #7528
  • chore(infra): improve the configuration of justfile by @shulaoda in #7526
  • chore: polish some words on introduction by @hardfist in #7557
  • chore(deps): update cargo-bins/cargo-binstall action to v1.10.2 by @renovate in #7564
  • test(plugin): test html plugin with basic cases of html-webpack-plugin by @LingyuCoder in #7571
  • chore(deps): bump plugin-react-refresh and lite-tapable to v1.0.0 by @chenjiahan in #7580
  • refactor: improve esm harmony dependencies structure by @shulaoda in #7576
  • refactor: module hash by @ahabhgk in #7569

Full Changelog: v1.0.0-beta.4...v1.0.0-beta.5

Don't miss a new rspack release

NewReleases is sending notifications on new releases.