rolldown 1.0.0-beta.22 → 1.0.0-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cli.cjs +8 -8
  2. package/dist/cli.mjs +8 -8
  3. package/dist/config.cjs +4 -4
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +4 -4
  7. package/dist/experimental-index.cjs +3 -4
  8. package/dist/experimental-index.d.cts +3 -6
  9. package/dist/experimental-index.d.mts +3 -6
  10. package/dist/experimental-index.mjs +4 -4
  11. package/dist/experimental-runtime-types.d.ts +1 -2
  12. package/dist/filter-index.cjs +1 -1
  13. package/dist/filter-index.d.cts +2 -2
  14. package/dist/filter-index.d.mts +2 -2
  15. package/dist/filter-index.mjs +1 -1
  16. package/dist/index.cjs +3 -3
  17. package/dist/index.d.cts +3 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +3 -3
  20. package/dist/parallel-plugin-worker.cjs +4 -4
  21. package/dist/parallel-plugin-worker.mjs +4 -4
  22. package/dist/parallel-plugin.d.cts +2 -2
  23. package/dist/parallel-plugin.d.mts +2 -2
  24. package/dist/parse-ast-index.cjs +1 -1
  25. package/dist/parse-ast-index.d.cts +1 -1
  26. package/dist/parse-ast-index.d.mts +1 -1
  27. package/dist/parse-ast-index.mjs +1 -1
  28. package/dist/shared/{binding-B8kHDLfO.d.mts → binding-DG3bbtXG.d.cts} +4 -22
  29. package/dist/shared/{binding-CbR_BHh9.d.cts → binding-cECB-Ts3.d.mts} +4 -22
  30. package/dist/shared/{define-config-Czc3unFy.d.mts → define-config-BnlWQIlM.d.cts} +21 -23
  31. package/dist/shared/{define-config-DZVEpUTF.d.cts → define-config-DLGGYzTV.d.mts} +21 -23
  32. package/dist/shared/{load-config-gtAGhZYG.mjs → load-config-CciutN6Q.mjs} +1 -1
  33. package/dist/shared/{load-config-DPnW1OC0.cjs → load-config-xHhudbSQ.cjs} +1 -1
  34. package/dist/shared/{misc-BN0nse6C.mjs → misc-CQeo-AFx.mjs} +1 -4
  35. package/dist/shared/{misc-BKp5iIef.cjs → misc-DksvspN4.cjs} +0 -9
  36. package/dist/shared/{parse-ast-index-DDMiEgyY.cjs → parse-ast-index-BzYd1T7N.cjs} +15 -3
  37. package/dist/shared/{parse-ast-index-DmWy-n6o.mjs → parse-ast-index-D-D8UIRn.mjs} +10 -4
  38. package/dist/shared/{src-CJvC869N.mjs → src-CVZ9JbCC.mjs} +472 -766
  39. package/dist/shared/{src-9_Ra3A9D.cjs → src-DJtUlfyl.cjs} +455 -755
  40. package/package.json +19 -20
@@ -1,6 +1,6 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-B8kHDLfO.mjs";
2
- import { TopLevelFilterExpression } from "@rolldown/pluginutils";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-DG3bbtXG.cjs";
3
2
  import { Program } from "@oxc-project/types";
3
+ import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
5
5
  //#region src/log/logging.d.ts
6
6
  type LogLevel = "info" | "debug" | "warn";
@@ -38,6 +38,10 @@ interface RollupError extends RollupLog {
38
38
  }
39
39
  type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
40
40
  //#endregion
41
+ //#region src/types/misc.d.ts
42
+ type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
43
+ type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
44
+ //#endregion
41
45
  //#region src/types/module-info.d.ts
