Skip to content


Choose a tag to compare
@hyf0 hyf0 released this 25 Apr 05:15
· 1559 commits to main since this release

Core features

Loader compatibility

style-loader + css-loader is now supported experimentally.

module.exports = {
  module: {
    rules: [
        test: /\.css$/,
        use: [
            loader: "style-loader",
            options: {
              esModule: false, // only `esModule: false` is supported right now.
        type: "javascript/auto",

thread-loader(requires pitching loader) and eslint-loader (can be used with enforce: 'pre') are also supported.

For more loader-compat examples, please visit example-loader-compat.

Inline loader

// Prefixing with ! will disable all configured normal loaders

// Prefixing with !! will disable all configured loaders (preLoaders, loaders, postLoaders)

// Prefixing with -! will disable all configured preLoaders and loaders but not postLoaders

Pitching loader

module.exports = function() {}
module.exports.pitch = function (remainingRequest, previousRequest, data) {
   if (someCondition) {
      return `require("!!${remainingRequest}")`

What's Changed

Performance Improvements ⚑

  • perf(rspack_core): reduce memory allocation when cloning RuntimeSpec by @Boshen in #2844
  • perf: avoid clone while matching import.meta.webpackHot by @hyf0 in #2857
  • perf: bailout if possible and ignore AstNode of type in ReactRefreshUsageFinder by @hyf0 in #2875
  • perf: compose loaders on the native side by @h-a-n-a in #2894

Exciting New Features πŸŽ‰

Bug Fixes 🐞

  • fix: preset env use unresolved_mark by @underfin in #2807
  • fix: πŸ› fix ci a is undefined by @IWANABETHATGUY in #2810
  • fix: error snap should be ordered by @IWANABETHATGUY in #2811
  • fix: support magic comment import( /* webpackChunkName: "/user/[id]/page" */ './foo') containing [id] by @GiveMe-A-Name in #2835
  • fix: use webworker instead of web-worker in AvailableTarget type by @9aoy in #2834
  • chore: bump resolver and fix resolve.alias with resource query by @Boshen in #2817
  • fix: sourcemap lost when enable builtins.banner by @ahabhgk in #2858
  • fix: undefined reasons with stats.toJson by @ahabhgk in #2859
  • fix(resolve): return query and fragment when alias target had by @bvanjoi in #2869
  • fix: remove.d.ts from the default resolve.extensions by @lippzhang in #2861
  • fix: react refresh runtime inject for nest function call by @underfin in #2874
  • fix: optimize tree shaking swc/helpers by @IWANABETHATGUY in #2871
  • fix(resolve): delay the directory check in exportsFieldPlugin by @bvanjoi in #2883
  • fix: fix loader arguments by @h-a-n-a in #2898
  • fix: HMR scanner should only visit dependencies related to HMR by @h-a-n-a in #2911

Other Changes

New Contributors

Full Changelog: v0.1.8...v0.1.9