This repository was archived by the owner on Aug 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -229,22 +229,24 @@ export class SFCCompiler {
229
229
style . module === true || typeof style . module === 'string'
230
230
const needsCleanCSS =
231
231
this . template . isProduction && ! ( this . style . postcssCleanOptions && this . style . postcssCleanOptions . disabled )
232
- const postcssPlugins = [
233
- needsCSSModules
234
- ? postcssModules ( {
235
- generateScopedName : '[path][local]-[hash:base64:4]' ,
236
- ...this . style . postcssModulesOptions ,
237
- getJSON : ( t : any ) => {
238
- tokens = t
239
- }
240
- } )
241
- : undefined ,
242
- needsCleanCSS
243
- ? postcssClean ( this . style . postcssCleanOptions )
244
- : undefined
245
- ]
246
- . concat ( this . style . postcssPlugins )
232
+ const postcssPlugins = ( this . style . postcssPlugins || [ ] )
233
+ . slice ( )
234
+ . concat ( [
235
+ needsCleanCSS
236
+ ? postcssClean ( this . style . postcssCleanOptions )
237
+ : undefined ,
238
+ needsCSSModules
239
+ ? postcssModules ( {
240
+ generateScopedName : '[path][local]-[hash:base64:4]' ,
241
+ ...this . style . postcssModulesOptions ,
242
+ getJSON : ( t : any ) => {
243
+ tokens = t
244
+ }
245
+ } )
246
+ : undefined ,
247
+ ] )
247
248
. filter ( Boolean )
249
+
248
250
const preprocessOptions =
249
251
( style . lang &&
250
252
this . style . preprocessOptions &&
You can’t perform that action at this time.
0 commit comments