Skip to content

Commit 152f2fa

Browse files
committed
fix: fix html initialization in ssr mode
1 parent 6023935 commit 152f2fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/output/Preview.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,8 @@ async function updatePreview() {
196196
197197
const codeToEval = [
198198
`window.__modules__ = {};window.__css__ = '';` +
199-
`if (window.__app__) window.__app__.unmount();` +
200-
isSSR
201-
? ``
202-
: `document.body.innerHTML = '<div id="app"></div>'`,
199+
`if (window.__app__) window.__app__.unmount();` +
200+
(isSSR ? `` : `document.body.innerHTML = '<div id="app"></div>'`),
203201
...modules,
204202
`document.getElementById('__sfc-styles').innerHTML = window.__css__`
205203
]

0 commit comments

Comments
 (0)