File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,14 +144,18 @@ async function main() {
144144 if ( ! fs . existsSync ( OUTPUT_PATH ) )
145145 fs . mkdirSync ( OUTPUT_PATH , { recursive : true } )
146146
147- const [ { content, name } ] = files
148- const fullPath = `${ OUTPUT_PATH } /${ name } `
147+ const [ firstFile ] = files
149148
150- fs . writeFileSync ( fullPath , content )
149+ if ( firstFile ) {
150+ const { name, content } = firstFile
151+ const fullPath = `${ OUTPUT_PATH } /${ name } `
151152
152- if ( optimizeTypes ) {
153- console . log ( '🤏 optimizing types' )
154- await optimizeTypesUtil ( fullPath , typeWhitelist )
153+ fs . writeFileSync ( fullPath , content )
154+
155+ if ( optimizeTypes ) {
156+ console . log ( '🤏 optimizing types' )
157+ await optimizeTypesUtil ( fullPath , typeWhitelist )
158+ }
155159 }
156160
157161 process . exit ( 0 )
Original file line number Diff line number Diff line change 33 "strict" : true ,
44 "outDir" : " dist" ,
55 "rootDir" : " src" ,
6- "module" : " commonjs" ,
7- "target" : " es6" ,
6+ "target" : " es2022" ,
7+ "module" : " NodeNext" ,
8+ "moduleResolution" : " NodeNext" ,
9+ "noUncheckedIndexedAccess" : true ,
10+ "isolatedModules" : true ,
811 "esModuleInterop" : true ,
912 "sourceMap" : true ,
1013 "declaration" : true ,
11- "skipLibCheck" : true
14+ "skipLibCheck" : true ,
15+ "allowJs" : true
1216 },
1317 "exclude" : [" node_modules" , " templates" ]
1418}
You can’t perform that action at this time.
0 commit comments