Describe the bug
If a plugin adds another plugin via the config() hook, then the "inner" one will be ignored. Only the outer plugin will be added. My goal is to create a wrapper plugin for Preact applications that automatically sets up the prefresh plugin, devtools bridge and some custom SSR stuff.
Reproduction
Repro: https://github.com/marvinhagemeister/vite-nested-plugin-bug
- Clone the repo above
- Run
npm install
- Run
npm start and open the page
- Page should render "It works!"
System Info
vite version: 2.0.5
- Operating System: MacOS Big Sur
- Node version: 15.10.0
- Package manager (npm/yarn/pnpm) and version: npm 7.6.1
Describe the bug
If a plugin adds another plugin via the
config()hook, then the "inner" one will be ignored. Only the outer plugin will be added. My goal is to create a wrapper plugin for Preact applications that automatically sets up the prefresh plugin, devtools bridge and some custom SSR stuff.Reproduction
Repro: https://github.com/marvinhagemeister/vite-nested-plugin-bug
npm installnpm startand open the pageSystem Info
viteversion: 2.0.5