This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,8 @@ export class CSSProcessor {
98
98
}
99
99
100
100
async function initPostCSS ( plugins : PostCSSPlugin [ ] ) {
101
- const { default : PostCSS } = await import ( `https://esm.sh/postcss@${ postcssVersion } ` )
102
101
const isDev = Deno . env . get ( 'ALEPH_BUILD_MODE' ) === 'development'
103
- return PostCSS ( await Promise . all ( plugins . filter ( p => {
102
+ const pluginObjects = await Promise . all ( plugins . filter ( p => {
104
103
if ( isDev ) {
105
104
if ( util . isNEString ( p ) && productionOnlyPostcssPlugins . includes ( p ) ) {
106
105
return false
@@ -121,7 +120,20 @@ async function initPostCSS(plugins: PostCSSPlugin[]) {
121
120
} else {
122
121
return p
123
122
}
124
- } ) ) )
123
+ } ) )
124
+
125
+ if ( pluginObjects . length === 0 ) {
126
+ return {
127
+ process : ( content : string ) => ( {
128
+ async : async ( ) => {
129
+ return { content }
130
+ }
131
+ } )
132
+ }
133
+ }
134
+
135
+ const { default : PostCSS } = await import ( `https://esm.sh/postcss@${ postcssVersion } ` )
136
+ return PostCSS ( pluginObjects )
125
137
}
126
138
127
139
async function importPostcssPluginByName ( name : string ) {
You can’t perform that action at this time.
0 commit comments