diff --git a/examples/cjs-interop/package.json b/examples/cjs-interop/package.json index 2cd076918..93d4409c2 100644 --- a/examples/cjs-interop/package.json +++ b/examples/cjs-interop/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@arethetypeswrong/cli": "^0.16.4", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/copy/package.json b/examples/copy/package.json index ed2eaf56e..7afb72636 100644 --- a/examples/copy/package.json +++ b/examples/copy/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" }, diff --git a/examples/esm-cjs-exports/package.json b/examples/esm-cjs-exports/package.json index d2de5ce67..6d773be8c 100644 --- a/examples/esm-cjs-exports/package.json +++ b/examples/esm-cjs-exports/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1" } } diff --git a/examples/isolated-declarations-oxc/package.json b/examples/isolated-declarations-oxc/package.json index 85c7b2b4f..e95a04570 100644 --- a/examples/isolated-declarations-oxc/package.json +++ b/examples/isolated-declarations-oxc/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "oxc-transform": "^0.29.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" diff --git a/examples/isolated-declarations-swc/package.json b/examples/isolated-declarations-swc/package.json index 4dd684959..ef8771fc2 100644 --- a/examples/isolated-declarations-swc/package.json +++ b/examples/isolated-declarations-swc/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@swc/core": "^1.7.26", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/isolated-declarations-typescript/package.json b/examples/isolated-declarations-typescript/package.json index 8b26288cf..90180d817 100644 --- a/examples/isolated-declarations-typescript/package.json +++ b/examples/isolated-declarations-typescript/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/mixed/package.json b/examples/mixed/package.json index 0f0d04532..9143ccf27 100644 --- a/examples/mixed/package.json +++ b/examples/mixed/package.json @@ -81,7 +81,7 @@ "devDependencies": { "@types/node": "^18.19.50", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/multi-exports/package.json b/examples/multi-exports/package.json index 82ae87457..d52186ec6 100644 --- a/examples/multi-exports/package.json +++ b/examples/multi-exports/package.json @@ -61,7 +61,7 @@ "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2", "vite": "5.4.7" diff --git a/examples/native-node-module/package.json b/examples/native-node-module/package.json index f103ac7bb..fab6b3c8f 100644 --- a/examples/native-node-module/package.json +++ b/examples/native-node-module/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "nodehun": "^3.0.2", "rimraf": "^6.0.1", "typescript": "^5.6.2" diff --git a/examples/react-tsx-css/package.json b/examples/react-tsx-css/package.json index b95e9ce92..e2c99103c 100644 --- a/examples/react-tsx-css/package.json +++ b/examples/react-tsx-css/package.json @@ -20,7 +20,7 @@ "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/react-tsx/package.json b/examples/react-tsx/package.json index 88b9067e7..21449399e 100644 --- a/examples/react-tsx/package.json +++ b/examples/react-tsx/package.json @@ -40,7 +40,7 @@ "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2", "vite": "5.4.7" diff --git a/examples/react-use-client/package.json b/examples/react-use-client/package.json index 074d7275b..3ec0ab2f5 100644 --- a/examples/react-use-client/package.json +++ b/examples/react-use-client/package.json @@ -42,7 +42,7 @@ "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "rimraf": "^6.0.1", "typescript": "^5.6.2" } diff --git a/examples/transformer-esbuild/package.json b/examples/transformer-esbuild/package.json index cb7893b99..54f2c8470 100644 --- a/examples/transformer-esbuild/package.json +++ b/examples/transformer-esbuild/package.json @@ -40,7 +40,7 @@ "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "typescript": "^5.6.2" } } diff --git a/examples/types-entries/package.json b/examples/types-entries/package.json index 61c5fcaba..693ac68ff 100644 --- a/examples/types-entries/package.json +++ b/examples/types-entries/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "typescript": "^5.6.2" } } diff --git a/examples/typescript-tsconfig-paths/package.json b/examples/typescript-tsconfig-paths/package.json index cfd189f0f..432426c22 100644 --- a/examples/typescript-tsconfig-paths/package.json +++ b/examples/typescript-tsconfig-paths/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "typescript": "^5.6.2" } } diff --git a/examples/watch/package.json b/examples/watch/package.json index d75216c9c..e883e5e39 100644 --- a/examples/watch/package.json +++ b/examples/watch/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@visulima/packem": "workspace:*", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "typescript": "^5.6.2" } } diff --git a/package.json b/package.json index 284d40719..3e0ab4cc1 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "braces@<3.0.3": ">=3.0.3", "chrono-node@<2.2.4": ">=2.7.7", "micromatch@<4.0.8": ">=4.0.8", - "rollup": "^4.22.2", + "rollup": "^4.22.4", "vite@>=5.3.0 <=5.3.5": ">=5.3.6" } } diff --git a/packages/packem/.eslintignore b/packages/packem/.eslintignore index f6199044e..63c71f2ed 100644 --- a/packages/packem/.eslintignore +++ b/packages/packem/.eslintignore @@ -13,4 +13,5 @@ vitest.config.ts _meta.*.json LICENSE.md +README.md CHANGELOG.md diff --git a/packages/packem/README.md b/packages/packem/README.md index 3babdf81e..296b4209b 100644 --- a/packages/packem/README.md +++ b/packages/packem/README.md @@ -477,6 +477,56531 @@ You choose which one of the three supported transformer to use. - [@swc/core](https://github.com/swc-project/swc) - [sucrase](https://github.com/alangpierce/sucrase) +## Api Docs + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[types.ts:272](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L272) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:273](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L273) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:274](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L274) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:275](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L275) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:220](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L220) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:222](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L222) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:223](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L223) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:225](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L225) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:226](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L226) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:227](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L227) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:229](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L229) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:230](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L230) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:232](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L232) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:233](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L233) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:163](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L163) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:165](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L165) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:166](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L166) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:167](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L167) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:175](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L175) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:185](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L185) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:186](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L186) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:187](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L187) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:191](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L191) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:193](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L193) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:194](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L194) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:195](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L195) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:196](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L196) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:147](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L147) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:278](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L278) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:145](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L145) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:163](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L163) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:165](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L165) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:166](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L166) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:167](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L167) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:175](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L175) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:185](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L185) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:186](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L186) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:187](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L187) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:191](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L191) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:193](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L193) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:194](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L194) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:195](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L195) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:196](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L196) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:264](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L264) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:265](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L265) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:267](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L267) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:268](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L268) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:269](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L269) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:270](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L270) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:271](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L271) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + +; +``` + +###### Defined in + +[packages/packem/src/types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[packages/packem/src/types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[packages/packem/src/types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: [`RollupBuild`](-internal-/README.md#rollupbuild) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: [`RollupOptions`](-internal-/README.md#rollupoptions) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: [`RollupWatcher`](-internal-/README.md#rollupwatcher) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[packages/packem/src/types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Extended by + +- [`InternalBuildOptions`](-internal-/README.md#internalbuildoptions) + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<[`IsolatedDeclarationsResult`](-internal-/README.md#isolateddeclarationsresult)\> + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: [`EsbuildPluginConfig`](-internal-/README.md#esbuildpluginconfig) \| [`SucrasePluginConfig`](-internal-/README.md#sucrasepluginconfig) \| [`SwcPluginConfig`](-internal-/README.md#swcpluginconfig) + +###### Returns + +[`Plugin`](-internal-/README.md#plugina)\<`any`\> + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[packages/packem/src/types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[packages/packem/src/types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[packages/packem/src/types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[packages/packem/src/types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[packages/packem/src/types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[packages/packem/src/types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[packages/packem/src/types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[packages/packem/src/types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[packages/packem/src/types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[packages/packem/src/types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[packages/packem/src/types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[packages/packem/src/types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[packages/packem/src/types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[packages/packem/src/config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[packages/packem/src/config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[packages/packem/src/config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Index + +### Modules + +- [\](-internal-/README.md) + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: [`PailServerType`](-internal-/README.md#pailservertypet-l) + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/packem/src/create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- [`DeepPartial`](-internal-/README.md#deeppartialt)\<[`Omit`](-internal-/README.md#omitt-k)\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[packages/packem/src/types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[packages/packem/src/types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[packages/packem/src/types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[packages/packem/src/types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[packages/packem/src/types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[packages/packem/src/types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[packages/packem/src/types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[packages/packem/src/types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[packages/packem/src/types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[packages/packem/src/types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[packages/packem/src/types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[packages/packem/src/types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[packages/packem/src/types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[packages/packem/src/types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[packages/packem/src/types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[packages/packem/src/types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[packages/packem/src/types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[packages/packem/src/types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[packages/packem/src/types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[packages/packem/src/types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[packages/packem/src/types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[packages/packem/src/types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[packages/packem/src/types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[packages/packem/src/types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[packages/packem/src/types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[packages/packem/src/types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[packages/packem/src/types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[packages/packem/src/types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[packages/packem/src/types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[packages/packem/src/types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[packages/packem/src/types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[packages/packem/src/types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[packages/packem/src/types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[packages/packem/src/types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson +# cli +# config + +## Functions + +### defineConfig() + +```ts +function defineConfig(config): BuildConfig | BuildConfigFunction +``` + +Define a build configuration. + +#### Parameters + +• **config**: [`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| [`BuildConfigFunction`](config.md#buildconfigfunction) + +#### Defined in + +[config.ts:14](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L14) + +*** + +### definePreset() + +```ts +function definePreset(preset): BuildPreset +``` + +Define a build preset. + +#### Parameters + +• **preset**: [`BuildPreset`](create-bundler.md#buildpreset) + +#### Returns + +[`BuildPreset`](create-bundler.md#buildpreset) + +#### Defined in + +[config.ts:24](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L24) + +## Type Aliases + +### BuildConfigFunction() + +```ts +type BuildConfigFunction: (enviroment, mode) => BuildConfig | Promise; +``` + +#### Parameters + +• **enviroment**: [`Environment`](create-bundler.md#environment-2) + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +#### Returns + +[`BuildConfig`](create-bundler.md#buildconfig) \| `Promise`\<[`BuildConfig`](create-bundler.md#buildconfig)\> + +#### Defined in + +[config.ts:3](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/config.ts#L3) + +## References + +### BuildConfig + +Re-exports [BuildConfig](create-bundler.md#buildconfig) + +### BuildHooks + +Re-exports [BuildHooks](create-bundler.md#buildhooks) + +### BuildPreset + +Re-exports [BuildPreset](create-bundler.md#buildpreset) +# create-bundler + +## Functions + +### createBundler() + +```ts +function createBundler( + rootDirectory, + mode, + environment, + logger, +inputConfig): Promise +``` + +#### Parameters + +• **rootDirectory**: `string` + +• **mode**: [`Mode`](create-bundler.md#mode-1) + +• **environment**: [`Environment`](create-bundler.md#environment-2) + +• **logger**: `PailServerType` + +• **inputConfig**: `object` & [`BuildConfig`](create-bundler.md#buildconfig) = `{}` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[create-bundler.ts:609](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/create-bundler.ts#L609) + +## Interfaces + +### BuildConfig + +In addition to basic `entries`, `presets`, and `hooks`, +there are also all the properties of `BuildOptions` except for BuildOption's `entries`. + +#### Extends + +- `DeepPartial`\<`Omit`\<[`BuildOptions`](create-bundler.md#buildoptions), `"entries"`\>\> + +#### Properties + +##### alias? + +```ts +optional alias: DeepPartial>; +``` + +###### Inherited from + +`DeepPartial.alias` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.analyze` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.cjsInterop` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean? + +```ts +optional clean: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.clean` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug? + +```ts +optional debug: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.debug` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: DeepPartial; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Inherited from + +`DeepPartial.declaration` + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: DeepPartial; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Inherited from + +`DeepPartial.dtsOnly` + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitCJS` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.emitESM` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries? + +```ts +optional entries: (string | BuildEntry)[]; +``` + +###### Defined in + +[types.ts:302](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L302) + +##### externals? + +```ts +optional externals: (undefined | DeepPartial)[]; +``` + +###### Inherited from + +`DeepPartial.externals` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.failOnWarn` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.fileCache` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### hooks? + +```ts +optional hooks: Partial; +``` + +###### Defined in + +[types.ts:303](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L303) + +##### isolatedDeclarationTransformer? + +```ts +optional isolatedDeclarationTransformer: DeepPartial Promise>; +``` + +###### Inherited from + +`DeepPartial.isolatedDeclarationTransformer` + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti? + +```ts +optional jiti: DeepPartial>; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Inherited from + +`DeepPartial.jiti` + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.minify` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name? + +```ts +optional name: string; +``` + +###### Inherited from + +`DeepPartial.name` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir? + +```ts +optional outDir: string; +``` + +###### Inherited from + +`DeepPartial.outDir` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### preset? + +```ts +optional preset: "none" | "auto" | BuildPreset | object & string; +``` + +###### Defined in + +[types.ts:304](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L304) + +##### rollup? + +```ts +optional rollup: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.rollup` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir? + +```ts +optional rootDir: string; +``` + +###### Inherited from + +`DeepPartial.rootDir` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir? + +```ts +optional sourceDir: string; +``` + +###### Inherited from + +`DeepPartial.sourceDir` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap? + +```ts +optional sourcemap: DeepPartial; +``` + +**`Experimental`** + +###### Inherited from + +`DeepPartial.sourcemap` + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer? + +```ts +optional transformer: DeepPartial<(config) => Plugin>; +``` + +###### Inherited from + +`DeepPartial.transformer` + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc? + +```ts +optional typedoc: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.typedoc` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: DeepPartial; +``` + +###### Inherited from + +`DeepPartial.validation` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### BuildContext + +#### Properties + +##### buildEntries + +```ts +buildEntries: (BuildContextBuildEntry | BuildContextBuildAssetAndChunk)[]; +``` + +###### Defined in + +[types.ts:281](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L281) + +##### dependencyGraphMap + +```ts +dependencyGraphMap: Map>; +``` + +###### Defined in + +[types.ts:282](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L282) + +##### environment + +```ts +environment: Environment; +``` + +###### Defined in + +[types.ts:283](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L283) + +##### hooks + +```ts +hooks: Hookable>; +``` + +###### Defined in + +[types.ts:284](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L284) + +##### jiti + +```ts +jiti: Jiti; +``` + +###### Defined in + +[types.ts:285](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L285) + +##### logger + +```ts +logger: PailServerType; +``` + +###### Defined in + +[types.ts:286](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L286) + +##### mode + +```ts +mode: Mode; +``` + +###### Defined in + +[types.ts:287](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L287) + +##### options + +```ts +options: InternalBuildOptions; +``` + +###### Defined in + +[types.ts:288](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L288) + +##### pkg + +```ts +pkg: PackageJson; +``` + +###### Defined in + +[types.ts:289](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L289) + +##### tsconfig? + +```ts +optional tsconfig: TsConfigResult; +``` + +###### Defined in + +[types.ts:290](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L290) + +##### usedImports + +```ts +usedImports: Set; +``` + +###### Defined in + +[types.ts:291](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L291) + +##### warnings + +```ts +warnings: Set; +``` + +###### Defined in + +[types.ts:292](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L292) + +*** + +### BuildHooks + +#### Properties + +##### build:before() + +```ts +build:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:235](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L235) + +##### build:done() + +```ts +build:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:236](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L236) + +##### build:prepare() + +```ts +build:prepare: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:237](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L237) + +##### rollup:build() + +```ts +rollup:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:239](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L239) + +##### rollup:done() + +```ts +rollup:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:240](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L240) + +##### rollup:dts:build() + +```ts +rollup:dts:build: (context, build) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **build**: `RollupBuild` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:242](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L242) + +##### rollup:dts:done() + +```ts +rollup:dts:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:243](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L243) + +##### rollup:dts:options() + +```ts +rollup:dts:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:244](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L244) + +##### rollup:options() + +```ts +rollup:options: (context, options) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **options**: `RollupOptions` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:246](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L246) + +##### rollup:watch() + +```ts +rollup:watch: (context, watcher) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +• **watcher**: `RollupWatcher` + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:247](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L247) + +##### typedoc:before() + +```ts +typedoc:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:249](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L249) + +##### typedoc:done() + +```ts +typedoc:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:250](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L250) + +##### validate:before() + +```ts +validate:before: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:252](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L252) + +##### validate:done() + +```ts +validate:done: (context) => void | Promise; +``` + +###### Parameters + +• **context**: [`BuildContext`](create-bundler.md#buildcontext) + +###### Returns + +`void` \| `Promise`\<`void`\> + +###### Defined in + +[types.ts:253](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L253) + +*** + +### BuildOptions + +#### Properties + +##### alias + +```ts +alias: Record; +``` + +###### Defined in + +[types.ts:180](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L180) + +##### analyze? + +```ts +optional analyze: boolean; +``` + +###### Defined in + +[types.ts:181](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L181) + +##### cjsInterop? + +```ts +optional cjsInterop: boolean; +``` + +###### Defined in + +[types.ts:182](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L182) + +##### clean + +```ts +clean: boolean; +``` + +###### Defined in + +[types.ts:183](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L183) + +##### debug + +```ts +debug: boolean; +``` + +###### Defined in + +[types.ts:184](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L184) + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +`compatible` means "src/gather.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts". +`node16` means "src/gather.ts" will generate "dist/index.d.mts" and "dist/index.d.cts". +`true` is equivalent to `compatible`. +`false` will disable declaration generation. +`undefined` will auto-detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`. + +###### Defined in + +[types.ts:192](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L192) + +##### dtsOnly? + +```ts +optional dtsOnly: boolean; +``` + +If `true`, only generate declaration files. +If `false` or `undefined`, generate both declaration and source files. + +###### Defined in + +[types.ts:197](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L197) + +##### emitCJS? + +```ts +optional emitCJS: boolean; +``` + +###### Defined in + +[types.ts:198](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L198) + +##### emitESM? + +```ts +optional emitESM: boolean; +``` + +###### Defined in + +[types.ts:199](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L199) + +##### entries + +```ts +entries: BuildEntry[]; +``` + +###### Defined in + +[types.ts:200](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L200) + +##### externals + +```ts +externals: (string | RegExp)[]; +``` + +###### Defined in + +[types.ts:201](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L201) + +##### failOnWarn? + +```ts +optional failOnWarn: boolean; +``` + +###### Defined in + +[types.ts:202](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L202) + +##### fileCache? + +```ts +optional fileCache: boolean; +``` + +###### Defined in + +[types.ts:203](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L203) + +##### isolatedDeclarationTransformer()? + +```ts +optional isolatedDeclarationTransformer: (code, id) => Promise; +``` + +###### Parameters + +• **code**: `string` + +• **id**: `string` + +###### Returns + +`Promise`\<`IsolatedDeclarationsResult`\> + +###### Defined in + +[types.ts:204](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L204) + +##### jiti + +```ts +jiti: Omit; +``` + +Jiti options, where [jiti](https://github.com/unjs/jiti) is used to load the entry files. + +###### Defined in + +[types.ts:208](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L208) + +##### minify? + +```ts +optional minify: boolean; +``` + +###### Defined in + +[types.ts:209](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L209) + +##### name + +```ts +name: string; +``` + +###### Defined in + +[types.ts:210](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L210) + +##### outDir + +```ts +outDir: string; +``` + +###### Defined in + +[types.ts:211](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L211) + +##### rollup + +```ts +rollup: RollupBuildOptions; +``` + +###### Defined in + +[types.ts:212](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L212) + +##### rootDir + +```ts +rootDir: string; +``` + +###### Defined in + +[types.ts:213](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L213) + +##### sourceDir + +```ts +sourceDir: string; +``` + +###### Defined in + +[types.ts:214](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L214) + +##### sourcemap + +```ts +sourcemap: boolean; +``` + +**`Experimental`** + +###### Defined in + +[types.ts:216](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L216) + +##### transformer() + +```ts +transformer: (config) => Plugin; +``` + +###### Parameters + +• **config**: `EsbuildPluginConfig` \| `SucrasePluginConfig` \| `SwcPluginConfig` + +###### Returns + +`Plugin`\<`any`\> + +###### Defined in + +[types.ts:217](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L217) + +##### typedoc + +```ts +typedoc: false | TypeDocumentOptions; +``` + +###### Defined in + +[types.ts:218](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L218) + +##### validation? + +```ts +optional validation: object; +``` + +###### packageJson? + +```ts +optional packageJson: object; +``` + +###### packageJson.bin? + +```ts +optional bin: boolean; +``` + +###### packageJson.dependencies? + +```ts +optional dependencies: boolean; +``` + +###### packageJson.exports? + +```ts +optional exports: boolean; +``` + +###### packageJson.files? + +```ts +optional files: boolean; +``` + +###### packageJson.main? + +```ts +optional main: boolean; +``` + +###### packageJson.module? + +```ts +optional module: boolean; +``` + +###### packageJson.name? + +```ts +optional name: boolean; +``` + +###### packageJson.types? + +```ts +optional types: boolean; +``` + +###### packageJson.typesVersions? + +```ts +optional typesVersions: boolean; +``` + +###### Defined in + +[types.ts:219](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L219) + +*** + +### RollupBuildOptions + +#### Properties + +##### alias + +```ts +alias: false | RollupAliasOptions; +``` + +###### Defined in + +[types.ts:103](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L103) + +##### cjsInterop? + +```ts +optional cjsInterop: CJSInteropOptions; +``` + +###### Defined in + +[types.ts:104](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L104) + +##### commonjs + +```ts +commonjs: false | RollupCommonJSOptions; +``` + +###### Defined in + +[types.ts:105](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L105) + +##### copy? + +```ts +optional copy: false | CopyPluginOptions; +``` + +###### Defined in + +[types.ts:106](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L106) + +##### dts + +```ts +dts: Options; +``` + +###### Defined in + +[types.ts:107](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L107) + +##### dynamicVars? + +```ts +optional dynamicVars: false | RollupDynamicImportVariablesOptions; +``` + +###### Defined in + +[types.ts:108](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L108) + +##### esbuild + +```ts +esbuild: false | Options; +``` + +###### Defined in + +[types.ts:109](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L109) + +##### isolatedDeclarations? + +```ts +optional isolatedDeclarations: IsolatedDeclarationsOptions; +``` + +###### Defined in + +[types.ts:110](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L110) + +##### json + +```ts +json: false | RollupJsonOptions; +``` + +###### Defined in + +[types.ts:111](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L111) + +##### jsxRemoveAttributes? + +```ts +optional jsxRemoveAttributes: false | JSXRemoveAttributesPlugin; +``` + +###### Defined in + +[types.ts:112](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L112) + +##### license? + +```ts +optional license: false | LicenseOptions; +``` + +###### Defined in + +[types.ts:113](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L113) + +##### metafile? + +```ts +optional metafile: boolean; +``` + +###### Defined in + +[types.ts:114](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L114) + +##### node10Compatibility? + +```ts +optional node10Compatibility: false | Node10CompatibilityOptions; +``` + +###### Defined in + +[types.ts:115](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L115) + +##### output? + +```ts +optional output: OutputOptions; +``` + +###### Defined in + +[types.ts:116](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L116) + +##### patchTypes + +```ts +patchTypes: false | PatchTypesOptions; +``` + +###### Defined in + +[types.ts:117](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L117) + +##### plugins? + +```ts +optional plugins: RollupPlugins; +``` + +###### Defined in + +[types.ts:118](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L118) + +##### polyfillNode? + +```ts +optional polyfillNode: false | NodePolyfillsOptions; +``` + +###### Defined in + +[types.ts:119](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L119) + +##### preserveDirectives? + +```ts +optional preserveDirectives: object; +``` + +###### directiveRegex? + +```ts +optional directiveRegex: RegExp; +``` + +###### exclude? + +```ts +optional exclude: FilterPattern; +``` + +###### include? + +```ts +optional include: FilterPattern; +``` + +###### Defined in + +[types.ts:120](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L120) + +##### preserveDynamicImports? + +```ts +optional preserveDynamicImports: boolean; +``` + +###### Defined in + +[types.ts:125](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L125) + +##### raw? + +```ts +optional raw: false | RawLoaderOptions; +``` + +###### Defined in + +[types.ts:126](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L126) + +##### replace + +```ts +replace: false | RollupReplaceOptions; +``` + +###### Defined in + +[types.ts:127](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L127) + +##### resolve + +```ts +resolve: false | RollupNodeResolveOptions; +``` + +###### Defined in + +[types.ts:128](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L128) + +##### shebang? + +```ts +optional shebang: false | Partial; +``` + +###### Defined in + +[types.ts:129](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L129) + +##### shim? + +```ts +optional shim: false | EsmShimCjsSyntaxOptions; +``` + +###### Defined in + +[types.ts:130](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L130) + +##### sucrase? + +```ts +optional sucrase: false | SucrasePluginConfig; +``` + +###### Defined in + +[types.ts:131](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L131) + +##### swc? + +```ts +optional swc: false | SwcPluginConfig; +``` + +###### Defined in + +[types.ts:132](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L132) + +##### treeshake? + +```ts +optional treeshake: boolean | TreeshakingPreset | TreeshakingOptions; +``` + +###### Defined in + +[types.ts:133](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L133) + +##### visualizer? + +```ts +optional visualizer: false | PluginVisualizerOptions; +``` + +###### Defined in + +[types.ts:134](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L134) + +##### wasm? + +```ts +optional wasm: false | RollupWasmOptions; +``` + +###### Defined in + +[types.ts:135](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L135) + +##### watch? + +```ts +optional watch: false | WatcherOptions; +``` + +###### Defined in + +[types.ts:136](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L136) + +## Type Aliases + +### BuildContextBuildAssetAndChunk + +```ts +type BuildContextBuildAssetAndChunk: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "asset" | "chunk"; +``` + +#### Defined in + +[types.ts:266](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L266) + +*** + +### BuildContextBuildEntry + +```ts +type BuildContextBuildEntry: object; +``` + +#### Type declaration + +##### bytes? + +```ts +optional bytes: number; +``` + +##### chunk? + +```ts +optional chunk: boolean; +``` + +##### chunks? + +```ts +optional chunks: string[]; +``` + +##### exports? + +```ts +optional exports: string[]; +``` + +##### modules? + +```ts +optional modules: object[]; +``` + +##### path + +```ts +path: string; +``` + +##### type? + +```ts +optional type: "entry"; +``` + +#### Defined in + +[types.ts:256](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L256) + +*** + +### BuildEntry + +```ts +type BuildEntry: object; +``` + +#### Type declaration + +##### cjs? + +```ts +optional cjs: boolean; +``` + +##### declaration? + +```ts +optional declaration: boolean | "compatible" | "node16"; +``` + +##### environment? + +```ts +optional environment: Environment; +``` + +##### esm? + +```ts +optional esm: boolean; +``` + +##### executable? + +```ts +optional executable: true; +``` + +##### exportKey? + +```ts +optional exportKey: Set; +``` + +##### fileAlias? + +```ts +optional fileAlias: string; +``` + +##### input + +```ts +input: string; +``` + +##### isGlob? + +```ts +optional isGlob: boolean; +``` + +##### name? + +```ts +optional name: string; +``` + +##### outDir? + +```ts +optional outDir: string; +``` + +##### runtime? + +```ts +optional runtime: Runtime; +``` + +#### Defined in + +[types.ts:164](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L164) + +*** + +### BuildPreset + +```ts +type BuildPreset: BuildConfig | () => BuildConfig; +``` + +#### Defined in + +[types.ts:295](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L295) + +*** + +### Environment + +```ts +type Environment: "production" | "development" | undefined; +``` + +#### Defined in + +[types.ts:89](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L89) + +*** + +### Mode + +```ts +type Mode: "build" | "jit" | "watch" | "tsdoc"; +``` + +#### Defined in + +[types.ts:312](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L312) + +*** + +### Runtime + +```ts +type Runtime: "react-server" | "react-native" | "edge-light" | "node"; +``` + +#### Defined in + +[types.ts:162](https://github.com/visulima/packem/blob/7a1bd14e00b5f1a1aa2acfc78342ce79248d42fa/packages/packem/src/types.ts#L162) + + + ## Related - [bunchee](https://github.com/huozhi/bunchee) - Zero config bundler for ECMAScript and TypeScript packages diff --git a/packages/packem/package.json b/packages/packem/package.json index 3a3418c65..b2b332fbb 100644 --- a/packages/packem/package.json +++ b/packages/packem/package.json @@ -201,6 +201,7 @@ "dependencies": { "@antfu/install-pkg": "0.4.1", "@babel/parser": "7.25.6", + "@ckeditor/typedoc-plugins": "43.0.0", "@clack/prompts": "0.7.0", "@rollup/plugin-alias": "5.1.0", "@rollup/plugin-commonjs": "26.0.1", @@ -236,7 +237,10 @@ "rollup-plugin-polyfill-node": "0.13.0", "rollup-plugin-visualizer": "5.12.0", "semver": "7.6.3", - "tinyglobby": "0.2.6" + "tinyglobby": "0.2.6", + "typedoc": "0.26.7", + "typedoc-plugin-markdown": "4.2.7", + "typedoc-plugin-rename-defaults": "0.7.1" }, "devDependencies": { "@anolilab/eslint-config": "^15.0.3", @@ -263,7 +267,7 @@ "conventional-changelog-conventionalcommits": "8.0.0", "cross-env": "^7.0.3", "detect-indent": "^7.0.1", - "esbuild": "^0.23.1", + "esbuild": "^0.24.0", "eslint": "8.57.0", "eslint-plugin-deprecation": "^3.0.0", "eslint-plugin-etc": "^2.0.3", diff --git a/packages/packem/packem.config.ts b/packages/packem/packem.config.ts index 6979a4ae4..acec24825 100644 --- a/packages/packem/packem.config.ts +++ b/packages/packem/packem.config.ts @@ -17,4 +17,8 @@ export default defineConfig({ }, }, transformer, + typedoc: { + format: "inline", + readmePath: "./README.md", + }, }); diff --git a/packages/packem/src/cli.ts b/packages/packem/src/cli.ts index ed072f475..63079d03f 100644 --- a/packages/packem/src/cli.ts +++ b/packages/packem/src/cli.ts @@ -6,6 +6,11 @@ import { name, version } from "../package.json"; import createBuildCommand from "./commands/build"; import createInitCommand from "./commands/init"; +/** + * Create a new instance of the packem CLI. + * + * @type {Cli} + */ const cli = new Cli("packem", { logger: { reporters: [ diff --git a/packages/packem/src/commands/build.ts b/packages/packem/src/commands/build.ts index 8deca2f96..7b3af543e 100644 --- a/packages/packem/src/commands/build.ts +++ b/packages/packem/src/commands/build.ts @@ -59,9 +59,6 @@ const createBuildCommand = (cli: Cli): void => { debug: options.debug, dtsOnly: options.dtsOnly, minify: options.minify === undefined ? nodeEnvironment === PRODUCTION_ENV : options.minify, - replace: { - ...environments, - }, rollup: { esbuild: { target: options.target, @@ -70,6 +67,9 @@ const createBuildCommand = (cli: Cli): void => { path: options.license, }, metafile: options.metafile, + replace: { + values: environments, + }, }, sourcemap: options.analyze || options.sourcemap, tsconfigPath: options.tsconfig ?? undefined, diff --git a/packages/packem/src/config.ts b/packages/packem/src/config.ts index 80b2f6094..73ce423d4 100644 --- a/packages/packem/src/config.ts +++ b/packages/packem/src/config.ts @@ -1,11 +1,24 @@ import type { BuildConfig, BuildPreset, Environment, Mode } from "./types"; -export type BuildConfigFunction = (enviroment: Environment, mode: Mode) => BuildConfig | BuildConfig[] | Promise; +export type BuildConfigFunction = (enviroment: Environment, mode: Mode) => BuildConfig | Promise; // eslint-disable-next-line import/no-unused-modules export type { BuildConfig, BuildHooks, BuildPreset } from "./types"; -export const defineConfig = (config: BuildConfig | BuildConfig[] | BuildConfigFunction): BuildConfig | BuildConfig[] | BuildConfigFunction => config; +/** + * Define a build configuration. + * + * @param {BuildConfig | BuildConfigFunction} config + * @returns {BuildConfig | BuildConfigFunction} + */ +export const defineConfig = (config: BuildConfig | BuildConfigFunction): BuildConfig | BuildConfigFunction => config; + +/** + * Define a build preset. + * + * @param {BuildPreset} preset + * @returns {BuildPreset} + */ // eslint-disable-next-line import/no-unused-modules export const definePreset = (preset: BuildPreset): BuildPreset => preset; diff --git a/packages/packem/src/create-bundler.ts b/packages/packem/src/create-bundler.ts index 263765887..373dfd279 100644 --- a/packages/packem/src/create-bundler.ts +++ b/packages/packem/src/create-bundler.ts @@ -25,8 +25,9 @@ import resolvePreset from "./hooks/preset/utils/resolve-preset"; import createStub from "./jit/create-stub"; import getHash from "./rollup/utils/get-hash"; import rollupWatch from "./rollup/watch"; +import generateReferenceDocumentation from "./typedoc"; import type { BuildConfig, BuildContext, BuildOptions, BuildPreset, Environment, InternalBuildOptions, Mode } from "./types"; -import arrayify from "./utils/arrayify"; +import createOrUpdateKeyStorage from "./utils/create-or-update-key-storage"; import enhanceRollupError from "./utils/enhance-rollup-error"; import FileCache from "./utils/file-cache"; import getPackageSideEffect from "./utils/get-package-side-effect"; @@ -90,7 +91,6 @@ const generateOptions = ( minify: environment === PRODUCTION_ENV, name: (packageJson.name ?? "").split("/").pop() ?? "default", outDir: tsconfig?.config.compilerOptions?.outDir ?? "dist", - replace: {}, rollup: { alias: {}, cjsInterop: { addDefaultProperty: false }, @@ -314,6 +314,57 @@ const generateOptions = ( sourceDir: "src", sourcemap: false, transformerName: undefined, + typedoc: { + excludePrivate: true, + // Sorts the main index for a namespace / module; not the sidebar tab. + groupOrder: [ + "Classes", + "Constructors", + "Accessors", + "Methods", + "Functions", + "Namespaces", + "Variables", + "Enumerations", + "Interfaces", + "Type Aliases", + "*", + ], + // Sorts the navigation sidebar order for symbol types. + kindSortOrder: [ + "Project", + "Module", + "Class", + "Interface", + "Function", + "Namespace", + "Variable", + "Enum", + "EnumMember", + "TypeAlias", + "Reference", + "Constructor", + "Property", + "Accessor", + "Method", + "Parameter", + "TypeParameter", + "TypeLiteral", + "CallSignature", + "ConstructorSignature", + "IndexSignature", + "GetSignature", + "SetSignature", + ], + marker: "TYPEDOC", + name: packageJson.name ?? "unknown", + outputFileStrategy: "modules", + pretty: true, + readme: "none", + showConfig: debug, + tsconfig: tsconfig?.path, + useCodeBlocks: true, + }, }) as InternalBuildOptions; if (!options.transformerName) { @@ -470,6 +521,8 @@ const createContext = async ( ); } + await prepareEntries(context); + return context; }; @@ -503,8 +556,8 @@ const cleanDistributionDirectories = async (context: BuildContext): Promise => { - if (cachePath && isAccessibleSync(join(cachePath, "keystore.json"))) { +const removeOldCacheFolders = async (cachePath: string | undefined, logger: Pail, logged: boolean): Promise => { + if (cachePath && isAccessibleSync(join(cachePath, "keystore1.json"))) { const keyStore: Record = readJsonSync(join(cachePath, "keystore.json")); // eslint-disable-next-line security/detect-non-literal-fs-filename @@ -512,6 +565,8 @@ const removeOldCacheFolders = async (cachePath: string | undefined, logger: Pail withFileTypes: true, }).filter((dirent) => dirent.isDirectory()); + let hasLogged = logged; + for await (const dirent of cacheDirectories) { if (!keyStore[dirent.name]) { await rm(join(cachePath, dirent.name), { @@ -519,15 +574,38 @@ const removeOldCacheFolders = async (cachePath: string | undefined, logger: Pail recursive: true, }); + if (hasLogged) { + logger.raw("\n\n"); + } + logger.info({ message: "Removing " + dirent.name + " file cache, the cache key is not used anymore.", prefix: "file-cache", }); + + hasLogged = false; } } } }; +const getMode = (mode: Mode): string => { + switch (mode) { + case "jit": { + return "Stubbing"; + } + case "watch": { + return "Watching"; + } + case "tsdoc": { + return "Generating TSDoc"; + } + default: { + return "Building"; + } + } +}; + const createBundler = async ( rootDirectory: string, mode: Mode, @@ -583,6 +661,8 @@ const createBundler = async ( cwd: rootDirectory, }); + let logged = false; + try { let packemConfigFilePath = configPath ?? ""; @@ -611,7 +691,7 @@ const createBundler = async ( throw new Error("Invalid packem config file extension. Only .js, .mjs, .cjs, .ts, .cts and .mts extensions are allowed."); } - let buildConfig = ((await jiti.import(packemConfigFilePath, { try: true })) || {}) as BuildConfig | BuildConfig[] | BuildConfigFunction; + let buildConfig = ((await jiti.import(packemConfigFilePath, { try: true })) || {}) as BuildConfig | BuildConfigFunction; if (typeof buildConfig === "function") { buildConfig = await buildConfig(environment, mode); @@ -619,68 +699,77 @@ const createBundler = async ( logger.debug("Using packem config found at", join(rootDirectory, packemConfigFilePath)); - const start = Date.now(); - - const getDuration = () => duration(Math.floor(Date.now() - start)); + const cacheKey = + getHash( + JSON.stringify({ + version: packageJson.version, + ...packageJson.dependencies, + ...packageJson.devDependencies, + ...packageJson.peerDependencies, + ...packageJson.peerDependenciesMeta, + browser: packageJson.browser, + eNode: packageJson.engines?.node, + exports: packageJson.exports, + main: packageJson.main, + module: packageJson.module, + type: packageJson.type, + types: packageJson.types, + }), + ) + getHash(JSON.stringify(buildConfig)); + + if (cachePath) { + createOrUpdateKeyStorage(cacheKey, cachePath as string, logger); + } - const packageJsonCacheKey = getHash( - JSON.stringify({ - version: packageJson.version, - ...packageJson.dependencies, - ...packageJson.devDependencies, - ...packageJson.peerDependencies, - ...packageJson.peerDependenciesMeta, - browser: packageJson.browser, - eNode: packageJson.engines?.node, - exports: packageJson.exports, - main: packageJson.main, - module: packageJson.module, - type: packageJson.type, - types: packageJson.types, - }), + const fileCache = new FileCache(rootDirectory, cachePath, cacheKey, logger); + + const context = await createContext( + logger, + rootDirectory, + mode, + environment, + debug ?? false, + restInputConfig, + buildConfig, + packageJson, + tsconfig, + jiti, ); - for await (const config of arrayify(buildConfig)) { - const cacheKey = packageJsonCacheKey + getHash(JSON.stringify(config)); - const fileCache = new FileCache(rootDirectory, cachePath, cacheKey, logger); - const context = await createContext(logger, rootDirectory, mode, environment, debug ?? false, restInputConfig, config, packageJson, tsconfig, jiti); - - fileCache.isEnabled = context.options.fileCache as boolean; - - await prepareEntries(context); + fileCache.isEnabled = context.options.fileCache as boolean; - context.logger.info(cyan((mode === "watch" ? "Watching" : mode === "jit" ? "Stubbing" : "Building") + " " + context.options.name)); + context.logger.info(cyan(getMode(mode) + " " + context.options.name)); - context.logger.debug({ - context: context.options.entries, - message: `${bold("Root dir:")} ${context.options.rootDir}\n ${bold("Entries:")}}`, - }); + context.logger.debug({ + context: context.options.entries, + message: `${bold("Root dir:")} ${context.options.rootDir}\n ${bold("Entries:")}}`, + }); - // Clean dist dirs - await cleanDistributionDirectories(context); + // Clean dist dirs + await cleanDistributionDirectories(context); - // Skip rest for stub - if (mode === "jit") { - await createStub(context); + const start = Date.now(); - await context.hooks.callHook("build:done", context); + const getDuration = () => duration(Math.floor(Date.now() - start)); - return; + if (mode === "watch") { + if (context.options.rollup.watch === false) { + throw new Error("Rollup watch is disabled. You should check your packem.config file."); } - if (mode === "watch") { - if (context.options.rollup.watch === false) { - throw new Error("Rollup watch is disabled. You should check your packem.config file."); - } + await rollupWatch(context, fileCache); - await rollupWatch(context, fileCache); + logBuildErrors(context, false); - logBuildErrors(context, false); + return; + } - return; - } + if (mode === "jit") { + await createStub(context); - const logged = await build(context, fileCache); + await context.hooks.callHook("build:done", context); + } else { + logged = await build(context, fileCache); await context.hooks.callHook("validate:before", context); @@ -689,10 +778,49 @@ const createBundler = async ( await context.hooks.callHook("validate:done", context); logBuildErrors(context, logged); + } - logger.raw("\n⚡️ Build run in " + getDuration()); + if (context.options.typedoc) { + let typedocVersion = "unknown"; + + if (packageJson.dependencies?.typedoc) { + typedocVersion = packageJson.dependencies.typedoc; + } else if (packageJson.devDependencies?.typedoc) { + typedocVersion = packageJson.devDependencies.typedoc; + } + + if (cachePath) { + createOrUpdateKeyStorage("typedoc", cachePath as string, logger, true); + } + + if (logged) { + context.logger.raw("\n"); + } + + context.logger.info({ + message: "Using " + cyan("typedoc") + " " + typedocVersion + " to generate reference documentation", + prefix: "typedoc", + }); + + await context.hooks.callHook("typedoc:before", context); + + let outputDirectory = join(context.options.rootDir, "api-docs"); + + if (context.options.typedoc.format === "inline" && cachePath) { + outputDirectory = cachePath; + } + + if (context.options.typedoc.output) { + outputDirectory = context.options.typedoc.output; + } + + await generateReferenceDocumentation(context.options.typedoc, context.options.entries, outputDirectory, context.logger); + + await context.hooks.callHook("typedoc:done", context); } + logger.raw("\n⚡️ Build run in " + getDuration()); + // Restore all wrapped console methods logger.restoreAll(); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -703,7 +831,7 @@ const createBundler = async ( throw error; } finally { - await removeOldCacheFolders(cachePath, logger); + await removeOldCacheFolders(cachePath, logger, logged); } }; diff --git a/packages/packem/src/rollup/get-rollup-options.ts b/packages/packem/src/rollup/get-rollup-options.ts index 0f53a2311..e9fe9292b 100644 --- a/packages/packem/src/rollup/get-rollup-options.ts +++ b/packages/packem/src/rollup/get-rollup-options.ts @@ -423,10 +423,6 @@ export const getRollupOptions = async (context: BuildContext, fileCache: FileCac replacePlugin({ sourcemap: context.options.sourcemap, ...context.options.rollup.replace, - values: { - ...context.options.replace, - ...context.options.rollup.replace.values, - }, }), context.options.rollup.alias && @@ -700,10 +696,6 @@ export const getRollupDtsOptions = async (context: BuildContext, fileCache: File replacePlugin({ sourcemap: context.options.sourcemap, ...context.options.rollup.replace, - values: { - ...context.options.replace, - ...context.options.rollup.replace.values, - }, }), context.options.rollup.alias && diff --git a/packages/packem/src/rollup/plugins/license.ts b/packages/packem/src/rollup/plugins/license.ts index 7f2c37028..b0d7760a3 100644 --- a/packages/packem/src/rollup/plugins/license.ts +++ b/packages/packem/src/rollup/plugins/license.ts @@ -10,6 +10,8 @@ import type { Pail } from "@visulima/pail"; import type { Plugin } from "rollup"; import licensePlugin from "rollup-plugin-license"; +import replaceContentWithinMarker from "../../utils/replace-content-within-marker"; + const sortLicenses = (licenses: Set) => { const withParenthesis: string[] = []; const noParenthesis: string[] = []; @@ -26,18 +28,6 @@ const sortLicenses = (licenses: Set) => { return [...noParenthesis.sort(), ...withParenthesis.sort()]; }; -const replaceContentWithin = (content: string, marker: string, replacement: string): string | undefined => { - /** Replaces the content within the comments and re appends/prepends the comments to the replacement for follow-up workflow runs. */ - // eslint-disable-next-line @rushstack/security/no-unsafe-regexp,security/detect-non-literal-regexp - const regex = new RegExp(`()[\\s\\S]*?()`, "g"); - - if (!regex.test(content)) { - return undefined; - } - - return content.replace(regex, `$1\n${replacement}\n$2`); -}; - export interface LicenseOptions { dependenciesMarker?: string; dependenciesTemplate?: (licenses: string[], dependencyLicenseTexts: string, packageName: string | undefined) => string; @@ -140,7 +130,7 @@ export const license = ({ try { const existingLicenseText = readFileSync(licenseFilePath); - const content = replaceContentWithin(existingLicenseText, marker, licenseText); + const content = replaceContentWithinMarker(existingLicenseText, marker, licenseText); if (!content) { logger.error({ diff --git a/packages/packem/src/typedoc/index.ts b/packages/packem/src/typedoc/index.ts new file mode 100644 index 000000000..66e22318b --- /dev/null +++ b/packages/packem/src/typedoc/index.ts @@ -0,0 +1,107 @@ +import { readdirSync } from "node:fs"; + +import { readFileSync, writeFileSync } from "@visulima/fs"; +import type { Pail } from "@visulima/pail"; +import { join } from "@visulima/path"; +import { Application } from "typedoc"; + +import type { BuildEntry, TypeDocumentOptions } from "../types"; +import replaceContentWithinMarker from "../utils/replace-content-within-marker"; + +// eslint-disable-next-line sonarjs/cognitive-complexity +const generateReferenceDocumentation = async (options: TypeDocumentOptions, entries: BuildEntry[], outputDirectory: string, logger: Pail): Promise => { + if (entries.length === 0) { + return; + } + + const { format, marker, plugin, readmePath, ...typedocOptions } = options; + + if (format === "inline" && readmePath === undefined) { + throw new Error("The `readmePath` option is required when using the `inline` format."); + } + + const entryPoints = entries.map((entry) => entry.input); + + const app = await Application.bootstrapWithPlugins({ + ...typedocOptions, + entryPoints, + hideGenerator: true, + plugin: [ + ...(plugin ?? []), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/module-fixer"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/symbol-fixer"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/interface-augmentation-fixer"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/event-inheritance-fixer"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/purge-private-api-docs"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/tag-error"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/tag-event"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("@ckeditor/typedoc-plugins/lib/tag-observable"), + // eslint-disable-next-line unicorn/prefer-module + require.resolve("typedoc-plugin-rename-defaults"), + ...(format === "inline" || format === "markdown" ? ["typedoc-plugin-markdown"] : []), + ], + ...(format === "inline" + ? { + hideBreadcrumbs: true, + hidePageHeader: true, + navigation: false, + } + : {}), + }); + + const project = await app.convert(); + + if (project) { + await (format === "json" ? app.generateJson(project, outputDirectory) : app.generateDocs(project, outputDirectory)); + + if (format === "inline") { + if (marker === undefined) { + throw new Error("The `marker` option is required when using the `inline` format."); + } + + // eslint-disable-next-line security/detect-non-literal-fs-filename + const markdownPathsList = readdirSync(outputDirectory, { + withFileTypes: true, + }).filter((item) => item.isFile()); + + let markdownContent = ""; + + for (const item of markdownPathsList) { + if (item.name === "README.md") { + // eslint-disable-next-line no-continue + continue; + } + + markdownContent += readFileSync(join(outputDirectory, item.name)); + } + + const readmeContent = readFileSync(readmePath as string); + const updatedReadmeContent = replaceContentWithinMarker(readmeContent, marker, markdownContent); + + if (!updatedReadmeContent) { + logger.error({ + message: `Could not find the license marker: in ${readmePath as string}`, + prefix: "typedoc", + }); + + return; + } + + if (updatedReadmeContent) { + writeFileSync(readmePath as string, updatedReadmeContent, { + overwrite: true, + }); + } + } + } +}; + +export default generateReferenceDocumentation; diff --git a/packages/packem/src/types.ts b/packages/packem/src/types.ts index 062123de4..6a3fced41 100644 --- a/packages/packem/src/types.ts +++ b/packages/packem/src/types.ts @@ -14,6 +14,7 @@ import type { OutputOptions, Plugin, RollupBuild, RollupOptions, RollupWatcher } import type { Options as RollupDtsOptions } from "rollup-plugin-dts"; import type { NodePolyfillsOptions } from "rollup-plugin-polyfill-node"; import type { PluginVisualizerOptions } from "rollup-plugin-visualizer"; +import type { TypeDocOptions as BaseTypeDocumentOptions } from "typedoc"; import type { CJSInteropOptions } from "./rollup/plugins/cjs-interop"; import type { CopyPluginOptions } from "./rollup/plugins/copy"; @@ -135,6 +136,29 @@ export interface RollupBuildOptions { watch?: RollupOptions["watch"]; } +export type TypeDocumentOptions = { + /** + * The format of the output. + * + * @default "inline" + */ + format?: "inline" | "json" | "markdown" | "html"; + /** + * A marker to replace the content within the file on the correct location. + * + * @default "TYPEDOC" This marker need to be placed in the readme + */ + marker?: string; + /** + * The path of the output directory. + */ + output?: string; + /** + * The path of the README file. + */ + readmePath?: string; +} & Partial>; + export type Runtime = "react-server" | "react-native" | "edge-light" | "node"; export type BuildEntry = { @@ -185,13 +209,13 @@ export interface BuildOptions { minify?: boolean | undefined; name: string; outDir: string; - replace: Record; rollup: RollupBuildOptions; rootDir: string; sourceDir: string; /** @experimental */ sourcemap: boolean; transformer: (config: SwcPluginConfig | SucrasePluginConfig | EsbuildPluginConfig) => Plugin; + typedoc: TypeDocumentOptions | false; validation?: { packageJson?: { bin?: boolean; @@ -222,6 +246,9 @@ export interface BuildHooks { "rollup:options": (context: BuildContext, options: RollupOptions) => Promise | void; "rollup:watch": (context: BuildContext, watcher: RollupWatcher) => Promise | void; + "typedoc:before": (context: BuildContext) => Promise | void; + "typedoc:done": (context: BuildContext) => Promise | void; + "validate:before": (context: BuildContext) => Promise | void; "validate:done": (context: BuildContext) => Promise | void; } @@ -282,7 +309,7 @@ export type InferEntriesResult = { warnings: string[]; }; -export type Mode = "build" | "jit" | "watch"; +export type Mode = "build" | "jit" | "watch" | "tsdoc"; export interface IsolatedDeclarationsResult { errors: string[]; diff --git a/packages/packem/src/utils/create-or-update-key-storage.ts b/packages/packem/src/utils/create-or-update-key-storage.ts new file mode 100644 index 000000000..0ccf7f2f6 --- /dev/null +++ b/packages/packem/src/utils/create-or-update-key-storage.ts @@ -0,0 +1,34 @@ +import { isAccessibleSync, readJsonSync, writeJsonSync } from "@visulima/fs"; +import type { Pail } from "@visulima/pail"; +import { join } from "@visulima/path"; + +const createOrUpdateKeyStorage = (hashKey: string, storePath: string, logger: Pail, shouldUpdate?: true): void => { + try { + let keyStore: Record = {}; + + const keyStorePath = join(storePath, "keystore.json"); + + if (shouldUpdate && isAccessibleSync(keyStorePath)) { + keyStore = readJsonSync(keyStorePath); + } + + // eslint-disable-next-line security/detect-object-injection + if (keyStore[hashKey] === undefined) { + // eslint-disable-next-line security/detect-object-injection + keyStore[hashKey] = new Date().toISOString(); + } + + writeJsonSync(keyStorePath, keyStore, { + overwrite: true, + }); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (error: any) { + logger.debug({ + context: error, + message: error.message, + prefix: "cache-key-store", + }); + } +}; + +export default createOrUpdateKeyStorage; diff --git a/packages/packem/src/utils/file-cache.ts b/packages/packem/src/utils/file-cache.ts index 691a105b6..1db7f5691 100644 --- a/packages/packem/src/utils/file-cache.ts +++ b/packages/packem/src/utils/file-cache.ts @@ -1,4 +1,4 @@ -import { isAccessibleSync, readFileSync, readJsonSync, writeFileSync, writeJsonSync } from "@visulima/fs"; +import { isAccessibleSync, readFileSync, writeFileSync } from "@visulima/fs"; import type { Pail } from "@visulima/pail"; import { join, toNamespacedPath } from "@visulima/path"; @@ -40,8 +40,6 @@ class FileCache { prefix: "file-cache", }); } - - this.createOrUpdateKeyStorage(hashKey, logger); } public set isEnabled(value: boolean) { @@ -122,35 +120,6 @@ class FileCache { return join(this.#cachePath as string, this.#hashKey, subDirectory?.replaceAll(":", "-") ?? "", toNamespacedPath(optimizedName)); } - - private createOrUpdateKeyStorage(hashKey: string, logger: Pail): void { - try { - let keyStore: Record = {}; - - const keyStorePath = join(this.#cachePath as string, "keystore.json"); - - if (isAccessibleSync(keyStorePath)) { - keyStore = readJsonSync(keyStorePath); - } - - // eslint-disable-next-line security/detect-object-injection - if (keyStore[hashKey] === undefined) { - // eslint-disable-next-line security/detect-object-injection - keyStore[hashKey] = new Date().toISOString(); - } - - writeJsonSync(keyStorePath, keyStore, { - overwrite: true, - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - } catch (error: any) { - logger.debug({ - context: error, - message: error.message, - prefix: "file-cache", - }); - } - } } export default FileCache; diff --git a/packages/packem/src/utils/replace-content-within-marker.ts b/packages/packem/src/utils/replace-content-within-marker.ts new file mode 100644 index 000000000..1f9c981bb --- /dev/null +++ b/packages/packem/src/utils/replace-content-within-marker.ts @@ -0,0 +1,13 @@ +const replaceContentWithin = (content: string, marker: string, replacement: string): string | undefined => { + /** Replaces the content within the comments and re appends/prepends the comments to the replacement for follow-up workflow runs. */ + // eslint-disable-next-line @rushstack/security/no-unsafe-regexp,security/detect-non-literal-regexp + const regex = new RegExp(`()[\\s\\S]*?()`, "g"); + + if (!regex.test(content)) { + return undefined; + } + + return content.replace(regex, `$1\n${replacement}\n$2`); +}; + +export default replaceContentWithin; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6bba89923..e1e19eb3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ overrides: braces@<3.0.3: '>=3.0.3' chrono-node@<2.2.4: '>=2.7.7' micromatch@<4.0.8: '>=4.0.8' - rollup: ^4.22.2 + rollup: ^4.22.4 vite@>=5.3.0 <=5.3.5: '>=5.3.6' importers: @@ -115,8 +115,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -130,8 +130,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -145,8 +145,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -157,8 +157,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 oxc-transform: specifier: ^0.29.0 version: 0.29.0 @@ -178,8 +178,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -193,8 +193,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -218,8 +218,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -246,8 +246,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -264,8 +264,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 nodehun: specifier: ^3.0.2 version: 3.0.2 @@ -295,8 +295,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -326,8 +326,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -354,8 +354,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -382,8 +382,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 typescript: specifier: ^5.6.2 version: 5.6.2 @@ -447,8 +447,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 typescript: specifier: ^5.6.2 version: 5.6.2 @@ -459,8 +459,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 typescript: specifier: ^5.6.2 version: 5.6.2 @@ -471,8 +471,8 @@ importers: specifier: workspace:* version: link:../../packages/packem esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 typescript: specifier: ^5.6.2 version: 5.6.2 @@ -485,54 +485,57 @@ importers: '@babel/parser': specifier: 7.25.6 version: 7.25.6 + '@ckeditor/typedoc-plugins': + specifier: 43.0.0 + version: 43.0.0(typedoc@0.26.7(typescript@5.6.2)) '@clack/prompts': specifier: 0.7.0 version: 0.7.0 '@rollup/plugin-alias': specifier: 5.1.0 - version: 5.1.0(rollup@4.22.2) + version: 5.1.0(rollup@4.22.4) '@rollup/plugin-commonjs': specifier: 26.0.1 - version: 26.0.1(rollup@4.22.2) + version: 26.0.1(rollup@4.22.4) '@rollup/plugin-dynamic-import-vars': specifier: 2.1.2 - version: 2.1.2(rollup@4.22.2) + version: 2.1.2(rollup@4.22.4) '@rollup/plugin-inject': specifier: 5.0.5 - version: 5.0.5(rollup@4.22.2) + version: 5.0.5(rollup@4.22.4) '@rollup/plugin-json': specifier: 6.1.0 - version: 6.1.0(rollup@4.22.2) + version: 6.1.0(rollup@4.22.4) '@rollup/plugin-node-resolve': specifier: 15.2.3 - version: 15.2.3(rollup@4.22.2) + version: 15.2.3(rollup@4.22.4) '@rollup/plugin-replace': specifier: 5.0.7 - version: 5.0.7(rollup@4.22.2) + version: 5.0.7(rollup@4.22.4) '@rollup/plugin-wasm': specifier: 6.2.2 - version: 6.2.2(rollup@4.22.2) + version: 6.2.2(rollup@4.22.4) '@rollup/pluginutils': specifier: 5.1.0 - version: 5.1.0(rollup@4.22.2) + version: 5.1.0(rollup@4.22.4) '@visulima/cerebro': specifier: 1.1.20 - version: 1.1.20(yaml@2.5.0) + version: 1.1.20(yaml@2.5.1) '@visulima/colorize': specifier: 1.4.9 version: 1.4.9 '@visulima/find-cache-dir': specifier: 1.0.10 - version: 1.0.10(yaml@2.5.0) + version: 1.0.10(yaml@2.5.1) '@visulima/fs': specifier: 2.1.17 - version: 2.1.17(yaml@2.5.0) + version: 2.1.17(yaml@2.5.1) '@visulima/humanizer': specifier: 1.0.11 version: 1.0.11 '@visulima/package': specifier: 3.1.0 - version: 3.1.0(yaml@2.5.0) + version: 3.1.0(yaml@2.5.1) '@visulima/pail': specifier: 2.1.8 version: 2.1.8 @@ -541,7 +544,7 @@ importers: version: 1.0.8 '@visulima/tsconfig': specifier: 1.0.12 - version: 1.0.12(yaml@2.5.0) + version: 1.0.12(yaml@2.5.1) defu: specifier: 6.1.4 version: 6.1.4 @@ -573,26 +576,35 @@ importers: specifier: 0.29.0 version: 0.29.0 rollup: - specifier: ^4.22.2 - version: 4.22.2 + specifier: ^4.22.4 + version: 4.22.4 rollup-plugin-dts: specifier: 6.1.1 - version: 6.1.1(rollup@4.22.2)(typescript@5.6.2) + version: 6.1.1(rollup@4.22.4)(typescript@5.6.2) rollup-plugin-license: specifier: 3.5.2 - version: 3.5.2(rollup@4.22.2) + version: 3.5.2(rollup@4.22.4) rollup-plugin-polyfill-node: specifier: 0.13.0 - version: 0.13.0(rollup@4.22.2) + version: 0.13.0(rollup@4.22.4) rollup-plugin-visualizer: specifier: 5.12.0 - version: 5.12.0(rollup@4.22.2) + version: 5.12.0(rollup@4.22.4) semver: specifier: 7.6.3 version: 7.6.3 tinyglobby: specifier: 0.2.6 version: 0.2.6 + typedoc: + specifier: 0.26.7 + version: 0.26.7(typescript@5.6.2) + typedoc-plugin-markdown: + specifier: 4.2.7 + version: 4.2.7(typedoc@0.26.7(typescript@5.6.2)) + typedoc-plugin-rename-defaults: + specifier: 0.7.1 + version: 0.7.1(typedoc@0.26.7(typescript@5.6.2)) devDependencies: '@anolilab/eslint-config': specifier: ^15.0.3 @@ -602,10 +614,10 @@ importers: version: 5.0.14(prettier@3.3.3) '@anolilab/semantic-release-pnpm': specifier: ^1.1.3 - version: 1.1.3(yaml@2.5.0) + version: 1.1.3(yaml@2.5.1) '@anolilab/semantic-release-preset': specifier: ^9.0.0 - version: 9.0.0(@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.0))(@semantic-release/npm@12.0.1(semantic-release@24.1.1(typescript@5.6.2)))(semantic-release@24.1.1(typescript@5.6.2)) + version: 9.0.0(@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.1))(@semantic-release/npm@12.0.1(semantic-release@24.1.1(typescript@5.6.2)))(semantic-release@24.1.1(typescript@5.6.2)) '@arethetypeswrong/cli': specifier: ^0.16.4 version: 0.16.4 @@ -667,8 +679,8 @@ importers: specifier: ^7.0.1 version: 7.0.1 esbuild: - specifier: ^0.23.1 - version: 0.23.1 + specifier: ^0.24.0 + version: 0.24.0 eslint: specifier: 8.57.0 version: 8.57.0 @@ -1063,6 +1075,12 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@ckeditor/typedoc-plugins@43.0.0': + resolution: {integrity: sha512-Dgm4kqKu56M7OMspF4TQfp5P6IBU2DLMKhgLFSP3QQt+7DV6Z2Ry/bsmZKbgmpYKttambXWrVRqHh6vXnpWZaQ==} + engines: {node: '>=18.0.0', npm: '>=5.7.1'} + peerDependencies: + typedoc: ^0.23.15 + '@clack/core@0.3.4': resolution: {integrity: sha512-H4hxZDXgHtWTwV3RAVenqcC4VbJZNegbBjlPvzOzCouXtS2y3sDvlO3IsbrPNWuLWPPlYVYPghQdSF64683Ldw==} @@ -1253,6 +1271,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.24.0': + resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -1265,6 +1289,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.24.0': + resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -1277,6 +1307,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.24.0': + resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -1289,6 +1325,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.24.0': + resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -1301,6 +1343,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.24.0': + resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -1313,6 +1361,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.24.0': + resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -1325,6 +1379,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.24.0': + resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -1337,6 +1397,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.24.0': + resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -1349,6 +1415,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.24.0': + resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -1361,6 +1433,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.24.0': + resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -1373,6 +1451,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.24.0': + resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -1385,6 +1469,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.24.0': + resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -1397,6 +1487,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.24.0': + resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -1409,6 +1505,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.24.0': + resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -1421,6 +1523,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.24.0': + resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -1433,6 +1541,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.24.0': + resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -1445,6 +1559,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.24.0': + resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -1457,12 +1577,24 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.24.0': + resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.23.1': resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.24.0': + resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -1475,6 +1607,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.24.0': + resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -1487,6 +1625,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.24.0': + resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -1499,6 +1643,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.24.0': + resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -1511,6 +1661,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.24.0': + resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -1523,6 +1679,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.24.0': + resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1921,7 +2083,7 @@ packages: resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1930,7 +2092,7 @@ packages: resolution: {integrity: sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1939,7 +2101,7 @@ packages: resolution: {integrity: sha512-4lr2oXxs9hcxtGGaK8s0i9evfjzDrAs7ngw28TqruWKTEm0+U4Eljb+F6HXGYdFv8xRojQlrQwV7M/yxeh3yzQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1948,7 +2110,7 @@ packages: resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1957,7 +2119,7 @@ packages: resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1966,7 +2128,7 @@ packages: resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1975,7 +2137,7 @@ packages: resolution: {integrity: sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1984,7 +2146,7 @@ packages: resolution: {integrity: sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true @@ -1993,88 +2155,88 @@ packages: resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.22.2': - resolution: {integrity: sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==} + '@rollup/rollup-android-arm-eabi@4.22.4': + resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.2': - resolution: {integrity: sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ==} + '@rollup/rollup-android-arm64@4.22.4': + resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.2': - resolution: {integrity: sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg==} + '@rollup/rollup-darwin-arm64@4.22.4': + resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.2': - resolution: {integrity: sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q==} + '@rollup/rollup-darwin-x64@4.22.4': + resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': - resolution: {integrity: sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': + resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.22.2': - resolution: {integrity: sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ==} + '@rollup/rollup-linux-arm-musleabihf@4.22.4': + resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.2': - resolution: {integrity: sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A==} + '@rollup/rollup-linux-arm64-gnu@4.22.4': + resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.2': - resolution: {integrity: sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA==} + '@rollup/rollup-linux-arm64-musl@4.22.4': + resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': - resolution: {integrity: sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': + resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.22.2': - resolution: {integrity: sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg==} + '@rollup/rollup-linux-riscv64-gnu@4.22.4': + resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.2': - resolution: {integrity: sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA==} + '@rollup/rollup-linux-s390x-gnu@4.22.4': + resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.22.2': - resolution: {integrity: sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ==} + '@rollup/rollup-linux-x64-gnu@4.22.4': + resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.2': - resolution: {integrity: sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g==} + '@rollup/rollup-linux-x64-musl@4.22.4': + resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.22.2': - resolution: {integrity: sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA==} + '@rollup/rollup-win32-arm64-msvc@4.22.4': + resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.2': - resolution: {integrity: sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw==} + '@rollup/rollup-win32-ia32-msvc@4.22.4': + resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.2': - resolution: {integrity: sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA==} + '@rollup/rollup-win32-x64-msvc@4.22.4': + resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} cpu: [x64] os: [win32] @@ -2188,6 +2350,21 @@ packages: '@semrel-extra/topo@1.14.1': resolution: {integrity: sha512-V7hlOQoBXgqLSa4ai9S0LGOO7cKTqRu5dh0T83xfE+VqZQmDkuRm956ooJ2/M8y62kWIxS2VEfePnEoB74x6fg==} + '@shikijs/core@1.18.0': + resolution: {integrity: sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ==} + + '@shikijs/engine-javascript@1.18.0': + resolution: {integrity: sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A==} + + '@shikijs/engine-oniguruma@1.18.0': + resolution: {integrity: sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg==} + + '@shikijs/types@1.18.0': + resolution: {integrity: sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA==} + + '@shikijs/vscode-textmate@9.2.2': + resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==} + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -3230,6 +3407,10 @@ packages: resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} engines: {node: '>=14.16'} + camelcase@8.0.0: + resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} + engines: {node: '>=16'} + caniuse-lite@1.0.30001620: resolution: {integrity: sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==} @@ -3916,6 +4097,11 @@ packages: engines: {node: '>=18'} hasBin: true + esbuild@0.24.0: + resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} + engines: {node: '>=18'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -4760,6 +4946,9 @@ packages: hast-util-phrasing@2.0.2: resolution: {integrity: sha512-yGkCfPkkfCyiLfK6KEl/orMDr/zgCnq/NaO9HfULx6/Zga5fso5eqQA5Ov/JZVqACygvw9shRYWgXNcG2ilo7w==} + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} + hast-util-to-nlcst@2.2.0: resolution: {integrity: sha512-BFBvuoEo9yCHklUSCz6+JG/FAkr+qCVaW1bE0/Y8+SBhuaz7s+suHDpkyQxH7FF2kqctYRhquLRCcmn+PS0IUQ==} @@ -4769,6 +4958,9 @@ packages: hast-util-whitespace@2.0.1: resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + hastscript@7.2.0: resolution: {integrity: sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==} @@ -4811,6 +5003,9 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + htmlparser2@8.0.2: resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} @@ -5447,6 +5642,9 @@ packages: resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + lint-staged@15.2.10: resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} engines: {node: '>=18.12.0'} @@ -5618,6 +5816,9 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -5657,6 +5858,10 @@ packages: map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + markdown-table@2.0.0: resolution: {integrity: sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==} @@ -5781,6 +5986,9 @@ packages: mdast-util-phrasing@4.1.0: resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + mdast-util-to-hast@13.2.0: + resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} + mdast-util-to-markdown@0.6.5: resolution: {integrity: sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==} @@ -5802,6 +6010,9 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + mem@4.3.0: resolution: {integrity: sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==} engines: {node: '>=6'} @@ -6111,6 +6322,10 @@ packages: resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -6452,6 +6667,9 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} + oniguruma-to-js@0.4.3: + resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} + open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} @@ -6875,6 +7093,10 @@ packages: pump@1.0.3: resolution: {integrity: sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -7027,6 +7249,9 @@ packages: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} + regex@4.3.2: + resolution: {integrity: sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==} + regexp-ast-analysis@0.7.1: resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -7199,32 +7424,32 @@ packages: resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 typescript: ^4.5 || ^5.0 rollup-plugin-license@3.5.2: resolution: {integrity: sha512-NNeXBcE6RyQdZdSC8Vxe8Cheax2aUa/K0Ok6JDZwr9isjkSDer4aMg0sovas1Ua76ojLZX1BrNQ6ZFspztKkZQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 rollup-plugin-polyfill-node@0.13.0: resolution: {integrity: sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==} peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 rollup-plugin-visualizer@5.12.0: resolution: {integrity: sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ==} engines: {node: '>=14'} hasBin: true peerDependencies: - rollup: ^4.22.2 + rollup: ^4.22.4 peerDependenciesMeta: rollup: optional: true - rollup@4.22.2: - resolution: {integrity: sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg==} + rollup@4.22.4: + resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7355,6 +7580,9 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shiki@1.18.0: + resolution: {integrity: sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A==} + side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -7880,6 +8108,9 @@ packages: resolution: {integrity: sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==} engines: {node: '>= 0.4'} + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -8025,6 +8256,24 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + typedoc-plugin-markdown@4.2.7: + resolution: {integrity: sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.26.x + + typedoc-plugin-rename-defaults@0.7.1: + resolution: {integrity: sha512-hgg4mAy5IumgUmPOnVVGmGywjTGtUCmRJ2jRbseqtXdlUuYKj652ODL9joUWFt5uvNu4Dr/pNILc/qsKGHJw+w==} + peerDependencies: + typedoc: '>=0.22.x <0.27.x' + + typedoc@0.26.7: + resolution: {integrity: sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==} + engines: {node: '>= 18'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x + typescript@5.6.1-rc: resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} @@ -8039,6 +8288,9 @@ packages: resolution: {integrity: sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==} engines: {node: '>=12.17'} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -8149,6 +8401,9 @@ packages: unist-util-position@4.0.4: resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==} + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + unist-util-remove-position@4.0.2: resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} @@ -8482,6 +8737,11 @@ packages: engines: {node: '>= 14'} hasBin: true + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -8648,20 +8908,20 @@ snapshots: '@anolilab/package-json-utils': 3.0.9 prettier: 3.3.3 - '@anolilab/rc@1.1.2(yaml@2.5.0)': + '@anolilab/rc@1.1.2(yaml@2.5.1)': dependencies: - '@visulima/fs': 2.1.17(yaml@2.5.0) + '@visulima/fs': 2.1.17(yaml@2.5.1) ini: 4.1.3 ts-deepmerge: 7.0.0 transitivePeerDependencies: - yaml - '@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.0)': + '@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.1)': dependencies: - '@anolilab/rc': 1.1.2(yaml@2.5.0) + '@anolilab/rc': 1.1.2(yaml@2.5.1) '@semantic-release/error': 4.0.0 - '@visulima/fs': 2.1.17(yaml@2.5.0) - '@visulima/package': 1.10.1(yaml@2.5.0) + '@visulima/fs': 2.1.17(yaml@2.5.1) + '@visulima/package': 1.10.1(yaml@2.5.1) '@visulima/path': 1.0.8 aggregate-error: 5.0.0 execa: 9.4.0 @@ -8673,7 +8933,7 @@ snapshots: transitivePeerDependencies: - yaml - '@anolilab/semantic-release-preset@9.0.0(@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.0))(@semantic-release/npm@12.0.1(semantic-release@24.1.1(typescript@5.6.2)))(semantic-release@24.1.1(typescript@5.6.2))': + '@anolilab/semantic-release-preset@9.0.0(@anolilab/semantic-release-pnpm@1.1.3(yaml@2.5.1))(@semantic-release/npm@12.0.1(semantic-release@24.1.1(typescript@5.6.2)))(semantic-release@24.1.1(typescript@5.6.2))': dependencies: '@semantic-release/changelog': 6.0.3(semantic-release@24.1.1(typescript@5.6.2)) '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.1.1(typescript@5.6.2)) @@ -8684,7 +8944,7 @@ snapshots: conventional-changelog-conventionalcommits: 8.0.0 semantic-release: 24.1.1(typescript@5.6.2) optionalDependencies: - '@anolilab/semantic-release-pnpm': 1.1.3(yaml@2.5.0) + '@anolilab/semantic-release-pnpm': 1.1.3(yaml@2.5.1) '@semantic-release/npm': 12.0.1(semantic-release@24.1.1(typescript@5.6.2)) transitivePeerDependencies: - supports-color @@ -8916,6 +9176,10 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@ckeditor/typedoc-plugins@43.0.0(typedoc@0.26.7(typescript@5.6.2))': + dependencies: + typedoc: 0.26.7(typescript@5.6.2) + '@clack/core@0.3.4': dependencies: picocolors: 1.0.1 @@ -9208,141 +9472,213 @@ snapshots: '@esbuild/aix-ppc64@0.23.1': optional: true + '@esbuild/aix-ppc64@0.24.0': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true '@esbuild/android-arm64@0.23.1': optional: true + '@esbuild/android-arm64@0.24.0': + optional: true + '@esbuild/android-arm@0.21.5': optional: true '@esbuild/android-arm@0.23.1': optional: true + '@esbuild/android-arm@0.24.0': + optional: true + '@esbuild/android-x64@0.21.5': optional: true '@esbuild/android-x64@0.23.1': optional: true + '@esbuild/android-x64@0.24.0': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true '@esbuild/darwin-arm64@0.23.1': optional: true + '@esbuild/darwin-arm64@0.24.0': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true '@esbuild/darwin-x64@0.23.1': optional: true + '@esbuild/darwin-x64@0.24.0': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true '@esbuild/freebsd-arm64@0.23.1': optional: true + '@esbuild/freebsd-arm64@0.24.0': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true '@esbuild/freebsd-x64@0.23.1': optional: true + '@esbuild/freebsd-x64@0.24.0': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true '@esbuild/linux-arm64@0.23.1': optional: true + '@esbuild/linux-arm64@0.24.0': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true '@esbuild/linux-arm@0.23.1': optional: true + '@esbuild/linux-arm@0.24.0': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true '@esbuild/linux-ia32@0.23.1': optional: true + '@esbuild/linux-ia32@0.24.0': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true '@esbuild/linux-loong64@0.23.1': optional: true + '@esbuild/linux-loong64@0.24.0': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true '@esbuild/linux-mips64el@0.23.1': optional: true + '@esbuild/linux-mips64el@0.24.0': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true '@esbuild/linux-ppc64@0.23.1': optional: true + '@esbuild/linux-ppc64@0.24.0': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true '@esbuild/linux-riscv64@0.23.1': optional: true + '@esbuild/linux-riscv64@0.24.0': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true '@esbuild/linux-s390x@0.23.1': optional: true + '@esbuild/linux-s390x@0.24.0': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true '@esbuild/linux-x64@0.23.1': optional: true + '@esbuild/linux-x64@0.24.0': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true '@esbuild/netbsd-x64@0.23.1': optional: true + '@esbuild/netbsd-x64@0.24.0': + optional: true + '@esbuild/openbsd-arm64@0.23.1': optional: true + '@esbuild/openbsd-arm64@0.24.0': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true '@esbuild/openbsd-x64@0.23.1': optional: true + '@esbuild/openbsd-x64@0.24.0': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true '@esbuild/sunos-x64@0.23.1': optional: true + '@esbuild/sunos-x64@0.24.0': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true '@esbuild/win32-arm64@0.23.1': optional: true + '@esbuild/win32-arm64@0.24.0': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true '@esbuild/win32-ia32@0.23.1': optional: true + '@esbuild/win32-ia32@0.24.0': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true '@esbuild/win32-x64@0.23.1': optional: true + '@esbuild/win32-x64@0.24.0': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: eslint: 8.57.0 @@ -9723,125 +10059,125 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@rollup/plugin-alias@5.1.0(rollup@4.22.2)': + '@rollup/plugin-alias@5.1.0(rollup@4.22.4)': dependencies: slash: 4.0.0 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-commonjs@26.0.1(rollup@4.22.2)': + '@rollup/plugin-commonjs@26.0.1(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) commondir: 1.0.1 estree-walker: 2.0.2 glob: 10.4.5 is-reference: 1.2.1 magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-dynamic-import-vars@2.1.2(rollup@4.22.2)': + '@rollup/plugin-dynamic-import-vars@2.1.2(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) astring: 1.8.6 estree-walker: 2.0.2 fast-glob: 3.3.2 magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-inject@5.0.5(rollup@4.22.2)': + '@rollup/plugin-inject@5.0.5(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) estree-walker: 2.0.2 magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-json@6.1.0(rollup@4.22.2)': + '@rollup/plugin-json@6.1.0(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-node-resolve@15.2.3(rollup@4.22.2)': + '@rollup/plugin-node-resolve@15.2.3(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-replace@5.0.7(rollup@4.22.2)': + '@rollup/plugin-replace@5.0.7(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/plugin-wasm@6.2.2(rollup@4.22.2)': + '@rollup/plugin-wasm@6.2.2(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/pluginutils@5.1.0(rollup@4.22.2)': + '@rollup/pluginutils@5.1.0(rollup@4.22.4)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - '@rollup/rollup-android-arm-eabi@4.22.2': + '@rollup/rollup-android-arm-eabi@4.22.4': optional: true - '@rollup/rollup-android-arm64@4.22.2': + '@rollup/rollup-android-arm64@4.22.4': optional: true - '@rollup/rollup-darwin-arm64@4.22.2': + '@rollup/rollup-darwin-arm64@4.22.4': optional: true - '@rollup/rollup-darwin-x64@4.22.2': + '@rollup/rollup-darwin-x64@4.22.4': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.2': + '@rollup/rollup-linux-arm-musleabihf@4.22.4': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.2': + '@rollup/rollup-linux-arm64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.2': + '@rollup/rollup-linux-arm64-musl@4.22.4': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.2': + '@rollup/rollup-linux-riscv64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.2': + '@rollup/rollup-linux-s390x-gnu@4.22.4': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.2': + '@rollup/rollup-linux-x64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-x64-musl@4.22.2': + '@rollup/rollup-linux-x64-musl@4.22.4': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.2': + '@rollup/rollup-win32-arm64-msvc@4.22.4': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.2': + '@rollup/rollup-win32-ia32-msvc@4.22.4': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.2': + '@rollup/rollup-win32-x64-msvc@4.22.4': optional: true '@rushstack/eslint-patch@1.10.3': {} @@ -10048,6 +10384,33 @@ snapshots: js-yaml: 4.1.0 toposource: 1.2.0 + '@shikijs/core@1.18.0': + dependencies: + '@shikijs/engine-javascript': 1.18.0 + '@shikijs/engine-oniguruma': 1.18.0 + '@shikijs/types': 1.18.0 + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + + '@shikijs/engine-javascript@1.18.0': + dependencies: + '@shikijs/types': 1.18.0 + '@shikijs/vscode-textmate': 9.2.2 + oniguruma-to-js: 0.4.3 + + '@shikijs/engine-oniguruma@1.18.0': + dependencies: + '@shikijs/types': 1.18.0 + '@shikijs/vscode-textmate': 9.2.2 + + '@shikijs/types@1.18.0': + dependencies: + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@9.2.2': {} + '@sinclair/typebox@0.27.8': {} '@sindresorhus/is@4.6.0': {} @@ -10849,11 +11212,11 @@ snapshots: '@visulima/boxen@1.0.18': {} - '@visulima/cerebro@1.1.20(yaml@2.5.0)': + '@visulima/cerebro@1.1.20(yaml@2.5.1)': dependencies: '@visulima/boxen': 1.0.18 '@visulima/colorize': 1.4.9 - '@visulima/find-cache-dir': 1.0.10(yaml@2.5.0) + '@visulima/find-cache-dir': 1.0.10(yaml@2.5.1) '@visulima/pail': 2.1.8 cli-table3: 0.6.5 command-line-args: 6.0.0 @@ -10869,27 +11232,27 @@ snapshots: '@visulima/error@4.4.4': {} - '@visulima/find-cache-dir@1.0.10(yaml@2.5.0)': + '@visulima/find-cache-dir@1.0.10(yaml@2.5.1)': dependencies: - '@visulima/fs': 2.1.17(yaml@2.5.0) + '@visulima/fs': 2.1.17(yaml@2.5.1) '@visulima/path': 1.0.8 transitivePeerDependencies: - yaml '@visulima/fmt@1.1.9': {} - '@visulima/fs@2.1.17(yaml@2.5.0)': + '@visulima/fs@2.1.17(yaml@2.5.1)': dependencies: '@visulima/path': 1.0.8 optionalDependencies: - yaml: 2.5.0 + yaml: 2.5.1 - '@visulima/fs@2.1.5(yaml@2.5.0)': + '@visulima/fs@2.1.5(yaml@2.5.1)': dependencies: '@visulima/path': 1.0.2 type-fest: 4.20.0 optionalDependencies: - yaml: 2.5.0 + yaml: 2.5.1 '@visulima/humanizer@1.0.11': {} @@ -10897,9 +11260,9 @@ snapshots: '@visulima/is-ansi-color-supported@2.2.6': {} - '@visulima/package@1.10.1(yaml@2.5.0)': + '@visulima/package@1.10.1(yaml@2.5.1)': dependencies: - '@visulima/fs': 2.1.5(yaml@2.5.0) + '@visulima/fs': 2.1.5(yaml@2.5.1) '@visulima/path': 1.0.2 jsonc-parser: 3.2.1 normalize-package-data: 6.0.2 @@ -10907,9 +11270,9 @@ snapshots: transitivePeerDependencies: - yaml - '@visulima/package@3.1.0(yaml@2.5.0)': + '@visulima/package@3.1.0(yaml@2.5.1)': dependencies: - '@visulima/fs': 2.1.17(yaml@2.5.0) + '@visulima/fs': 2.1.17(yaml@2.5.1) '@visulima/path': 1.0.8 normalize-package-data: 6.0.2 transitivePeerDependencies: @@ -10927,9 +11290,9 @@ snapshots: '@visulima/path@1.0.8': {} - '@visulima/tsconfig@1.0.12(yaml@2.5.0)': + '@visulima/tsconfig@1.0.12(yaml@2.5.1)': dependencies: - '@visulima/fs': 2.1.17(yaml@2.5.0) + '@visulima/fs': 2.1.17(yaml@2.5.1) '@visulima/path': 1.0.8 jsonc-parser: 3.3.1 resolve-pkg-maps: 1.0.0 @@ -11349,6 +11712,8 @@ snapshots: camelcase@7.0.1: {} + camelcase@8.0.0: {} + caniuse-lite@1.0.30001620: {} caniuse-lite@1.0.30001642: {} @@ -12112,6 +12477,33 @@ snapshots: '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 + esbuild@0.24.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.0 + '@esbuild/android-arm': 0.24.0 + '@esbuild/android-arm64': 0.24.0 + '@esbuild/android-x64': 0.24.0 + '@esbuild/darwin-arm64': 0.24.0 + '@esbuild/darwin-x64': 0.24.0 + '@esbuild/freebsd-arm64': 0.24.0 + '@esbuild/freebsd-x64': 0.24.0 + '@esbuild/linux-arm': 0.24.0 + '@esbuild/linux-arm64': 0.24.0 + '@esbuild/linux-ia32': 0.24.0 + '@esbuild/linux-loong64': 0.24.0 + '@esbuild/linux-mips64el': 0.24.0 + '@esbuild/linux-ppc64': 0.24.0 + '@esbuild/linux-riscv64': 0.24.0 + '@esbuild/linux-s390x': 0.24.0 + '@esbuild/linux-x64': 0.24.0 + '@esbuild/netbsd-x64': 0.24.0 + '@esbuild/openbsd-arm64': 0.24.0 + '@esbuild/openbsd-x64': 0.24.0 + '@esbuild/sunos-x64': 0.24.0 + '@esbuild/win32-arm64': 0.24.0 + '@esbuild/win32-ia32': 0.24.0 + '@esbuild/win32-x64': 0.24.0 + escalade@3.1.2: {} escape-goat@4.0.0: {} @@ -13179,6 +13571,20 @@ snapshots: hast-util-is-body-ok-link: 2.0.0 hast-util-is-element: 2.1.3 + hast-util-to-html@9.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + hast-util-to-nlcst@2.2.0: dependencies: '@types/hast': 2.3.10 @@ -13200,6 +13606,10 @@ snapshots: hast-util-whitespace@2.0.1: {} + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + hastscript@7.2.0: dependencies: '@types/hast': 2.3.10 @@ -13243,6 +13653,8 @@ snapshots: html-escaper@2.0.2: {} + html-void-elements@3.0.0: {} + htmlparser2@8.0.2: dependencies: domelementtype: 2.3.0 @@ -13820,6 +14232,10 @@ snapshots: lines-and-columns@2.0.4: {} + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + lint-staged@15.2.10: dependencies: chalk: 5.3.0 @@ -13988,6 +14404,8 @@ snapshots: lru-cache@7.18.3: {} + lunr@2.3.9: {} + magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -14022,6 +14440,15 @@ snapshots: map-stream@0.1.0: {} + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + markdown-table@2.0.0: dependencies: repeat-string: 1.6.1 @@ -14329,6 +14756,18 @@ snapshots: '@types/mdast': 4.0.4 unist-util-is: 6.0.0 + mdast-util-to-hast@13.2.0: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + mdast-util-to-markdown@0.6.5: dependencies: '@types/unist': 2.0.10 @@ -14380,6 +14819,8 @@ snapshots: dependencies: '@types/mdast': 4.0.4 + mdurl@2.0.0: {} + mem@4.3.0: dependencies: map-age-cleaner: 0.1.3 @@ -15001,6 +15442,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + minimist-options@4.1.0: dependencies: arrify: 1.0.1 @@ -15330,6 +15775,10 @@ snapshots: dependencies: mimic-function: 5.0.1 + oniguruma-to-js@0.4.3: + dependencies: + regex: 4.3.2 + open@8.4.2: dependencies: define-lazy-prop: 2.0.0 @@ -15789,6 +16238,8 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode.js@2.3.1: {} + punycode@2.3.1: {} pupa@3.1.0: @@ -15989,6 +16440,8 @@ snapshots: extend-shallow: 3.0.2 safe-regex: 1.1.0 + regex@4.3.2: {} + regexp-ast-analysis@0.7.1: dependencies: '@eslint-community/regexpp': 4.10.0 @@ -16237,15 +16690,15 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.0 - rollup-plugin-dts@6.1.1(rollup@4.22.2)(typescript@5.6.2): + rollup-plugin-dts@6.1.1(rollup@4.22.4)(typescript@5.6.2): dependencies: magic-string: 0.30.11 - rollup: 4.22.2 + rollup: 4.22.4 typescript: 5.6.2 optionalDependencies: '@babel/code-frame': 7.24.7 - rollup-plugin-license@3.5.2(rollup@4.22.2): + rollup-plugin-license@3.5.2(rollup@4.22.4): dependencies: commenting: 1.1.0 fdir: 6.1.1 @@ -16253,46 +16706,46 @@ snapshots: magic-string: 0.30.11 moment: 2.30.1 package-name-regex: 2.0.6 - rollup: 4.22.2 + rollup: 4.22.4 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 transitivePeerDependencies: - picomatch - rollup-plugin-polyfill-node@0.13.0(rollup@4.22.2): + rollup-plugin-polyfill-node@0.13.0(rollup@4.22.4): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.22.2) - rollup: 4.22.2 + '@rollup/plugin-inject': 5.0.5(rollup@4.22.4) + rollup: 4.22.4 - rollup-plugin-visualizer@5.12.0(rollup@4.22.2): + rollup-plugin-visualizer@5.12.0(rollup@4.22.4): dependencies: open: 8.4.2 picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.2 optionalDependencies: - rollup: 4.22.2 + rollup: 4.22.4 - rollup@4.22.2: + rollup@4.22.4: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.2 - '@rollup/rollup-android-arm64': 4.22.2 - '@rollup/rollup-darwin-arm64': 4.22.2 - '@rollup/rollup-darwin-x64': 4.22.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.2 - '@rollup/rollup-linux-arm-musleabihf': 4.22.2 - '@rollup/rollup-linux-arm64-gnu': 4.22.2 - '@rollup/rollup-linux-arm64-musl': 4.22.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.2 - '@rollup/rollup-linux-riscv64-gnu': 4.22.2 - '@rollup/rollup-linux-s390x-gnu': 4.22.2 - '@rollup/rollup-linux-x64-gnu': 4.22.2 - '@rollup/rollup-linux-x64-musl': 4.22.2 - '@rollup/rollup-win32-arm64-msvc': 4.22.2 - '@rollup/rollup-win32-ia32-msvc': 4.22.2 - '@rollup/rollup-win32-x64-msvc': 4.22.2 + '@rollup/rollup-android-arm-eabi': 4.22.4 + '@rollup/rollup-android-arm64': 4.22.4 + '@rollup/rollup-darwin-arm64': 4.22.4 + '@rollup/rollup-darwin-x64': 4.22.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 + '@rollup/rollup-linux-arm-musleabihf': 4.22.4 + '@rollup/rollup-linux-arm64-gnu': 4.22.4 + '@rollup/rollup-linux-arm64-musl': 4.22.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 + '@rollup/rollup-linux-riscv64-gnu': 4.22.4 + '@rollup/rollup-linux-s390x-gnu': 4.22.4 + '@rollup/rollup-linux-x64-gnu': 4.22.4 + '@rollup/rollup-linux-x64-musl': 4.22.4 + '@rollup/rollup-win32-arm64-msvc': 4.22.4 + '@rollup/rollup-win32-ia32-msvc': 4.22.4 + '@rollup/rollup-win32-x64-msvc': 4.22.4 fsevents: 2.3.3 run-async@2.4.1: {} @@ -16468,6 +16921,15 @@ snapshots: shell-quote@1.8.1: {} + shiki@1.18.0: + dependencies: + '@shikijs/core': 1.18.0 + '@shikijs/engine-javascript': 1.18.0 + '@shikijs/engine-oniguruma': 1.18.0 + '@shikijs/types': 1.18.0 + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + side-channel@1.0.6: dependencies: call-bind: 1.0.7 @@ -17085,6 +17547,8 @@ snapshots: typedarray.prototype.slice: 1.0.3 which-typed-array: 1.1.15 + trim-lines@3.0.1: {} + trim-newlines@3.0.1: {} trim-newlines@4.1.1: {} @@ -17211,12 +17675,32 @@ snapshots: typedarray@0.0.6: {} + typedoc-plugin-markdown@4.2.7(typedoc@0.26.7(typescript@5.6.2)): + dependencies: + typedoc: 0.26.7(typescript@5.6.2) + + typedoc-plugin-rename-defaults@0.7.1(typedoc@0.26.7(typescript@5.6.2)): + dependencies: + camelcase: 8.0.0 + typedoc: 0.26.7(typescript@5.6.2) + + typedoc@0.26.7(typescript@5.6.2): + dependencies: + lunr: 2.3.9 + markdown-it: 14.1.0 + minimatch: 9.0.5 + shiki: 1.18.0 + typescript: 5.6.2 + yaml: 2.5.1 + typescript@5.6.1-rc: {} typescript@5.6.2: {} typical@7.1.1: {} + uc.micro@2.1.0: {} + ufo@1.5.3: {} uglify-js@3.17.4: @@ -17406,6 +17890,10 @@ snapshots: dependencies: '@types/unist': 2.0.10 + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.2 + unist-util-remove-position@4.0.2: dependencies: '@types/unist': 2.0.10 @@ -17663,7 +18151,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.2 + rollup: 4.22.4 optionalDependencies: '@types/node': 18.19.39 fsevents: 2.3.3 @@ -17672,7 +18160,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.2 + rollup: 4.22.4 optionalDependencies: '@types/node': 22.5.5 fsevents: 2.3.3 @@ -17837,6 +18325,8 @@ snapshots: yaml@2.5.0: {} + yaml@2.5.1: {} + yargs-parser@20.2.9: {} yargs-parser@21.1.1: {}