esbuild
tsup
esbuild | tsup | |
---|---|---|
347 | 26 | |
38,446 | 9,545 | |
0.5% | - | |
9.0 | 8.7 | |
12 days ago | 4 days ago | |
Go | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
esbuild
-
Modern JavaScript for Django Developers
> like individual loaders/modules are/were slow, rather than webpack itself
tbh this is just nitpicking, I'm not a react developer to do CRA debugging for them. They're paid by Facebook a couple orders of magnitude more than what we're making here, and if they're fine with the intact CRA configuration being that slow, while a third-party alternative rips through the massive pile of shit I'm working on while not bringing any obvious downsides, I'll just to the alternative.
It's a well known problem: esbuild, which is the base of vite's HMR, boasts of speeds dozens to hundreds of times faster than webpack:
https://github.com/evanw/esbuild?tab=readme-ov-file#why
-
Custom builder for Angular: My way
Micro-frontend has always aroused my curiosity: I wanted to understand how they work, how to build them, what their pros and cons are. In 2018, inspired by this topic, I tried to build something similar to single-spa in one of the pet projects. At that time, there was no Webpack Module Federation (WMF), and Webpack itself seemed inconvenient. The choice fell on ESBuild and importmap. Browser support for importmap at the time was mostly on paper or with special flags in browsers. For this reason, I used a polyfill. But, surprisingly, everything worked and even in several projects.
-
A Simple Approach to SSR with React 19 and esbuild
Why esbuild? compared to other tools esbuild keeps things minimal, it is very fast(the fastest bundler as of today) and supports typescript and esm by default.
-
Optimizing React Development with Vite🤩.
Instant Hot Module Replacement (HMR): During development, Vite only processes the changed files and updates them in the browser instantly, making it incredibly fast and responsive. Optimized Build Process: Vite uses esbuild under the hood for fast JavaScript transpilation, which is significantly faster than Babel. Production Build with Rollup: For production builds, Vite uses Rollup, a highly efficient bundler that produces optimized code.
-
Streamlining frontend CI/CD pipelines with enhanced observability
We have transitioned to using Esbuild for our project's build process and, experiencing a substantial increase in speed compared to our previous setup with Webpack. The primary bottleneck we faced with Webpack was its long build times. Now, with Esbuild integrated into our development environment, our build times have been dramatically reduced to about five seconds, significantly enhancing the efficiency of our workflow.
-
What is Evan You doing by creating VoidZero, and what are the issues with JS toolchains?
However, new tools such as SWC and esbulid now also support JS code compression, and their execution efficiency is higher. After all, Rust or Go inherently have much higher execution efficiency than JS.
-
Node.js and esbuild: beware of mixing cjs and esm
When executing esbuild bundled code with --platform=node you may have come across one of the following runtime errors:
-
Node.js: A brief history of cjs, bundlers, and esm
npm packages dramatically sped up the productivity of developers by being able to leverage other developers' work. However, it had a major disadvantage: cjs was not compatible with web browsers. To solve this problem, the concept of bundlers was born. browserify was the first bundler which essentially worked by traversing an entry point and "bundling" all the require()-ed code into a single .js file compatible with web browsers. As time went on, other bundlers with additional features and differentiators were introduced. Most notably webpack, parcel, rollup, esbuild and vite (in chronological order).
- ESBuild package gone from NPM registry
-
Make your Vite applications run a little faster
Using a more raw toolchain is also a good way to speed things up; the SWC website shows it to be 20 to 70 times faster than Babel, and there are tons of speed advantages in complex real-world applications, which proves that rawness can be a big help in speeding things up. Instead of vite-plugin-react, you can use @vitejs/plugin-react-swc, with LightningCSS instead of PostCSS, SWC or esbuild instead of Babel, etc. etc. to achieve better performance.
tsup
-
Building a Library to Sync TanStack Table State with URL Parameters
By the way, this is the first time I’ve published one of my own packages on npm. It was a great experience to learn how to publish on npm and discover the convenience of tools like tsup.
-
Design System Starter Template - All Technology You'll Ever Need
The Icons and Fonts modules add depth to the visual language. Icons are managed through an efficient process that generates components from SVG files using SVGR and tsup. This ensures that icons are consistent and can be flexibly integrated across the system.
-
tsup to bundle your TypeScript package
1. tsup docs: https://tsup.egoist.dev/ 2. npm: https://www.npmjs.com/package/tsup 3. tsup usage in shadcn-ui/ui: https://github.com/shadcn-ui/ui/blob/main/packages/cli/package.json#L33 4. My open source CLI related project: https://github.com/Ramu-Narasinga/TThroo/blob/main/packages/cli/package.json#L35
-
neotraverse: unbloating traverse
All the compilation of new features into old ones is done internally by @swc/core, which is a very fast compiler. Luckily its all built-in into tsup, which is the build tool I use for every single package I publish and cannot recommend it enough.
-
Server-side Rendering (SSR) From Scratch with React
Now, we can run all this server reaching the port 4000. If you want to test, build it with tsup or any other way that you want, like ts-node.
-
Creating a package/library using nextjs and typescript
If you're building hooks, providers & components you can go with only React + TypeScript, and use something ESBuild or tsup to build it.
-
Is there an automated way to create a file with the Node interpreter specified?
I am using `tsup` to transpile my application - https://github.com/egoist/tsup
- Create an npm package template with TypeScript and tsup
-
Ease your module bundling woes with tsup
I spent way to much time over the last couple days trying to line up vite/rollup to bundle my component library with types, type maps and the correct formats. Until I ran across this blog post which introduced me to https://github.com/egoist/tsup and it all just worked in a single readable command. I figured I'd share with you beautiful people so you could get your code bundled faster and carry on with the fun part of programming.
-
Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect
As we iterate on the definition, we are going to want a better developer experience for rebuilding the package on changes. Typically, for a “library” or “utility” style package, I’d reach for either unbuild’s stub concept or use esbuild/tsup/rollup to implement a more traditional watch/rebuild, but in this case, I’m watching a proto file that lives outsides of the source, which breaks assumptions of those tools.
What are some alternatives?
swc - Rust-based platform for the Web
Rollup - Next-generation ES module bundler
vite - Next generation frontend tooling. It's fast!
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
parcel - The zero configuration build tool for the web. 📦🚀
tsdx - Zero-config CLI for TypeScript package development
terser - đź—ś JavaScript parser, mangler and compressor toolkit for ES6+
turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]