Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit db7853e

Browse files
committed
fix(plugin): fix css minify
1 parent 139b7ed commit db7853e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/css.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ type Options = {
1515
}
1616

1717
export default (options?: Options): LoaderPlugin => {
18-
const isDev = Deno.env.get('BUILD_MODE') === 'production'
1918
const decoder = new TextDecoder()
20-
2119
let pcssProcessor: any = null
2220

2321
return {
@@ -30,7 +28,7 @@ export default (options?: Options): LoaderPlugin => {
3028
pcssProcessor = await initPostCSSProcessor(options)
3129
}
3230
const { content: pcss } = await pcssProcessor.process(decoder.decode(content)).async()
33-
const css = isDev ? cleanCSS.minify(pcss).styles : pcss
31+
const css = Deno.env.get('BUILD_MODE') === 'production' ? cleanCSS.minify(pcss).styles : pcss
3432
if (url.startsWith('#inline-style-')) {
3533
return {
3634
code: css,

0 commit comments

Comments
 (0)