splitChunks.cacheGroups.{cacheGroup}.name does not accept a function #3425
Labels
bug
Something isn't working
duplicated
The issue/PR is duplicate of others
pending triage
The issue/PR is currently untouched.
System Info
System:
OS: macOS 13.3.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 6.85 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 19.6.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.2 - /usr/local/bin/npm
Browsers:
Brave Browser: 112.1.50.114
Chrome: 113.0.5672.126
Firefox: 109.0.1
Safari: 16.4
Safari Technology Preview: 16.4
npmPackages:
@rspack/cli: ^0.2.0 => 0.2.0
Details
The docs indicate that the
name
property within achunkGroups
object accepts a function, butrspack
throws an error, and the types indicate that a function is not an acceptable value. This is also the case withsplitChunks.name
.Error:
Ideally I'd like to be able to leverage this feature as I do in
webpack
where each package that has atest
match is fed through thechunkGroups
group, so that I can return a new chunk for each package, rather than all of the packages being bundled into a single vendor chunk.Reproduce link
https://github.com/oqx/rspack-vendor-chunks
Reproduce Steps
pnpm install
pnpm build
pnpm build:vendor
Details and commands are also in the README, and annotations are in the config files. There's also an abbreviated
webpack.config.js
that I use in a few projects to code split node modules.The text was updated successfully, but these errors were encountered: