File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -63,22 +63,25 @@ export default function setup(opts = {}) {
6363 return void ( plugins = customPlugins ) ;
6464 }
6565
66- plugins = [ ] ;
67-
66+ const prepend = get ( 'prepend' , null , 'array' , opts ) || [ ] ;
67+ const append = get ( 'append' , null , 'array' , opts ) || [ ] ;
6868 const mode = get ( 'mode' , null , 'string' , opts ) ;
69- plugins . push ( mode
70- ? new LocalByDefault ( { mode : opts . mode } )
71- : LocalByDefault ) ;
72-
7369 const createImportedName = get ( 'createImportedName' , null , 'function' , opts ) ;
74- plugins . push ( createImportedName
75- ? new ExtractImports ( { createImportedName : opts . createImportedName } )
76- : ExtractImports ) ;
77-
7870 const generateScopedName = get ( 'generateScopedName' , null , 'function' , opts ) ;
79- plugins . push ( generateScopedName
80- ? new Scope ( { generateScopedName : opts . generateScopedName } )
81- : Scope ) ;
71+
72+ plugins = [
73+ ...prepend ,
74+ mode
75+ ? new LocalByDefault ( { mode : opts . mode } )
76+ : LocalByDefault ,
77+ createImportedName
78+ ? new ExtractImports ( { createImportedName : opts . createImportedName } )
79+ : ExtractImports ,
80+ generateScopedName
81+ ? new Scope ( { generateScopedName : opts . generateScopedName } )
82+ : Scope ,
83+ ...append ,
84+ ] ;
8285}
8386
8487/**
You can’t perform that action at this time.
0 commit comments