Interface: OutputOptions
Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:214
Properties
advancedChunks?
optional advancedChunks: object;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:380
Allows you to do manual chunking. For deeper understanding, please refer to the in-depth documentation.
groups?
optional groups: object[];Groups to be used for advanced chunking.
includeDependenciesRecursively?
optional includeDependenciesRecursively: boolean;- Type:
boolean - Default:
true
By default, each group will also include captured modules' dependencies. This reduces the chance of generating circular chunks.
If you want to disable this behavior, it's recommended to both set
preserveEntrySignatures: false | 'allow-extension'strictExecutionOrder: true
to avoid generating invalid chunks.
maxModuleSize?
optional maxModuleSize: number;- Type:
number
Global fallback of {group}.maxModuleSize, if it's not specified in the group.
maxSize?
optional maxSize: number;- Type:
number
Global fallback of {group}.maxSize, if it's not specified in the group.
minModuleSize?
optional minModuleSize: number;- Type:
number
Global fallback of {group}.minModuleSize, if it's not specified in the group.
minShareCount?
optional minShareCount: number;- Type:
number
Global fallback of {group}.minShareCount, if it's not specified in the group.
minSize?
optional minSize: number;- Type:
number
Global fallback of {group}.minSize, if it's not specified in the group.
assetFileNames?
optional assetFileNames: string | AssetFileNamesFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:279
banner?
optional banner: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:265
chunkFileNames?
optional chunkFileNames:
| string
| ChunkFileNamesFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:281
cleanDir?
optional cleanDir: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:595
- Type:
boolean - Default:
false
Clean output directory before emitting output.
cssChunkFileNames?
optional cssChunkFileNames:
| string
| ChunkFileNamesFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:283
cssEntryFileNames?
optional cssEntryFileNames:
| string
| ChunkFileNamesFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:282
dir?
optional dir: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:215
entryFileNames?
optional entryFileNames:
| string
| ChunkFileNamesFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:280
esModule?
optional esModule: boolean | "if-default-prop";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:278
exports?
optional exports: "default" | "auto" | "named" | "none";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:217
extend?
optional extend: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:277
externalLiveBindings?
optional externalLiveBindings: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:330
file?
optional file: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:216
footer?
optional footer: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:266
format?
optional format: ModuleFormat;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:228
Expected format of generated code.
'es','esm'and'module'are the same format, all stand for ES module.'cjs'and'commonjs'are the same format, all stand for CommonJS module.'iife'stands for Immediately Invoked Function Expression.'umd'stands for Universal Module Definition.
Default
'esm'generatedCode?
optional generatedCode: Partial<GeneratedCodeOptions>;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:329
globals?
optional globals:
| Record<string, string>
| GlobalsFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:297
hashCharacters?
optional hashCharacters: "base64" | "hex" | "base36";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:218
hoistTransitiveImports?
optional hoistTransitiveImports: false;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:577
inlineDynamicImports?
optional inlineDynamicImports: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:331
intro?
optional intro: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:275
keepNames?
optional keepNames: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:603
Keep function and class names after bundling.
When enabled, the bundler will preserve the original names of functions and classes in the output, which is useful for debugging and error stack traces.
Default
falselegalComments?
optional legalComments: "inline" | "none";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:574
Control comments in the output.
none: no commentsinline: preserve comments that contain@license,@preserveor starts with//!/*!
manualChunks?
optional manualChunks: ManualChunksFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:376
- Type:
((moduleId: string, meta: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue) - Object form is not supported.
WARNING
- This option is deprecated. Please use
advancedChunksinstead. - If
manualChunksandadvancedChunksare both specified,manualChunksoption will be ignored.
You could use this option for migration purpose. Under the hood,
{
manualChunks: (moduleId, meta) => {
if (moduleId.includes('node_modules')) {
return 'vendor'
}
return null
}
}will be transformed to
{
advancedChunks: {
groups: [
{
name(moduleId) {
if (moduleId.includes('node_modules')) {
return 'vendor';
}
return null;
},
},
],
}
}Deprecated
Please use advancedChunks instead.
minify?
optional minify:
| boolean
| MinifyOptions
| "dce-only";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:295
Control code minification.
true: Enable full minification including code compression and dead code eliminationfalse: Disable minification (default)'dce-only': Only perform dead code elimination without code compressionMinifyOptions: Fine-grained control over minification settings
Default
falseminifyInternalExports?
optional minifyInternalExports: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:588
- Type:
boolean - Default:
truefor formatesor ifoutput.minifyistrueor object,falseotherwise
Whether to minify internal exports.
name?
optional name: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:296
outro?
optional outro: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:276
paths?
optional paths: Record<string, string> | PathsFunction$1;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:328
Maps external module IDs to paths.
Allows customizing the path used when importing external dependencies. This is particularly useful for loading dependencies from CDNs or custom locations.
- Object form: Maps module IDs to their replacement paths
- Function form: Takes a module ID and returns its replacement path
Examples
{
paths: {
'd3': 'https://cdn.jsdelivr.net/npm/d3@7'
}
}{
paths: (id) => {
if (id.startsWith('lodash')) {
return `https://cdn.jsdelivr.net/npm/${id}`
}
return id
}
}plugins?
optional plugins: RolldownOutputPluginOption;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:575
polyfillRequire?
optional polyfillRequire: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:576
postBanner?
optional postBanner: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:270
Similar to banner option, but will run after the renderChunk hook and builtin minification.
postFooter?
optional postFooter: string | AddonFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:274
Similar to footer option, but will run after the renderChunk hook and builtin minification.
preserveModules?
optional preserveModules: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:578
preserveModulesRoot?
optional preserveModulesRoot: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:580
sanitizeFileName?
optional sanitizeFileName: boolean | SanitizeFileNameFunction;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:284
sourcemap?
optional sourcemap: boolean | "hidden" | "inline";Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:229
sourcemapBaseUrl?
optional sourcemapBaseUrl: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:230
sourcemapDebugIds?
optional sourcemapDebugIds: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:231
sourcemapIgnoreList?
optional sourcemapIgnoreList:
| boolean
| StringOrRegExp
| SourcemapIgnoreListOption;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:263
Control which source files are included in the sourcemap ignore list. Files in the ignore list are excluded from debugger stepping and error stack traces.
false: Include all source files in the ignore listtrue: Include no source files in the ignore liststring: Files containing this string in their path will be included in the ignore listRegExp: Files matching this regular expression will be included in the ignore listfunction: Custom function(source: string, sourcemapPath: string) => booleanto determine if a source should be ignored
Performance
Using static values (boolean, string, or RegExp) is significantly more performant than functions. Calling JavaScript functions from Rust has extremely high overhead, so prefer static patterns when possible.
Examples
// ✅ Preferred: Use RegExp for better performance
sourcemapIgnoreList: /node_modules/
// ✅ Preferred: Use string pattern for better performance
sourcemapIgnoreList: 'vendor'
// ! Use sparingly: Function calls have high overhead
sourcemapIgnoreList: (source, sourcemapPath) => {
return source.includes('node_modules') || source.includes('.min.')
}default: /node_modules/
sourcemapPathTransform?
optional sourcemapPathTransform: SourcemapPathTransformOption;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:264
topLevelVar?
optional topLevelVar: boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:581
virtualDirname?
optional virtualDirname: string;Defined in: node_modules/.pnpm/rolldown@1.0.0-beta.55/node_modules/rolldown/dist/shared/define-config-MdVaFcie.d.mts:579