npm @rspack/core 1.0.0-beta.0
v1.0.0-beta.0

latest releases: 1.1.0-beta.0, 1.0.14, 1.0.13...
3 months ago

Breaking Changes 🛠

Upgraded to latest SWC

@rspack/core now depends on swc_core v0.99 (previously v0.96).

If your project is using the SWC Wasm plugin, this will be a breaking change, and you will need to upgrade the SWC Wasm plugin to the latest version.

PR: #7292

Upgraded to webpack-dev-server v5

@rspack/cli now depends on webpack-dev-server v5 (previously v4).

If you are using @rspack/cli, please be aware of the following breaking changes:

  • The minimum supported Node.js version of webpack-dev-server@5 is 18.12.0.
  • The devServer configuration options for Rspack include several breaking changes. Please refer to the webpack-dev-server v5 migration guide for more details.

PR: #7292

Deprecated @rspack/plugin-minify

rspack/plugin-minify has been deprecated as it was a temporary package to support Terser.

Now Rspack has full support for terser-webpack-plugin. If you need to use Terser as the minimizer, we recommend using terser-webpack-plugin instead of @rspack/plugin-minify:

// rspack.config.js
- const MinifyPlugin = require('@rspack/plugin-minify');
+ const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
  optimization: {
    minimize: true,
    minimizer: [
-    new MinifyPlugin({ minifier: 'terser' }),
+    new TerserPlugin(),
    ],
  },
};

PR: #7307

All Changes

Performance Improvements ⚡

  • perf: reduce allocation for Stats by @h-a-n-a in #7124
  • perf: reduce allocation for parsing by @h-a-n-a in #7219
  • perf: use Set as Queue to solve the duplication by @JSerFeng in #7233
  • perf: reduce allocation for ModuleRule matching by @h-a-n-a in #7249
  • perf: reduce large pre-allocations for JavascriptParser::new by @h-a-n-a in #7286
  • perf: faster hasher for Ukeys by @ahabhgk in #7287
  • perf: a bunch of small improvement for ConcatenatedModule by @CPunisher in #7257
  • perf: reduce allocation for adding dependencies by @h-a-n-a in #7301

Exciting New Features 🎉

  • feat: support output.charset and output.chunkLoadTimeout by @xc2 in #7189
  • feat: support __webpack_get_script_filename__ by @LingyuCoder in #7203
  • feat: support webpack_exports_info by @LingyuCoder in #7205
  • feat: external callbacks receive contextInfo.issuer by @fi3ework in #7210
  • feat: support destructuring of import.meta by @LingyuCoder in #7229
  • feat: support tree shaking with awaiting dynamic import by @LingyuCoder in #7230
  • feat: align publicPath options with webpack by @xc2 in #7216
  • feat: support lightningcss-loader by @JSerFeng in #7214
  • feat: support compilation.chunkGroups and compilation.namedChunkGroups by @LingyuCoder in #7254
  • feat(create-rspack): add vanilla templates by @chenjiahan in #7295
  • feat: support EntryPlugin filename function by @9aoy in #7297
  • feat: support test, include and exclude options for LightningCssMinimizerRspackPlugin by @simonxabris in #7290

Bug Fixes 🐞

Document Updates 📖

Other Changes

  • refactor: allows minimal/detailed/summary stats presets in configuration by @xc2 in #7186
  • chore(deps): add check-dependency-version for devDependencies by @SoonIter in #6323
  • refactor: allow passing function type to assets generator.filename by @xc2 in #7206
  • chore(deps): unify dependencies with check-depedency-version by @SoonIter in #7208
  • test: full enable some webpack stats test cases by @LingyuCoder in #7213
  • test: enable webpack test cases of webpackHot.data by @LingyuCoder in #7217
  • ci(website/infra): lint-staged issue in website by @SoonIter in #7224
  • test: enable preact refresh snapshot test by @LingyuCoder in #7232
  • test: enable more available tests by @JSerFeng in #7234
  • test: enable inner graph basic webpack test case by @LingyuCoder in #7237
  • chore(deps): typescript phantom dependence by @SoonIter in #7235
  • ci: speedup free disk space job by @xc2 in #7241
  • refactor: change ansiHTML to ts and esm by @wxiaoyun in #7244
  • refactor(typescript): refactor packages/rspack/src/util from js to ts and esm by @jithyan in #7246
  • refactor: remove duplicated extract member expression info by @LingyuCoder in #7248
  • chore(deps): update zod to ^3.23.8 by @colinaaa in #7253
  • test: add test case for runtime condition by @LingyuCoder in #7250
  • refactor(typescript): packages/rspack/src/config from js to ts/esm by @jithyan in #7255
  • refactor(typescript): loader runner to ts by @wxiaoyun in #7247
  • chore(infra/biome): rule useEnumInitializers by @shulaoda in #7260
  • chore(infra/biome): rule useLiteralKeys by @shulaoda in #7261
  • chore(infra/biome): rule noSvgWithoutTitle by @shulaoda in #7262
  • chore(infra/biome): rule noDoubleEquals by @shulaoda in #7265
  • chore(infra/biome): rule noForEach by @shulaoda in #7266
  • chore(infra/biome): rule useSelfClosingElements by @shulaoda in #7267
  • chore(infra/biome): rule useButtonType by @shulaoda in #7268
  • refactor(typescript): packages/rspack/src/template from js to ts and esm by @shulaoda in #7258
  • ci(fix): jest error in rspack-dev-server by @SoonIter in #7282
  • ci: fix jest error of rspack-dev-server by @SoonIter in #7284
  • chore(infra/biome): rule noUselessElse by @shulaoda in #7263
  • refactor: reuse binary evaluation expression and support null coalescing by @LingyuCoder in #7280
  • ci: solve slow build & test in windows by @SyMind in #7294
  • test: add diff test case of concatenated runtime condition by @LingyuCoder in #7296
  • refactor(plugin/css-extract): use typescript for css-extract-hmr by @wxiaoyun in #7245
  • chore(ci): fix ci wrong by @SyMind in #7302
  • chore: run prebundle when prepare by @colinaaa in #7304
  • test: move native loader test to rspack-test-tools by @colinaaa in #7303
  • refactor: using object form of lightningcss feature options by @JSerFeng in #7311

New Contributors

Full Changelog: v1.0.0-alpha.5...v1.0.0-beta.0

Don't miss a new core release

NewReleases is sending notifications on new releases.