File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,7 +154,10 @@ export async function loadOptions(options: Options) {
154154 const config = await loadConfig ( ) ;
155155 const name = config ?. name ?? defaultConfig . name ;
156156 const output = `${ name } .${ options . type } ` ;
157- const externalSkip = config ?. skip ?? defaultConfig . skip ;
157+ const externalSkip = config ?. skip ?? [ ] ;
158+ if ( config ?. withDefaltSkip ) {
159+ externalSkip . push ( ...defaultConfig . skip ) ;
160+ }
158161 return {
159162 cwd,
160163 output,
@@ -165,6 +168,6 @@ export async function loadOptions(options: Options) {
165168 return {
166169 cwd,
167170 type : options . type ,
168- output : `default .${ options . type } ` ,
171+ output : `${ defaultConfig . name } .${ options . type } ` ,
169172 } ;
170173}
Original file line number Diff line number Diff line change 11export type ExternalSkip = Array < string | RegExp > ;
22
33export interface Config {
4+ /**
5+ * @default "default"
6+ */
47 name ?: string ;
8+ /**
9+ * @default [/(?<=[\\\/])(node_modules|temp|cache|dist|\.(nuxt|nitro|output))(?=[\\\/])/]
10+ */
511 skip ?: ExternalSkip ;
12+ /**
13+ * @default true
14+ */
15+ withDefaltSkip ?: boolean ;
616}
717
8- export const defaultConfig : Config = {
18+ export const defaultConfig : Required < Config > = {
919 name : "default" ,
1020 skip : [
1121 / (?< = [ \\ \/ ] ) ( 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 ) ) (? = [ \\ \/ ] ) / ,
1222 ] ,
23+ withDefaltSkip : true ,
1324} ;
You can’t perform that action at this time.
0 commit comments