Skip to content

Commit baa5ea4

Browse files
authored
FIx: remove ts errors
1 parent fe875ba commit baa5ea4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/postcss-clean.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import * as postcss from 'postcss'
2+
23
// ESM import of clean-css breaks test/runtime check this fix for reference:
34
// https://github.com/vuejs/vue-component-compiler/pull/103#issuecomment-632676899
45
const CleanCSS = require('clean-css')
56

6-
exports.default = (options): postcss.Plugin => {
7+
exports.default = (options: any): postcss.Plugin => {
78
const clean = new CleanCSS(Object.assign({ compatibility: 'ie9' }, options))
89
return {
910
postcssPlugin: 'clean',
1011
Once(css, res) {
1112
const output = clean.minify(css.toString())
12-
res.root = postcss.parse(output.styles)
13+
res.root = () => postcss.parse(output.styles)
1314
},
1415
}
1516
}

0 commit comments

Comments
 (0)