Skip to content

Commit 0711ea2

Browse files
committedApr 24, 2024·
feat(vite): ssr support
1 parent ff96876 commit 0711ea2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed
 

‎packages/vite/src/vite.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,11 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
139139
if (id === 'virtual:vue-devtools-options')
140140
return `export default ${JSON.stringify({ base: config.base, componentInspector: pluginOptions.componentInspector })}`
141141
},
142-
transform(code, id) {
143-
const { root } = config
144-
145-
const projectPath = `${root}`
146-
147-
if (!id.startsWith(projectPath))
142+
transform(code, id, options) {
143+
if (options?.ssr)
148144
return
149145

150146
const { appendTo } = pluginOptions
151-
152147
const [filename] = id.split('?', 2)
153148

154149
if (appendTo

0 commit comments

Comments
 (0)
Please sign in to comment.