File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 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) {
1414 expandProps += ` previewAppStyle="${ encodeURIComponent ( JSON . stringify ( options . props . previewAppStyle ) ) } "`
1515 if ( options ?. props ?. importMap )
1616 expandProps += ` importMap="${ encodeURIComponent ( JSON . stringify ( options . props . importMap ) ) } "`
17+ if ( options ?. props ?. ssr )
18+ expandProps += ' ssr'
1719
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'
1921}
2022
2123interface VuePreviewPluginOptions {
2224 props ?: {
2325 previewBodyStyle ?: Props [ 'previewBodyStyle' ]
2426 previewAppStyle ?: Props [ 'previewAppStyle' ]
2527 importMap ?: Record < string , string >
28+ ssr ?: boolean
2629 }
2730}
2831
You can’t perform that action at this time.
0 commit comments