42
46
  interface ModuleInfo extends ModuleOptions {
43
47
  /**
@@ -54,17 +58,6 @@ interface ModuleInfo extends ModuleOptions {
54
58
  isEntry: boolean;
55
59
  }
56
60
  //#endregion
57
- //#region src/types/chunking-context.d.ts
58
- declare class ChunkingContext {
59
- private context;
60
- constructor(context: BindingChunkingContext);
61
- getModuleInfo(moduleId: string): ModuleInfo | null;
62
- }
63
- //#endregion
64
- //#region src/types/misc.d.ts
65
- type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
66
- type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
67
- //#endregion
68
61
  //#region src/utils/asset-source.d.ts
69
62
  type AssetSource = string | Uint8Array;
70
63
  //#endregion
@@ -156,6 +149,9 @@ interface PreRenderedAsset {
156
149
  type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
157
150
  type GlobalsFunction = (name: string) => string;
158
151
  type MinifyOptions = BindingMinifyOptions;
152
+ interface ChunkingContext {
153
+ getModuleInfo(moduleId: string): ModuleInfo | null;
154
+ }
159
155
  interface OutputOptions {
160
156
  dir?: string;
161
157
  file?: string;
@@ -735,11 +731,15 @@ declare class BuiltinPlugin {
735
731
  constructor(name: BindingBuiltinPluginName, _options?: unknown);
736
732
  }
737
733
  declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
738
- declare function dynamicImportVarsPlugin(config?: BindingDynamicImportVarsPluginConfig): BuiltinPlugin;
734
+ type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
735
+ include?: StringOrRegExp | StringOrRegExp[];
736
+ exclude?: StringOrRegExp | StringOrRegExp[];
737
+ };
738
+ declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
739
739
  declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
740
740
  declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
741
741
  declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
742
- declare function wasmHelperPlugin(): BuiltinPlugin;
742
+ declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
743
743
  declare function wasmFallbackPlugin(): BuiltinPlugin;
744
744
  declare function loadFallbackPlugin(): BuiltinPlugin;
745
745
  declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
@@ -758,11 +758,6 @@ declare function webWorkerPostPlugin(): BuiltinPlugin;
758
758
  declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
759
759
  declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"];
760
760
  declare const ENUMERATED_PLUGIN_HOOK_NAMES: [...typeof ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...typeof ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, "footer", "banner", "intro", "outro"];
761
- type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES;
762
- /**
763
- * Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
764
- */
765
- type PluginHookNames = EnumeratedPluginHookNames[number];
766
761
  /**
767
762
  * Names of all defined hooks. It's like
768
763
  * ```ts
@@ -773,7 +768,7 @@ type PluginHookNames = EnumeratedPluginHookNames[number];
773
768
  * }
774
769
  * ```
775
770
  */
776
- type DefinedHookNames = { readonly [K in PluginHookNames]: K };
771
+ type DefinedHookNames = { readonly [K in typeof ENUMERATED_PLUGIN_HOOK_NAMES[number]]: K };
777
772
  /**
778
773
  * Names of all defined hooks. It's like
779
774
  * ```js
@@ -1011,6 +1006,9 @@ type HmrOptions = boolean | {
1011
1006
  port?: number;
1012
1007
  implement?: string;
1013
1008
  };
1009
+ type OptimizationOptions = {
1010
+ inlineConst?: boolean;
1011
+ };
1014
1012
  type AttachDebugOptions = "none" | "simple" | "full";
1015
1013
  interface RollupJsxOptions {
1016
1014
  mode?: "classic" | "automatic" | "preserve";
@@ -1064,7 +1062,6 @@ interface InputOptions {
1064
1062
  onwarn?: (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void;
1065
1063
  moduleTypes?: ModuleTypes;
1066
1064
  experimental?: {
1067
- enableComposingJsPlugins?: boolean;
1068
1065
  strictExecutionOrder?: boolean;
1069
1066
  disableLiveBindings?: boolean;
1070
1067
  viteMode?: boolean;
@@ -1193,6 +1190,7 @@ interface InputOptions {
1193
1190
  sessionId?: string;
1194
1191
  };
1195
1192
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1193
+ optimization?: OptimizationOptions;
1196
1194
  }
1197
1195
  //#endregion
1198
1196
  //#region src/types/rolldown-options.d.ts
@@ -1211,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
1211
1209
  declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1212
1210
  declare function defineConfig(config: ConfigExport): ConfigExport;
1213
1211
  //#endregion
1214
- export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
1212
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
@@ -1,6 +1,6 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CbR_BHh9.cjs";
2
- import { Program } from "@oxc-project/types";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-cECB-Ts3.mjs";
3
2
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
3
+ import { Program } from "@oxc-project/types";
4
4
 
5
5
  //#region src/log/logging.d.ts
6
6
  type LogLevel = "info" | "debug" | "warn";
@@ -38,6 +38,10 @@ interface RollupError extends RollupLog {
38
38
  }
39
39
  type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
40
40
  //#endregion
41
+ //#region src/types/misc.d.ts
42
+ type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
43
+ type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
44
+ //#endregion
41
45
  //#region src/types/module-info.d.ts
42
46
  interface ModuleInfo extends ModuleOptions {
43
47
  /**
@@ -54,17 +58,6 @@ interface ModuleInfo extends ModuleOptions {
54
58
  isEntry: boolean;
55
59
  }
56
60
  //#endregion
57
- //#region src/types/chunking-context.d.ts
58
- declare class ChunkingContext {
59
- private context;
60
- constructor(context: BindingChunkingContext);
61
- getModuleInfo(moduleId: string): ModuleInfo | null;
62
- }
63
- //#endregion
64
- //#region src/types/misc.d.ts
65
- type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
66
- type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
67
- //#endregion
68
61
  //#region src/utils/asset-source.d.ts
69
62
  type AssetSource = string | Uint8Array;
70
63
  //#endregion
@@ -156,6 +149,9 @@ interface PreRenderedAsset {
156
149
  type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
157
150
  type GlobalsFunction = (name: string) => string;
158
151
  type MinifyOptions = BindingMinifyOptions;
152
+ interface ChunkingContext {
153
+ getModuleInfo(moduleId: string): ModuleInfo | null;
154
+ }
159
155
  interface OutputOptions {
160
156
  dir?: string;
161
157
  file?: string;
@@ -735,11 +731,15 @@ declare class BuiltinPlugin {
735
731
  constructor(name: BindingBuiltinPluginName, _options?: unknown);
736
732
  }
737
733
  declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
738
- declare function dynamicImportVarsPlugin(config?: BindingDynamicImportVarsPluginConfig): BuiltinPlugin;
734
+ type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
735
+ include?: StringOrRegExp | StringOrRegExp[];
736
+ exclude?: StringOrRegExp | StringOrRegExp[];
737
+ };
738
+ declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
739
739
  declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
740
740
  declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
741
741
  declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
742
- declare function wasmHelperPlugin(): BuiltinPlugin;
742
+ declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
743
743
  declare function wasmFallbackPlugin(): BuiltinPlugin;
744
744
  declare function loadFallbackPlugin(): BuiltinPlugin;
745
745
  declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
@@ -758,11 +758,6 @@ declare function webWorkerPostPlugin(): BuiltinPlugin;
758
758
  declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
759
759
  declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"];
760
760
  declare const ENUMERATED_PLUGIN_HOOK_NAMES: [...typeof ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...typeof ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, "footer", "banner", "intro", "outro"];
761
- type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES;
762
- /**
763
- * Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
764
- */
765
- type PluginHookNames = EnumeratedPluginHookNames[number];
766
761
  /**
767
762
  * Names of all defined hooks. It's like
768
763
  * ```ts
@@ -773,7 +768,7 @@ type PluginHookNames = EnumeratedPluginHookNames[number];
773
768
  * }
774
769
  * ```
775
770
  */
776
- type DefinedHookNames = { readonly [K in PluginHookNames]: K };
771
+ type DefinedHookNames = { readonly [K in typeof ENUMERATED_PLUGIN_HOOK_NAMES[number]]: K };
777
772
  /**
778
773
  * Names of all defined hooks. It's like
779
774
  * ```js
@@ -1011,6 +1006,9 @@ type HmrOptions = boolean | {
1011
1006
  port?: number;
1012
1007
  implement?: string;
1013
1008
  };
1009
+ type OptimizationOptions = {
1010
+ inlineConst?: boolean;
1011
+ };
1014
1012
  type AttachDebugOptions = "none" | "simple" | "full";
1015
1013
  interface RollupJsxOptions {
1016
1014
  mode?: "classic" | "automatic" | "preserve";
@@ -1064,7 +1062,6 @@ interface InputOptions {
1064
1062
  onwarn?: (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void;
1065
1063
  moduleTypes?: ModuleTypes;
1066
1064
  experimental?: {
1067
- enableComposingJsPlugins?: boolean;
1068
1065
  strictExecutionOrder?: boolean;
1069
1066
  disableLiveBindings?: boolean;
1070
1067
  viteMode?: boolean;
@@ -1193,6 +1190,7 @@ interface InputOptions {
1193
1190
  sessionId?: string;
1194
1191
  };
1195
1192
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1193
+ optimization?: OptimizationOptions;
1196
1194
  }
1197
1195
  //#endregion
1198
1196
  //#region src/types/rolldown-options.d.ts
@@ -1211,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
1211
1209
  declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1212
1210
  declare function defineConfig(config: ConfigExport): ConfigExport;
1213
1211
  //#endregion
1214
- export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
1212
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
@@ -1,4 +1,4 @@
1
- import { rolldown } from "./src-CJvC869N.mjs";
1
+ import { rolldown } from "./src-CVZ9JbCC.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { pathToFileURL } from "node:url";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_src = require('./src-9_Ra3A9D.cjs');
2
+ const require_src = require('./src-DJtUlfyl.cjs');
3
3
  const node_fs = require_chunk.__toESM(require("node:fs"));
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -2,9 +2,6 @@
2
2
  function arraify(value) {
3
3
  return Array.isArray(value) ? value : [value];
4
4
  }
5
- function isNullish(value) {
6
- return value === null || value === void 0;
7
- }
8
5
  function isPromiseLike(value) {
9
6
  return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
10
7
  }
@@ -22,4 +19,4 @@ function unsupported(info) {
22
19
  function noop(..._args) {}
23
20
 
24
21
  //#endregion
25
- export { arraify, isNullish, isPromiseLike, noop, unimplemented, unreachable, unsupported };
22
+ export { arraify, isPromiseLike, noop, unimplemented, unreachable, unsupported };
@@ -3,9 +3,6 @@
3
3
  function arraify(value) {
4
4
  return Array.isArray(value) ? value : [value];
5
5
  }
6
- function isNullish(value) {
7
- return value === null || value === void 0;
8
- }
9
6
  function isPromiseLike(value) {
10
7
  return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
11
8
  }
@@ -29,12 +26,6 @@ Object.defineProperty(exports, 'arraify', {
29
26
  return arraify;
30
27
  }
31
28
  });
32
- Object.defineProperty(exports, 'isNullish', {
33
- enumerable: true,
34
- get: function () {
35
- return isNullish;
36
- }
37
- });
38
29
  Object.defineProperty(exports, 'isPromiseLike', {
39
30
  enumerable: true,
40
31
  get: function () {
@@ -326,7 +326,7 @@ if (!nativeBinding) {
326
326
  if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
327
327
  throw new Error(`Failed to load native binding`);
328
328
  }
329
- const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
329
+ const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
330
330
 
331
331
  //#endregion
332
332
  //#region src/utils/code-frame.ts
@@ -430,7 +430,7 @@ function locate(source, search, options) {
430
430
 
431
431
  //#endregion
432
432
  //#region src/log/logs.ts
433
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
433
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
434
434
  function logParseError(message) {
435
435
  return {
436
436
  code: PARSE_ERROR,
@@ -461,6 +461,12 @@ function logMultiplyNotifyOption() {
461
461
  message: `Found multiply notify option at watch options, using first one to start notify watcher.`
462
462
  };
463
463
  }
464
+ function logDuplicateJsxConfig() {
465
+ return {
466
+ code: DUPLICATE_JSX_CONFIG,
467
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
468
+ };
469
+ }
464
470
  function logPluginError(error$1, plugin, { hook, id } = {}) {
465
471
  try {
466
472
  const code = error$1.code;
@@ -509,7 +515,7 @@ function augmentCodeLocation(properties, pos, source, id) {
509
515
  }
510
516
 
511
517
  //#endregion
512
- //#region ../../node_modules/.pnpm/oxc-parser@0.75.0/node_modules/oxc-parser/wrap.mjs
518
+ //#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
513
519
  function wrap$1(result) {
514
520
  let program, module$1, comments, errors;
515
521
  return {
@@ -670,6 +676,12 @@ Object.defineProperty(exports, 'logCycleLoading', {
670
676
  return logCycleLoading;
671
677
  }
672
678
  });
679
+ Object.defineProperty(exports, 'logDuplicateJsxConfig', {
680
+ enumerable: true,
681
+ get: function () {
682
+ return logDuplicateJsxConfig;
683
+ }
684
+ });
673
685
  Object.defineProperty(exports, 'logInputHookInOutputPlugin', {
674
686
  enumerable: true,
675
687
  get: function () {
@@ -353,7 +353,7 @@ if (!nativeBinding) {
353
353
  if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
354
354
  throw new Error(`Failed to load native binding`);
355
355
  }
356
- const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
356
+ const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
357
357
 
358
358
  //#endregion
359
359
  //#region src/utils/code-frame.ts
@@ -457,7 +457,7 @@ function locate(source, search, options) {
457
457
 
458
458
  //#endregion
459
459
  //#region src/log/logs.ts
460
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
460
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
461
461
  function logParseError(message) {
462
462
  return {
463
463
  code: PARSE_ERROR,
@@ -488,6 +488,12 @@ function logMultiplyNotifyOption() {
488
488
  message: `Found multiply notify option at watch options, using first one to start notify watcher.`
489
489
  };
490
490
  }
491
+ function logDuplicateJsxConfig() {
492
+ return {
493
+ code: DUPLICATE_JSX_CONFIG,
494
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
495
+ };
496
+ }
491
497
  function logPluginError(error$1, plugin, { hook, id } = {}) {
492
498
  try {
493
499
  const code = error$1.code;
@@ -536,7 +542,7 @@ function augmentCodeLocation(properties, pos, source, id) {
536
542
  }
537
543
 
538
544
  //#endregion
539
- //#region ../../node_modules/.pnpm/oxc-parser@0.75.0/node_modules/oxc-parser/wrap.mjs
545
+ //#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
540
546
  function wrap$1(result) {
541
547
  let program, module$1, comments, errors;
542
548
  return {
@@ -613,4 +619,4 @@ async function parseAstAsync(sourceText, options, filename) {
613
619
  }
614
620
 
615
621
  //#endregion
616
- export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
622
+ export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };