System Info
System:
OS: Linux 6.6 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Memory: 28.56 GB / 31.20 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
Yarn: 4.14.0 - ~/.nvm/versions/node/v22.18.0/bin/yarn
npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
bun: 1.3.10 - ~/.bun/bin/bun
Browsers:
Firefox: 149.0.2
Firefox Developer Edition: 149.0.2
Details
Extended configs do not concatenate plugins unless you use the undocumented '...' in the plugins array. Other than being undocumented it's problematic because it is a type error. The docs in https://rspack.rs/config/extends#multiple-configurations:~:text=Arrays%20are%20concatenated indicate that arrays are concatenated.
Reproduce link
https://github.com/joshcartme/rspack-plugins-extends-issue
Reproduce Steps
yarn
yarn rspack serve
- Observe that
MyPlugin: The Rspack build process is starting! is in the output, but MyBasePlugin: The Rspack build process is starting! is not.
yarn tsc -> no type errors
- In
rspack.config.ts uncomment the ... in plugins.
yarn rspack serve
- Observe that the output from both plugins is present.
yarn tsc -> Type '"..."' is not assignable to type 'Plugin'.
System Info
System:
OS: Linux 6.6 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Memory: 28.56 GB / 31.20 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
Yarn: 4.14.0 - ~/.nvm/versions/node/v22.18.0/bin/yarn
npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
bun: 1.3.10 - ~/.bun/bin/bun
Browsers:
Firefox: 149.0.2
Firefox Developer Edition: 149.0.2
Details
Extended configs do not concatenate plugins unless you use the undocumented
'...'in the plugins array. Other than being undocumented it's problematic because it is a type error. The docs in https://rspack.rs/config/extends#multiple-configurations:~:text=Arrays%20are%20concatenated indicate that arrays are concatenated.Reproduce link
https://github.com/joshcartme/rspack-plugins-extends-issue
Reproduce Steps
yarnyarn rspack serveMyPlugin: The Rspack build process is starting!is in the output, butMyBasePlugin: The Rspack build process is starting!is not.yarn tsc-> no type errorsrspack.config.tsuncomment the...in plugins.yarn rspack serveyarn tsc->Type '"..."' is not assignable to type 'Plugin'.