Serpack is optimized for high-speed bundling and execution of TypeScript files, leveraging swc as a transformer and oxc as a resolver for enhanced performance.
This project is designed to be a versatile tool for JavaScript and TypeScript development, providing fast compilation and module bundling capabilities. It is particularly useful for building CLI applications, server-side scripts, and other Node.js-based projects.
By default, serpack is built to run Javascript/Typescript, but it also supports module bundling!
- ⚡ Lightning Fast: Your JavaScript/TypeScript file will be compiled it in the blink of an eye.
- 📦 Module Bunling: Bundle multiple files into one file.
- 🚀 TypeScript Supported: TypeScript compilation is also possible.
$ serpack <path>Compile a TypeScript or Javascript file in a executable code.
import { compile } from 'serpack';
compile('foo/bar.ts', {
/* options */
}).then(({ code }) => {
eval(code);
});- JavaScript:
js,cjs,mjs,jsx - TypeScript:
ts,cts,mts,tsx - JSON:
json
flowchart TD
A[TypeScript Files] --> B[SWC - Transformer]
A --> C[OXC - Resolver]
B --> D[Bundling]
C --> D[Bundling]
D --> E[Optimized Compiler]
MIT