Quick Start
Single File Transpile
Section titled “Single File Transpile”# Output to stdoutzntc hello.ts
# Output to filezntc hello.ts -o hello.jsDirectory Transpile
Section titled “Directory Transpile”zntc src/ --outdir dist/Bundling
Section titled “Bundling”# Single bundlezntc --bundle src/index.ts -o dist/bundle.js
# Code splittingzntc --bundle src/index.ts --splitting --outdir dist/
# Library build (preserve module structure)zntc --bundle src/index.ts --preserve-modules --outdir dist/Minify
Section titled “Minify”zntc --bundle src/index.ts -o dist/bundle.js --minifySource Maps
Section titled “Source Maps”zntc --bundle src/index.ts -o dist/bundle.js --sourcemapWatch Mode
Section titled “Watch Mode”zntc --bundle src/index.ts -o dist/bundle.js --watchDev Server
Section titled “Dev Server”# Static file servingzntc --serve
# Bundle + HMRzntc --serve --bundle src/index.tsApp Builder
Section titled “App Builder”For Vite-style index.html apps, use zntc dev / zntc build.
<link rel="stylesheet" href="/src/style.css" /><script type="module" src="/src/main.ts"></script># HTML/env/public prepare + bundle + CSS HMRzntc dev
# write dist/zntc buildIf the app root contains postcss.config.*, ZNTC applies it to CSS in both dev
and build. Tailwind v4 uses @tailwindcss/postcss.