File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 2929.turbo
3030.npmrc
3131.yarnrc.local.yml
32+ * .tsbuildinfo
Original file line number Diff line number Diff line change 11import esbuild from 'esbuild' ;
2+ import { readFileSync } from 'fs' ;
3+
4+ // package.json을 읽어와 dependencies를 external로 동적으로 설정하기
5+ const packageJson = JSON . parse ( readFileSync ( './package.json' , 'utf8' ) ) ;
6+ const external = Object . keys ( packageJson . dependencies || { } ) ;
27
38// TypeScript 파일을 esbuild로 빌드 (ESNext 타겟)
49await esbuild . build ( {
@@ -11,7 +16,7 @@ await esbuild.build({
1116 loader : {
1217 '.ts' : 'ts' , // TypeScript 파일 로드
1318 } ,
14- external : [ "googleapis" , "gaxios" ] , // Node.js 내장 모듈을 번들에서 제외
19+ external, // Node.js 내장 모듈 및 dependencies를 번들에서 제외
1520 minify : false , // 디버깅을 위해 minify 비활성화 (선택사항)
1621 sourcemap : true , // 소스맵 생성 (선택사항)
1722} ) . catch ( ( ) => process . exit ( 1 ) ) ;
You can’t perform that action at this time.
0 commit comments