Introduction
Serpack is a TypeScript/JavaScript compiler for application development, powered by swc.
This compiler is optimized for high-speed bundling and execution of TypeScript files, leveraging swc as a transformer and oxc as a resolver for enhanced performance.
By default, serpack is built to run Javascript/Typescript, but it also supports module bundling.
npx serpack ./src/awesome-app.ts # run script
ERROR
It's not ready to be used for production yet#Why?
esbuild is an excellent bundler, but Zely is a framework with its own unique requirements and ecosystem.
Therefore, developing a custom bundler, serpack, tailored specifically for Zely, offers better technical independence, optimized performance, and a more seamless developer experience
#Why SWC
SWC provides low-level access to the AST, allowing serpack to apply specific transformations directly.
This makes it possible to inject custom runtime code, handle special decorators, and implement framework-level optimizations in ways that general-purpose bundlers like esbuild cannot easily support.
#Getting Started
- try serpack on zely
npx zely dev --serpack # or npx zely-cli dev --serpack
Enable
--serpack
flag
- try serpack on your project
npm i --save-dev serpack
INFO
See Javascript APIs