콘텐츠로 이동

빠른 시작

Terminal window
# stdout 출력
zntc hello.ts
# 파일로 출력
zntc hello.ts -o hello.js
Terminal window
zntc src/ --outdir dist/
Terminal window
# 단일 번들
zntc --bundle src/index.ts -o dist/bundle.js
# 코드 스플리팅
zntc --bundle src/index.ts --splitting --outdir dist/
# 라이브러리 빌드 (모듈 구조 유지)
zntc --bundle src/index.ts --preserve-modules --outdir dist/
Terminal window
zntc --bundle src/index.ts -o dist/bundle.js --minify
Terminal window
zntc --bundle src/index.ts -o dist/bundle.js --sourcemap
Terminal window
zntc --bundle src/index.ts -o dist/bundle.js --watch
Terminal window
# 정적 파일 서빙
zntc --serve
# 번들 + HMR
zntc --serve --bundle src/index.ts

Vite 스타일의 index.html 앱은 zntc dev / zntc build를 사용합니다.

index.html
<link rel="stylesheet" href="/src/style.css" />
<script type="module" src="/src/main.ts"></script>
Terminal window
# HTML/env/public prepare + bundle + CSS HMR
zntc dev
# dist/에 빌드 산출물 쓰기
zntc build

앱 root에 postcss.config.*가 있으면 dev와 build 모두 CSS에 적용됩니다. Tailwind v4는 @tailwindcss/postcss로 설정합니다.