Skip to main content

Built and signed on GitHub Actions

Macros plugin for bundlers.

This package works with Node.js, BunIt is unknown whether this package works with Cloudflare Workers, Deno
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
This package works with Bun
JSR Score
100%
Published
2 weeks ago (0.16.2)

api

This entry file is for exposing the core API.

f
defineMacro

A TypeScript helper function that defines a macro.

I
MacroContext

Represents the context object passed to macros.

I
Options

Represents the options for the plugin.

T
OptionsResolved

Represents the resolved options for the plugin.

f
resolveOptions

Resolves the options for the plugin.

f
transformMacros

Transforms macros in the given source code.

esbuild

This entry file is for esbuild plugin. Requires esbuild >= 0.15

v
default

Esbuild plugin

v
module.exports

Esbuild plugin

index

This entry file is for main unplugin.

v
default

The main unplugin instance.

rolldown

This entry file is for Rolldown plugin.

v
default

Rolldown plugin

v
module.exports

Rolldown plugin

rollup

This entry file is for Rollup plugin.

v
default

Rollup plugin

v
module.exports

Rollup plugin

rspack

This entry file is for rspack plugin.

v
default

Rspack plugin

v
module.exports

Rspack plugin

vite

This entry file is for Vite plugin.

v
default

Vite plugin

v
module.exports

Vite plugin

webpack

This entry file is for webpack plugin.

v
default

Webpack plugin

v
module.exports

Webpack plugin