Skip to content

joshcartme/rspack-plugins-extends-issue

Repository files navigation

rspack-plugins-extends-issue

The Rspack docs state that when merging configurations array are concatenated, https://rspack.rs/config/extends#:~:text=Arrays%20are%20concatenated

The behavior shown in this repo is that the plugins from the extended config are dropped, unless you add '...' to the plugins array. As far as I can find '...' in plugins is undocumented behavior, and while it works it isn't allowed with Rspack's config types.

running this repro

  1. yarn
  2. yarn rspack serve
  3. Observe that MyPlugin: The Rspack build process is starting! is in the output, but MyBasePlugin: The Rspack build process is starting! is not.
  4. yarn tsc -> no type errors
  5. In rspack.config.ts uncomment the ... in plugins.
  6. yarn rspack serve
  7. Observe that the output from both plugins is present.
  8. yarn tsc -> Type '"..."' is not assignable to type 'Plugin'.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors