diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts index 05f24cc4c71bc5..4fa777de1c2037 100644 --- a/packages/vite/src/node/server/pluginContainer.ts +++ b/packages/vite/src/node/server/pluginContainer.ts @@ -568,6 +568,9 @@ class EnvironmentPluginContainer { const start = debugPluginTransform ? performance.now() : 0 let result: TransformResult | string | undefined const handler = getHookHandler(plugin.transform) + if (!handler) { + continue + } try { result = await this.handleHookPromise( handler.call(ctx as any, code, id, optionsWithSSR),