In the world of web development, speed matters. Build times can be a major bottleneck, slowing down deployments and frustrating developers. While TypeScript has revolutionized how we write JavaScript, its compilation step adds another layer to our build process. Tools like Webpack and Rollup are powerful but often come with complex configurations and slower performance.
Enter esbuild, a revolutionary JavaScript bundler written in Go, renowned for being orders of magnitude faster than its counterparts. But what if you could harness this incredible speed without installing a single local dependency or wrestling with build scripts?
That's precisely where esbuild.do comes in. We've packaged the blazing-fast power of esbuild into a simple, scalable API, creating esbuild as a Service.
esbuild.do provides esbuild's robust bundling, transpilation, and minification capabilities through a simple and powerful API. It's an agent on the .do agentic workflow platform, designed to perform one task exceptionally well: building your web assets.
With esbuild.do, you can integrate a high-speed build step into any application or workflow without ever needing to install or configure local build tools. Just send your code, and get back a perfectly bundled and minified asset.
While the esbuild CLI is fantastic, using an API like esbuild.do abstracts away the inherent complexities of managing build environments. This approach unlocks several key advantages:
Getting started is incredibly straightforward, especially with the @do-business/sdk. Let's bundle a TypeScript snippet directly from a string.
import { Agent } from '@do-business/sdk';
// Initialize the agent for our service
const esbuild = new Agent('esbuild.do');
// Bundle TypeScript code from a string
async function bundle() {
const { code, map } = await esbuild.bundle({
entryPoints: ['index.ts'],
sources: {
'index.ts': 'const greet = (name: string): string => `Hello, ${name}!`; console.log(greet("World"));'
},
bundle: true,
minify: true,
platform: 'node',
target: 'es2020'
});
console.log('--- Bundled JS ---');
console.log(code);
}
bundle();
Let's break down this example:
The result is production-ready JavaScript, bundled and minified in milliseconds.
esbuild.do supports the core functionality that makes esbuild a favorite among developers. As a complete JavaScript and TypeScript bundler, it can handle:
This build tool as a service model is perfect for a variety of modern development scenarios:
Stop wrestling with complex configurations and slow build times. esbuild.do offers the extreme speed of esbuild with the simplicity of an API call. By abstracting away the toolchain, you can focus on what you do best: writing great code.
Ready to turbocharge your build process? Try esbuild.do today and experience the power of bundling as a service.