This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Plugins with multiple builds clobber each other #15517
Labels
You can continue the conversation there. Go to discussion →
Describe the bug
I have a custom plugin that handles the main build (multiple entires with chunking, etc). I would like to also perform a second [lib] build that compiles each [different from build 1] entry into a single output file, and also places them in the final dist location (though different subfolder) that the first build outputs to. Note that both builds have very different build configs. If my plugin uses its own plugin for build 2 it results in one clobbering the other. Fortunately, we have our own build executable so I can get around this by doing:
The downside with my workaround is that any config sent to my plugin is inaccessible to my second build since it's not actually using my plugin that users would add to their vite.config.js.
Ideally, I could write a plugin that has a multi-step build process that executes in a defined order.
Tangentially, would love to see this issue get some love. The workaround is to perform a build per entry like described here.
Reproduction
N/A
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: