Skip to main content
Home
This package has been archived, and as such it is read-only.

Built and signed on GitHub Actions

The elegant bundler for libraries powered by Rolldown.

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
7 months ago (0.9.1)
interface Options

Options for tsdown.

Properties

optional
entry: InputOption
optional
external: ExternalOption
optional
noExternal: Arrayable<string | RegExp> | ((
id: string,
importer: string | undefined,
) =>
boolean
| null
| undefined
| void
)
optional
alias: Record<string, string>
optional
platform:
"node"
| "neutral"
| "browser"
optional
inputOptions: InputOptions | ((
options: InputOptions,
format: NormalizedFormat,
) => Awaitable<
InputOptions
| void
| null
>)
optional
format: ModuleFormat | ModuleFormat[]
optional
outDir: string
optional
sourcemap: Sourcemap
optional
clean: boolean | string[]
optional
minify: boolean
optional
target: string | string[]
optional
define: Record<string, string>
optional
shims: boolean

Use a fixed extension for output files. The extension will always be .cjs or .mjs. Otherwise, it will depend on the package type.

optional
outExtensions: OutExtensionFactory

Custom extensions for output files. fixedExtension will be overridden by this option.

optional
outputOptions: OutputOptions | ((
options: OutputOptions,
format: NormalizedFormat,
) => Awaitable<
OutputOptions
| void
| null
>)
optional
plugins: InputOptions["plugins"]
optional
silent: boolean
optional
config: boolean | string

Config file path

optional
watch:
optional
onSuccess: string | ((config: ResolvedOptions) => void | Promise<void>)

You can specify command to be executed after a successful build, specially useful for Watch mode

Skip bundling node_modules.

optional
fromVite: boolean | "vitest"

Reuse config from Vite or Vitest (experimental)

optional
dts: boolean | DtsOptions

Emit declaration files

optional
unused: boolean | UnusedOptions

Enable unused dependencies check with unplugin-unused Requires unplugin-unused to be installed.

optional
publint: boolean | PublintOptions

Run publint after bundling. Requires publint to be installed.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";
or

Import directly with a jsr specifier

import { type Options } from "jsr:@sxzz/tsdown";

Add Package

pnpm i jsr:@sxzz/tsdown
or (using pnpm 10.8 or older)
pnpm dlx jsr add @sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";

Add Package

yarn add jsr:@sxzz/tsdown
or (using Yarn 4.8 or older)
yarn dlx jsr add @sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";

Add Package

vlt install jsr:@sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";

Add Package

npx jsr add @sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";

Add Package

bunx jsr add @sxzz/tsdown

Import symbol

import { type Options } from "@sxzz/tsdown";