Skip to content

TranspileOptions

This content is not available in your language yet.

Defined in: shared/index.ts:24

optional asciiOnly?: boolean

Defined in: shared/index.ts:79

non-ASCII를 \uXXXX로 이스케이프


optional browserslist?: string | string[]

Defined in: shared/index.ts:116

browserslist 쿼리 (예: “last 2 versions”, “>1%, not dead”). 지정 시 target보다 우선. core 패키지에서만 해석됨 (browserslist 의존).


optional charsetUtf8?: boolean

Defined in: shared/index.ts:81

non-ASCII를 이스케이프하지 않음


optional define?: object[]

Defined in: shared/index.ts:123

식별자 치환 쌍. value는 raw JSON (문자열은 반드시 따옴표 포함). 예: [{ key: "process.env.NODE_ENV", value: "\"production\"" }]

key: string

value: string


optional dropConsole?: boolean

Defined in: shared/index.ts:75

console.* 호출 제거


optional dropDebugger?: boolean

Defined in: shared/index.ts:77

debugger 문 제거


optional emitDecoratorMetadata?: boolean

Defined in: shared/index.ts:87

decorator metadata emit


optional experimentalDecorators?: boolean

Defined in: shared/index.ts:85

legacy decorator 변환


optional filename?: string

Defined in: shared/index.ts:26

파일 경로 (확장자 감지용, 기본: “input.ts”)


optional flow?: boolean

Defined in: shared/index.ts:83

Flow 타입 스트리핑


optional format?: "esm" | "cjs"

Defined in: shared/index.ts:105

모듈 포맷


optional jsx?: "classic" | "automatic" | "automatic-dev" | "preserve"

Defined in: shared/index.ts:44

JSX 런타임. 'preserve' 는 JSX 를 변환 없이 그대로 출력 — TypeScript 어노테이션만 strip. downstream tool (e.g. @vitejs/plugin-react, @preact/preset-vite, vite-plugin-solid) 이 JSX 를 처리하도록 위임할 때 사용. tsc "jsx": "preserve" 와 동등.


optional jsxFactory?: string

Defined in: shared/index.ts:46

classic 모드 JSX factory (기본: “React.createElement”)


optional jsxFragment?: string

Defined in: shared/index.ts:48

classic 모드 Fragment factory (기본: “React.Fragment”)


optional jsxImportSource?: string

Defined in: shared/index.ts:50

automatic 모드 import source (기본: “react”)


optional jsxInJs?: boolean

Defined in: shared/index.ts:52

JS 파일에서도 JSX 허용


optional minify?: boolean

Defined in: shared/index.ts:40

전체 축소 (whitespace + identifiers + syntax)


optional minifyIdentifiers?: boolean

Defined in: shared/index.ts:36

식별자 축소


optional minifySyntax?: boolean

Defined in: shared/index.ts:38

구문 축소


optional minifyWhitespace?: boolean

Defined in: shared/index.ts:34

공백 축소


optional platform?: Platform

Defined in: shared/index.ts:109

타겟 플랫폼


optional quotes?: "preserve" | "double" | "single"

Defined in: shared/index.ts:107

문자열 따옴표 스타일


optional reactRefresh?: boolean

Defined in: shared/index.ts:63

React Fast Refresh transform — 컴포넌트에 $RefreshReg$(_c, "Name") 등록. SWC builtin 의 jsc.transform.react.refresh: true / babel-plugin-react-refresh 의 component registration 과 동등. loader (rspack-loader, webpack/vite plugin) 가 single-file transpile 경로에서 활성화 시 사용.

Default 동작은 Metro 호환 (registration 만, hook signature 없음). babel/SWC 동등의 hook signature emit 은 reactRefreshHookSignatures: true opt-in. HMR runtime ($RefreshReg$/$RefreshSig$ 정의) 은 컨슈머 측 책임.


optional reactRefreshHookSignatures?: boolean

Defined in: shared/index.ts:73

reactRefresh: true 위에 hook signature emit (var _s = $RefreshSig$(); + _s(Component, "sig")) 을 추가. babel-plugin-react-refresh 와 동등. default false — Metro 정책 (signature 없음) 보존.

활성화 시 transformer 가 함수 본문 안 hook 호출을 스캔해 signature 문자열 빌드 → component 등록 직후 _s(Comp, "sig") 호출 emit. RN HMR 은 default (false) 그대로라 영향 없음.


optional sourcemap?: boolean

Defined in: shared/index.ts:28

소스맵 생성


optional sourcemapDebugIds?: boolean

Defined in: shared/index.ts:30

소스맵 Debug ID (Sentry 호환)


optional sourceRoot?: string

Defined in: shared/index.ts:118

소스맵의 sourceRoot 필드 (기본: 빈 문자열)


optional sourcesContent?: boolean

Defined in: shared/index.ts:32

소스맵에 원본 소스 포함 (기본: true)


optional stopAfter?: "scan" | "parse" | "semantic" | "transform" | "codegen"

Defined in: shared/index.ts:134

파이프라인 조기 종료 지점 — debug/profile 용. 지정 시 해당 phase 이후 단계는 skip 하고 빈 output 을 반환. profile 과 조합해 특정 phase 비용을 격리 측정할 때 유용.

  • “scan”: Scanner 토큰 drain 만
  • “parse”: Parser AST 생성 후
  • “semantic”: Semantic analyzer 후
  • “transform”: Transformer 후
  • “codegen”: 전체 실행 (기본 동작과 동일)

optional target?: Target

Defined in: shared/index.ts:111

ES 다운레벨 타겟


optional tsconfigPath?: string

Defined in: shared/index.ts:97

tsconfig.json 경로 (파일 또는 디렉토리). 설정 시 compilerOptions를 자동 로드해서 머지한다. JS 옵션이 명시적으로 설정된 필드가 우선 — 미지정 필드만 tsconfig 값으로 채워진다. 예) ”./tsconfig.json” 또는 ”./project-dir”


optional tsconfigRaw?: string

Defined in: shared/index.ts:103

inline tsconfig JSON 문자열 (esbuild 의 tsconfigRaw 와 동일 의미). 설정 시 tsconfigPath 와 자동 탐색을 모두 무시 — raw 가 단일 진실 원천. Zig 측 tsconfig_merge 에서 jsx/target/decorators 등 compilerOptions 를 직접 적용한다.


optional useDefineForClassFields?: boolean

Defined in: shared/index.ts:89

class field → constructor this.x = v 변환 (기본: true)


optional verbatimModuleSyntax?: boolean

Defined in: shared/index.ts:91

verbatimModuleSyntax (TS 5.0+): true면 미사용 값 import를 elide하지 않음