File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const additionalImports = 'additionalImports' in imports ? imports.additionalImp
4848
4949for (const example of Object .keys (imports ).filter ((i ) => i !== ' additionalImports' )) {
5050 if (example .includes (' css' )) {
51- css += ` ${ imports [example as keyof typeof imports ]} `
51+ css += formatCSS ( imports [example as keyof typeof imports ])
5252 } else {
5353 files [example ] = imports [example as keyof typeof imports ]
5454 }
@@ -82,6 +82,17 @@ const sfcOptions = {
8282 propsDestructure: true ,
8383 },
8484} as SFCOptions
85+
86+ function formatCSS(cssString : string ) {
87+ let formattedString = cssString
88+
89+ formattedString = formattedString .replace (/ }/ g , ' \n }\n\n ' )
90+ formattedString = formattedString .replace (/ ;/ g , ' ;\n ' )
91+
92+ formattedString = formattedString .replace (/ {/ g , ' {\n ' )
93+
94+ return formattedString .trim ()
95+ }
8596 </script >
8697
8798<template >
You can’t perform that action at this time.
0 commit comments