Function: default()
default(
options):Options|Options[] | (overrideOptions) =>MaybePromise<Options|Options[]>
Defined in: tsup.config.js:30
The only tsup build configuration to import and use in your project’s tsup.config.ts file.
Parameters
options
Options
Returns
Options | Options[] | (overrideOptions) => MaybePromise<Options | Options[]>
Remarks
- Outputs modern ESM (
.mjs) bundles with type declarations. - Cleans previous builds and applies tree-shaking by default.
- no
sourcemap, and itsminified. - Accepts extra Options | tsup options via the
optionsparameter for extension.
Example
- Create
tsup.config.tsin your project root folder, then add the code below
import defineConfig from "@mohammad_obed/config/tsup.config";
export default defineConfig({
entry: ["src"], // add/edit subpaths as needed
outDir: "dist",
});