A TypeScript bundler that uses a native Rust front-end for fast graph resolution and shim emission, with Google Closure Compiler as the final optimizer for aggressive dead code elimination and property renaming. Version 0.1.8 is current; release cadence is irregular. Key differentiators: preserves Closure's advanced optimization while moving non-Closure stages to Rust, resulting in smaller and faster output than standard TS bundlers. Supports browser-safe ESM and statically analyzable CommonJS from node_modules, lazy loading via import(), and optional chunk mode. Compatible with Vite 7 or 8 as a peer dependency.
npm install gcc-ts-bundlerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates the basic programmatic API: building with advanced Closure optimizations and cleaning cache after build.
Use import syntax or dynamic import() instead of require().
Use static imports and avoid Node-specific modules if targeting browsers.
Ensure import() arguments are plain string literals.
Only enable chunk mode if you understand the bootstrap/script split behavior.
Use cleanCache() or set cache.mode to 'volatile' to disable persistence.
Switch to import syntax or use dynamic import() in a CommonJS context.
Use `import { build } from 'gcc-ts-bundler'` (curly braces).Preprocess JSON to JavaScript or use a different bundler for JSON support.
Replace require() with static import or set packages.mode to include CommonJS.