File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,18 @@ function getCode(code: string, options?: VuePreviewPluginOptions) {
14
14
expandProps += ` previewAppStyle="${ encodeURIComponent ( JSON . stringify ( options . props . previewAppStyle ) ) } "`
15
15
if ( options ?. props ?. importMap )
16
16
expandProps += ` importMap="${ encodeURIComponent ( JSON . stringify ( options . props . importMap ) ) } "`
17
+ if ( options ?. props ?. ssr )
18
+ expandProps += ' ssr'
17
19
18
- return code . trim ( ) ? `<VuePreview code="${ str } " ${ expandProps } encode ssr></VuePreview >\n` : '<VuePreview ssr></VuePreview >\n'
20
+ return code . trim ( ) ? `<VuePreview code="${ str } " ${ expandProps } encode / >\n` : '<VuePreview / >\n'
19
21
}
20
22
21
23
interface VuePreviewPluginOptions {
22
24
props ?: {
23
25
previewBodyStyle ?: Props [ 'previewBodyStyle' ]
24
26
previewAppStyle ?: Props [ 'previewAppStyle' ]
25
27
importMap ?: Record < string , string >
28
+ ssr ?: boolean
26
29
}
27
30
}
28
31
You can’t perform that action at this time.
0 commit comments