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
48
48
49
49
for (const example of Object .keys (imports ).filter ((i ) => i !== ' additionalImports' )) {
50
50
if (example .includes (' css' )) {
51
- css += ` ${ imports [example as keyof typeof imports ]} `
51
+ css += formatCSS ( imports [example as keyof typeof imports ])
52
52
} else {
53
53
files [example ] = imports [example as keyof typeof imports ]
54
54
}
@@ -82,6 +82,17 @@ const sfcOptions = {
82
82
propsDestructure: true ,
83
83
},
84
84
} 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
+ }
85
96
</script >
86
97
87
98
<template >
You can’t perform that action at this time.
0 commit comments