@@ -144,6 +144,17 @@ export interface MangleOptions {
144144 * @default false
145145 */
146146 keepNames ?: boolean | MangleOptionsKeepNames ;
147+ /**
148+ * Names that bindings must not be renamed to, and that bindings already
149+ * carrying them keep. Equivalent to terser's `mangle.reserved`.
150+ *
151+ * Pass `['exports', 'module']` when minifying prebuilt CommonJS / UMD files
152+ * that Node consumers `import` directly, so Node's cjs-module-lexer can still
153+ * detect the mangled module's named exports.
154+ *
155+ * @default []
156+ */
157+ reserved ?: Array < string > ;
147158 /** Debug mangled names. */
148159 debug ?: boolean ;
149160}
@@ -1762,6 +1773,7 @@ export declare class BindingNormalizedOptions {
17621773 get name ( ) : string | null ;
17631774 get entryFilenames ( ) : string | undefined ;
17641775 get chunkFilenames ( ) : string | undefined ;
1776+ get sourcemapFilenames ( ) : string | undefined ;
17651777 get assetFilenames ( ) : string | undefined ;
17661778 get dir ( ) : string | null ;
17671779 get file ( ) : string | null ;
@@ -2591,15 +2603,6 @@ export interface BindingMatchGroup {
25912603 includeDependenciesRecursively ?: boolean ;
25922604}
25932605
2594- export interface BindingModulePreloadOptions {
2595- polyfill : boolean ;
2596- resolveDependencies ?: (
2597- filename : string ,
2598- deps : string [ ] ,
2599- context : { hostId : string ; hostType : 'html' | 'js' } ,
2600- ) => string [ ] ;
2601- }
2602-
26032606export interface BindingModules {
26042607 values : Array < BindingRenderedModule > ;
26052608 keys : Array < string > ;
@@ -2643,6 +2646,7 @@ export interface BindingOutputOptions {
26432646 paths ?: Record < string , string > | ( ( id : string ) => string ) ;
26442647 plugins : ( BindingBuiltinPlugin | BindingPluginOptions | undefined ) [ ] ;
26452648 sourcemap ?: 'file' | 'inline' | 'hidden' ;
2649+ sourcemapFileNames ?: string | ( ( chunk : PreRenderedChunk ) => string ) ;
26462650 sourcemapBaseUrl ?: string ;
26472651 sourcemapIgnoreList ?:
26482652 | boolean
@@ -2843,18 +2847,6 @@ export declare const enum BindingRebuildStrategy {
28432847 Never = 2 ,
28442848}
28452849
2846- export interface BindingRenderBuiltUrlConfig {
2847- ssr : boolean ;
2848- type : 'asset' | 'public' ;
2849- hostId : string ;
2850- hostType : 'js' | 'css' | 'html' ;
2851- }
2852-
2853- export interface BindingRenderBuiltUrlRet {
2854- relative ?: boolean ;
2855- runtime ?: string ;
2856- }
2857-
28582850export interface BindingReplacePluginConfig {
28592851 values : Record < string , string > ;
28602852 delimiters ?: [ string , string ] ;
@@ -2863,11 +2855,6 @@ export interface BindingReplacePluginConfig {
28632855 sourcemap ?: boolean ;
28642856}
28652857
2866- export interface BindingResolveDependenciesContext {
2867- hostId : string ;
2868- hostType : string ;
2869- }
2870-
28712858export type BindingResolvedExternal = boolean | string ;
28722859
28732860export interface BindingResolveOptions {
@@ -3202,6 +3189,7 @@ export interface JsOutputChunk {
32023189 map ?: BindingSourcemap ;
32033190 sourcemapFilename ?: string ;
32043191 preliminaryFilename : string ;
3192+ preliminarySourcemapFilename ?: string ;
32053193}
32063194
32073195/** Error emitted from native side, it only contains kind and message, no stack trace. */
0 commit comments