Skip to content

Releases: web-infra-dev/rspack

v0.1.10

09 May 09:54
Compare
Choose a tag to compare

Core features

builtins.minifyOptions.extractComments

You could extract the license using the configuration below:

module.exports = {
// ... snip
  builtins: {
     minifyOptions: {
       extractComments: true // by default, rspack will use regex `@preserve|@lic|@cc_on|^\**!`
     }
  }
}

or Using Regexp:

module.exports = {
// ... snip
  builtins: {
     minifyOptions: {
       extractComments: /@license/
     }
  }
}

inline match resource

For more details you could refer https://webpack.js.org/api/loaders/#inline-matchresource

optimization.realContentHash

By default, when you use the contenthash option in your output filename, Rspack will generate a hash based on the module's dependencies and other factors that can change even if the module's content has not changed. This means that the bundle will be invalidated and rebuilt even if the module's content has not changed.
However, by enabling the optimization.realContentHash option, Rspack will generate a hash based only on the actual content of the module. This ensures that the bundle is invalidated and rebuilt only when the module's content has actually changed.
For more details you could refer to optimization.realContentHash

What's Changed

Exciting New Features πŸŽ‰

Bug Fixes 🐞

Other Changes

  • chore: add hmr for loader example by @h-a-n-a in #2925
  • chore(rust): bump rustc to v1.69.0 (nightly-2023-04-20) by @Boshen in #2903
  • chore: add eslint support by @hardfist in #2904
  • refactor(new_split_chunks): remove unused code and add more comments by @hyf0 in #2947
  • chore: setup ./x script using zx by @Boshen in #2933
  • refactor: clean up dependencies around swc for improving compile time by @Boshen in #2962
  • refactor(plugin): asyncify optimize_chunks hook by @hyf0 in #2958
  • chore(rust): bump dependencies by @Boshen in #2968
  • ci: 🎑 trigger test when examples change by @IWANABETHATGUY in #2971
  • refactor: extract comments by @IWANABETHATGUY in #2970
  • refactor(split_chunks_new): asyncify prepare_module_group_map by @hyf0 in #2975
  • chore: πŸ€– disable css erorr by @IWANABETHATGUY in #2964
  • docs: pnpm install command fix based on engine by @thedeveloperpotato in #2992
  • refactor(core): use directory for chunk_graph module by @hyf0 in #2998
  • chore: add node shims example by @hardfist in #2997
  • test(split_chunks): add test of extract-css-to-single-chunk by @hyf0 in #2996
  • chore: remove clap by @IWANABETHATGUY in #2967
  • chore: add add loader_name to loader_sync_call in trace by @hardfist in #2999
  • chore: fine grained tracing by @IWANABETHATGUY in #3002
  • chore: make release profile the same for Cargo.toml and node_binding/Cargo.toml by @Boshen in #3004
  • ci: remove manual symbol stripping from build steps by @Boshen in #3007
  • chore: πŸ€– bump napi cli by @IWANABETHATGUY in #3008
  • chore: πŸ€– recover check on save by @IWANABETHATGUY in #3013
  • chore(rust): bump sass-embedded and remove protobuf requirement by @Boshen in #3021
  • chore: link to rspack-dev-guide and make content more general in CONTRIBUTING.md by @Boshen in #3020
  • refactor: external module for http request by @ahabhgk in #3023
  • refactor: remove dependency parent module identifier by @underfin in #3024
  • refactor(chunk_graph): split methods of ChunkGraph into different files by @hyf0 in #3031
  • chore: πŸ€– add alias cargo test no fail fast by @IWANABETHATGUY in #3032
  • test(split_chunks): Migrate test/configCases/split-chunks-common of Webpack by @hyf0 in #3018
  • refactor(rust...
Read more

v0.1.9

25 Apr 05:15
Compare
Choose a tag to compare

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.
            },
          },
          "css-loader",
        ],
        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
require("!postcss-loader!less-loader!./style.less")

// Prefixing with !! will disable all configured loaders (preLoaders, loaders, postLoaders)
require("!!postcss-loader!less-loader!./style.less")

// Prefixing with -! will disable all configured preLoaders and loaders but not postLoaders
require("-!postcss-loader!less-loader!./style.less")

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

v0.1.8

18 Apr 11:08
Compare
Choose a tag to compare

What's Changed

Infrastructure βš™οΈ

  • Rspack has nightly release now! npm i -D @rspack/cli@nightly
  • Rspack Ecosystem CI has been successfully set up and running

Performance Improvements ⚑

  • perf(core): improve cold startup performance by caching depended_modules function in code splitter by @Boshen in #2294

Exciting New Features πŸŽ‰

Bug Fixes 🐞

  • fix(html): html inject public path incorrect by @jerrykingxyz in #2707
  • fix: extend chunkGroup name from EsmDynamicImportDependency by @ahabhgk in #2712
  • fix(progress): should not display empty progress bar by @chenjiahan in #2725
  • fix: panic hook failed to restore after being suppressed by @h-a-n-a in #2734
  • fix: template literal dynamic import by @faga295 in #2732
  • fix(react-refresh): lazily access module.exports to prevent unexpected/potential TDZ error by @hyf0 in #2714
  • fix(cli): fix default NODE_ENV of command by @hardfist in #2724
  • fix: πŸ› fix crash in multiCompiler by @JSerFeng in #2744
  • fix(css): should generate css assets even if the imported css file is empty by @suxin2017 in #2759
  • fix(builtins.provide): should only replace exactly matched expression by @suxin2017 in #2721
  • fix: redirect name_for_condition in BoxModule by @hyf0 in #2778

Other Changes

New Contributors

Full Changelog: v0.1.7...v0.1.8

v0.1.7

11 Apr 05:00
Compare
Choose a tag to compare

There are some enhancements/fixes

More supported Webpack features

DX improving

Frameworks

What's Changed

New Contributors

Full Changelog: v0.1.6...v0.1.7

v0.1.6

04 Apr 09:22
Compare
Choose a tag to compare

What's Changed

  • feat(rspack_plugin_dev_friendly_split_chunks): reduce MAX_MODULES_PER_CHUNK and add MAX_SIZE_PER_CHUNK condition by @hyf0 in #2578
  • ci: encore PR titles to follow the conventional-commit rules by @hyf0 in #2584
  • fix(cli): fix semver missing by @hardfist in #2586
  • chore: fix typo in CONTRIBUTING.md by @hyf0 in #2588
  • chore: remove copy-plugin from cra example by @hardfist in #2596
  • fix: swc css minifier global not set by @IWANABETHATGUY in #2600
  • fix(dev-client): use webpack-dev-server/client directly by @bvanjoi in #2576

Full Changelog: v0.1.5...v0.1.6

v0.1.5

03 Apr 06:46
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.4...v0.1.5

v0.1.4

30 Mar 04:13
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.3...v0.1.4

v0.1.3

29 Mar 04:27
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.2...v0.1.3

v0.1.2

22 Mar 13:32
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.1...v0.1.2

v0.1.1

16 Mar 05:54
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.1.1