@@ -287,19 +287,28 @@ pub async fn get_client_module_options_context(
287
287
}
288
288
} ;
289
289
290
- let postcss_transform_options = PostCssTransformOptions {
291
- postcss_package,
292
- config_location : PostCssConfigLocation :: ProjectPathOrLocalPath ,
293
- ..Default :: default ( )
294
- } ;
295
- let postcss_foreign_transform_options = PostCssTransformOptions {
296
- // For node_modules we don't want to resolve postcss config relative to the file being
297
- // compiled, instead it only uses the project root postcss config.
298
- config_location : PostCssConfigLocation :: ProjectPath ,
299
- ..postcss_transform_options. clone ( )
300
- } ;
301
- let enable_postcss_transform = Some ( postcss_transform_options. resolved_cell ( ) ) ;
302
- let enable_foreign_postcss_transform = Some ( postcss_foreign_transform_options. resolved_cell ( ) ) ;
290
+ let postcss_transform_options =
291
+ postcss_package. map ( |postcss_package| PostCssTransformOptions {
292
+ postcss_package : Some ( postcss_package) ,
293
+ config_location : PostCssConfigLocation :: ProjectPathOrLocalPath ,
294
+ ..Default :: default ( )
295
+ } ) ;
296
+ let postcss_foreign_transform_options =
297
+ postcss_transform_options
298
+ . as_ref ( )
299
+ . map ( |postcss_transform_options| {
300
+ PostCssTransformOptions {
301
+ // For node_modules we don't want to resolve postcss config relative to the file being
302
+ // compiled, instead it only uses the project root postcss config.
303
+ config_location : PostCssConfigLocation :: ProjectPath ,
304
+ ..postcss_transform_options. clone ( )
305
+ }
306
+ } ) ;
307
+
308
+ let enable_postcss_transform = postcss_transform_options
309
+ . map ( |postcss_transform_options| postcss_transform_options. resolved_cell ( ) ) ;
310
+ let enable_foreign_postcss_transform = postcss_foreign_transform_options
311
+ . map ( |postcss_foreign_transform_options| postcss_foreign_transform_options. resolved_cell ( ) ) ;
303
312
304
313
let module_options_context = ModuleOptionsContext {
305
314
ecmascript : EcmascriptOptionsContext {
0 commit comments