Skip to content

Commit

Permalink
Fix style preprocessor return value
Browse files Browse the repository at this point in the history
It is now compatible with both version before and after 3.30.0

sveltejs/svelte#5584
  • Loading branch information
arggh committed Jul 23, 2021
1 parent 53f0039 commit 6615b19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MelteCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ SvelteCompiler = class SvelteCompiler extends CachingCompiler {
},
style: async ({ content, attributes }) => {
if (this.postcss && (!attributes.lang || attributes.lang === 'postcss')) {
const { css: code } = await this.postcss.process(content, { from: undefined });

return {
code: await this.postcss.process(content, { from: undefined })
code
};
}
}
Expand Down

0 comments on commit 6615b19

Please sign in to comment.