tsbuild
Configuration for the tsbuild TypeScript build system
tsbuild.json
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
tsbuild.json and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
tsbuild | object | Configuration options for tsbuild. |
tsbuild.entryPoints | oneOf | Files that each serve as an input to the bundling algorithm. Can be an array of paths or an object mapping output names to input paths. When omitted, tsbuild auto-infers entry points from the `exports`, `bin`, `main`, or `module` fields in |
tsbuild.platform | string | Target platform. Auto-detected from tsconfig lib (DOM = browser, no DOM = node). Override if needed. one of: "node", "browser", "neutral" |
tsbuild.bundle | boolean | Whether to bundle source files together. When false, each file is output separately. default: true |
tsbuild.clean | boolean | Remove all files from the output directory before building. Defaults to true. default: true |
tsbuild.packages | string | Default behavior for node_modules dependencies. 'bundle' includes them in output, 'external' keeps them as imports. When omitted, tsbuild auto-selects based on platform and noExternal. one of: "bundle", "external" |
tsbuild.external | array<string> | Specific dependencies to externalize (don't bundle). In tsconfig.json this must be strings (RegExp patterns are only supported via the programmatic API). |
tsbuild.noExternal | array<string> | Specific dependencies to bundle (overrides packages setting). In tsconfig.json this must be strings (RegExp patterns are only supported via the programmatic API). |
tsbuild.dts | object | Generate TypeScript declaration files. --- **Note**: By default, external types from `node_modules` are kept as import statements and not bundled. |
tsbuild.dts.entryPoints | array<string> | Names of the project's entryPoints to be used to generate the DTS files |
tsbuild.dts.resolve | boolean | Bundle external types from node_modules into declaration files. When false, external imports remain as import statements. Defaults to false for 'node' platform, true for 'browser' and 'neutral' platforms. |
tsbuild.env | object | Environment variables to define (accessible via import.meta.env) |
tsbuild.minify | boolean | When enabled, the generated code will be minified instead of pretty-printed. |
tsbuild.sourceMap | oneOf | Generate source maps. Options: true/false, 'inline', 'external', or 'both'. Overrides tsconfig.json compilerOptions.sourceMap. |
tsbuild.splitting | boolean | Enable code splitting for better caching and parallel loading |
tsbuild.banner | object | Insert content at the beginning of generated files (e.g., shebang for CLI tools) |
tsbuild.banner.js | string | Banner text for JavaScript files |
tsbuild.banner.css | string | Banner text for CSS files |
tsbuild.footer | object | Insert content at the end of generated files (e.g., copyright notices) |
tsbuild.footer.js | string | Footer text for JavaScript files |
tsbuild.footer.css | string | Footer text for CSS files |
tsbuild.plugins | array | Custom esbuild plugins to include in the build. Each entry is either: - A **string** — npm package name or relative path to a plugin module (default export must be a factory function or Plugin object) - A **tuple** `[string, object]` — |
tsbuild.iife | oneOf | Produce additional IIFE (Immediately Invoked Function Expression) output alongside the primary ESM build. When enabled, each `.js` entry point is wrapped in an IIFE and written to an `iife/` subdirectory under the output directory. Set to |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- Has 1 place(s) where keywords sit beside
$ref. Under draft-07 those keywords are silently ignored by every conforming validator — first at#/allOf/1/properties/tsbuild. - Uses non-standard keywords that generic validators ignore:
annotations. - 24 properties, 79% carrying a description, max nesting depth 10.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
allOf | JSON Schema Core, draft 2020-12 | §10.2.1.1 — "allOf" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
examples | JSON Schema Validation, draft 2020-12 | §9.5 — "examples" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
minItems | JSON Schema Validation, draft 2020-12 | §6.4.2 — "minItems" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.