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
15 hours ago (0.15.1)

This entry file is for exposing the core API.

Functions

f
defineMacro

A TypeScript helper function that defines a macro.

f
resolveOptions

Resolves the options for the plugin.

f
transformMacros

Transforms macros in the given source code.

Interfaces

I
MacroContext

Represents the context object passed to macros.

I
Options

Represents the options for the plugin.

Type Aliases

T
OptionsResolved

Represents the resolved options for the plugin.

Add Package

deno add jsr:@unplugin/macros

Import symbol

import * as mod from "@unplugin/macros/api";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@unplugin/macros/api";

Add Package

npx jsr add @unplugin/macros

Import symbol

import * as mod from "@unplugin/macros/api";

Add Package

yarn dlx jsr add @unplugin/macros

Import symbol

import * as mod from "@unplugin/macros/api";

Add Package

pnpm dlx jsr add @unplugin/macros

Import symbol

import * as mod from "@unplugin/macros/api";

Add Package

bunx jsr add @unplugin/macros

Import symbol

import * as mod from "@unplugin/macros/api";