---
title: esbuild
---

# tools.esbuild

- **Type:** `Object`
- **Default:** `undefined`

:::warning
**The esbuild feature in the current document is no longer maintained**, we recommend using the Rspack + SWC solution, because Rspack + SWC provide better build performance, richer features, and better compatibility.

Please refer to [「Use Rspack」](/guides/advanced-features/rspack-start.html) for more information.

:::

## Introduction

import Esbuild from '@site-docs-en/components/esbuild.mdx';

<Esbuild />

## Configuration

You can set the esbuild compilation behavior through the `tools.esbuild` config.

```js title="modern.config.ts"
import { defineConfig } from '@modern-js/app-tools';

export default defineConfig({
  tools: {
    esbuild: {
      loader: {
        target: 'chrome61',
      },
      minimize: {
        target: 'chrome61',
      },
    },
  },
});
```

For config details, please refer to [Esbuild Plugin Configuration](/plugin/rsbuild-plugins/plugin-esbuild.html#config).
