APIActive

esbuild Plugin API

Plugin API to inject code into esbuild's build process via JS or Go.

Open source page ↗

Field note

What it does

The esbuild plugin API lets you inject code into various parts of the build process. It is not available from the command line and only works with the build API, not the transform API.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

npm

JavaScript / esbuild

sdk

Go / github.com/evanw/esbuild/pkg/api

Product features

Product features

Accessing build options

Plugins can access the build options.

# Async API

# Build

# Bundle

Caching your plugin

Plugins can implement caching.

# Cancel

Filters

Every callback must provide a regular expression filter to skip calling the callback when the path doesn't match.

# General options

# Glob-style imports

# In the browser

# JS-specific details

# Non-analyzable imports

# Overview

Resolving paths

Plugins can resolve paths.

# Sync API

# Transform

Virtual modules

Plugins can create virtual modules using a namespace other than file.