Skip to content

Commit 9b633cd

Browse files
authored
fix(devtools): do not try to overlay on server (#630)
1 parent ff2f952 commit 9b633cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/devtools/src/integrations/vue-devtools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export function setup({ nuxt }: NuxtDevtoolsServerContext) {
1515
return resolved
1616
}
1717
},
18-
transform(code, id) {
18+
transform(code, id, options) {
1919
const [filename] = id.split('?', 2)
2020
const appendTo = /\/entry\.m?js$/
2121

22-
if (appendTo.test(filename))
22+
if (!options?.ssr && appendTo.test(filename))
2323
code = `import 'virtual:vue-devtools-path:overlay.mjs';\n${code}`
2424

2525
return code

0 commit comments

Comments
 (0)