In the fast-paced world of web development, build tools are the unsung heroes working behind the scenes. They compile, bundle, and minify our code, turning complex source files into optimized assets ready for the browser. But this power often comes with a cost: slow build times, complex configurations, and heavy node_modules directories. What if you could harness the power of the fastest bundler on the market without any of the setup?
Enter esbuild.do, a new service that provides the blazing-fast capabilities of esbuild through a simple, on-demand API. Transpile, bundle, and minify your code whenever and wherever you need it, freeing you from the chains of local build dependencies.
For years, developers have navigated a landscape of powerful but often cumbersome build tools. Setting up a project involves wrestling with webpack.config.js or rollup.config.js, installing dozens of plugins, and waiting for slow incremental builds. In modern environments like serverless functions or dynamic code playgrounds, installing a full Node.js toolchain just to transpile a snippet of code is inefficient and impractical.
This is the problem esbuild was built to solve. Written in Go, it leverages parallel processing to achieve speeds that are 10-100x faster than traditional JavaScript-based bundlers. But you still needed to install it, manage versions, and run it within a Node.js environment. Until now.
esbuild.do takes the revolutionary speed of esbuild and delivers it as an agentic workflow. Instead of installing packages and running a CLI, you make a simple API call.
This approach unlocks a world of possibilities:
Using the service is incredibly straightforward, especially with the official @do-inc/sdk. Let's bundle a simple TypeScript snippet into minified, browser-ready code.
import { doing } from '@do-inc/sdk';
// Bundle and minify a TypeScript code snippet into a single string.
const { bundledCode } = await doing.esbuild({
entryPoints: ['index.ts'],
sourceFiles: {
'index.ts': `
const message: string = 'Hello, ESBuild!';
console.log(message);
`
},
bundle: true,
minify: true,
platform: 'node',
format: 'esm'
});
console.log(bundledCode);
// Output: console.log("Hello, ESBuild!");
In this example, we aren't reading from the local filesystem. We provide the source code directly in the sourceFiles object. The API handles the entire process—transpiling TypeScript, bundling dependencies (if any), and minifying the output—and returns a single string of optimized code. It's that simple.
Q: What is esbuild.do?
A: esbuild.do is an agentic workflow that provides the capabilities of the esbuild JavaScript bundler and minifier through a simple, on-demand REST API, eliminating the need for local installation or complex build configurations.
Q: Why use esbuild.do instead of the esbuild CLI?
A: Use esbuild.do in serverless functions, CI/CD pipelines, or any environment where you want to avoid managing local Node.js dependencies. It's perfect for dynamic code transpilation, playground environments, or simplifying build steps.
Q: What file types can I process?
A: esbuild.do supports everything the native esbuild tool does, including JavaScript, TypeScript (TS/TSX), JSX, and CSS. You can configure loaders, target versions, and output formats just as you would with the CLI.
Q: Is it secure to send my source code to the API?
A: Absolutely. Each API call runs in a secure, isolated sandbox. Your source code is used only for the duration of the bundling process and is not stored or logged.
Stop letting complex build setups slow you down. With esbuild.do, you can integrate an Extremely Fast Bundling process into any application or workflow with a single API call.
Ready to experience the future of on-demand code transformation?