File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,14 @@ export async function loadConfig() {
138138 const { config } = await _loadConfig < Config > ( {
139139 name : "nzip" ,
140140 packageJson : true ,
141+ defaultConfig,
141142 } ) ;
143+
144+ if ( config ?. withDefaultSkip === false ) {
145+ defaultConfig . skip . forEach ( ( s ) => {
146+ config . skip = config . skip ?. filter ( ( cs ) => cs !== s ) ;
147+ } ) ;
148+ }
142149 return config ;
143150}
144151
@@ -152,12 +159,9 @@ export async function loadOptions(options: Options) {
152159
153160 if ( options . withConfig ) {
154161 const config = await loadConfig ( ) ;
155- const name = config ?. name ?? defaultConfig . name ;
162+ const name = config ?. name ;
156163 const output = `${ name } .${ options . type } ` ;
157164 const externalSkip = config ?. skip ?? [ ] ;
158- if ( config ?. withDefaltSkip ) {
159- externalSkip . push ( ...defaultConfig . skip ) ;
160- }
161165 return {
162166 cwd,
163167 output,
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ export interface Config {
1212 /**
1313 * @default true
1414 */
15- withDefaltSkip ?: boolean ;
15+ withDefaultSkip ?: boolean ;
1616}
1717
1818export const defaultConfig : Required < Config > = {
1919 name : "default" ,
2020 skip : [
2121 / (?< = [ \\ \/ ] ) ( n o d e _ m o d u l e s | t e m p | c a c h e | d i s t | \. ( n u x t | n i t r o | o u t p u t ) ) (? = [ \\ \/ ] ) / ,
2222 ] ,
23- withDefaltSkip : true ,
23+ withDefaultSkip : true ,
2424} ;
You can’t perform that action at this time.
0 commit comments