diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 1d2f896e79cb2a..c7464e24700b7b 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -143,10 +143,10 @@ export async function transformMain( // SSR module registration by wrapping user setup if (ssr) { output.push( - `import { useSSRContext } from 'vue'`, + `import { useSSRContext as __vite_useSSRContext } from 'vue'`, `const _sfc_setup = _sfc_main.setup`, `_sfc_main.setup = (props, ctx) => {`, - ` const ssrContext = useSSRContext()`, + ` const ssrContext = __vite_useSSRContext()`, ` ;(ssrContext.modules || (ssrContext.modules = new Set())).add(${JSON.stringify( filename )})`,