Repository navigation
Replies: 2 comments
|
Yes, Vite 6 changed the environment pipeline. I reproduced your wrapper with Vite 5.4.19 and 6.3.5: Move the logic into your plugin's {
name: 'custom-plugin',
apply: 'serve',
transform(code, id) {
// Inspect or transform this module here.
return null;
},
}If it needs different behavior for client and SSR processing in Vite 6, the hook can inspect |
|
It's lazy. One Vite 6 gotcha: transforms now run per environment. If it still never fires on requests, double check nothing is short circuiting earlier, like a cached transform result or — |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to upgrade to Vite 6 and have a custom plugin where, within a
configureServerhook, I'm wrapping thePluginContainer.transformhook. For example:The issue is that the transform hook never seems to get called. This works with Vite 5, so I'm wondering if something changed in Vite 6 with how/when it gets called?
All reactions