We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 281c48d commit 14bc980Copy full SHA for 14bc980
src/parser/style.js
@@ -12,16 +12,17 @@ type StyleObjectType = {
12
13
function styleParser(styleObjectArray: StyleObjectType[]): Promise<string> {
14
return new Promise((resolve) => {
15
+ let output = '';
16
if (!styleObjectArray || styleObjectArray.length === 0) {
- resolve('');
17
+ resolve(output);
18
} else {
19
for (const styleObject of styleObjectArray) {
20
if(styleObject.lang === 'scss' || styleObject.lang === 'less') {
21
console.error('Sorry please only use plain CSS in your files for now');
22
}
- const output = new CleanCSS({}).minify(styleObject.content);
23
- resolve(output.styles);
+ output += new CleanCSS({}).minify(styleObject.content).styles;
24
25
26
27
});
28
0 commit comments