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 fe875ba commit baa5ea4Copy full SHA for baa5ea4
src/postcss-clean.ts
@@ -1,15 +1,16 @@
1
import * as postcss from 'postcss'
2
+
3
// ESM import of clean-css breaks test/runtime check this fix for reference:
4
// https://github.com/vuejs/vue-component-compiler/pull/103#issuecomment-632676899
5
const CleanCSS = require('clean-css')
6
-exports.default = (options): postcss.Plugin => {
7
+exports.default = (options: any): postcss.Plugin => {
8
const clean = new CleanCSS(Object.assign({ compatibility: 'ie9' }, options))
9
return {
10
postcssPlugin: 'clean',
11
Once(css, res) {
12
const output = clean.minify(css.toString())
- res.root = postcss.parse(output.styles)
13
+ res.root = () => postcss.parse(output.styles)
14
},
15
}
16
0 commit comments