Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 9d43b80

Browse files
committed
feat: Allow disabling clean CSS
1 parent 3c31e95 commit 9d43b80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ export class SFCCompiler {
155155
let tokens = undefined
156156
const needsCSSModules =
157157
style.module === true || typeof style.module === 'string'
158+
const needsCleanCSS =
159+
this.template.isProduction && !(this.style.postcssCleanOptions && this.style.postcssCleanOptions.disabled)
158160
const postcssPlugins = [
159161
needsCSSModules
160162
? postcssModules({
@@ -165,7 +167,7 @@ export class SFCCompiler {
165167
}
166168
})
167169
: undefined,
168-
this.template.isProduction
170+
needsCleanCSS
169171
? postcssClean(this.style.postcssCleanOptions)
170172
: undefined
171173
]

0 commit comments

Comments
 (0)