@rolldown/browser 1.0.0-beta.33 → 1.0.0-beta.34
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.
- package/dist/cli.cjs +31 -31
- package/dist/cli.mjs +31 -31
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +34 -3
- package/dist/experimental-index.cjs +36 -2
- package/dist/experimental-index.d.cts +36 -4
- package/dist/experimental-index.d.mts +36 -4
- package/dist/experimental-index.mjs +35 -4
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +3 -0
- package/dist/rolldown-binding.wasi.cjs +3 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CFhvYkVn.d.mts → binding-9k0egz6L.d.mts} +107 -7
- package/dist/shared/{binding-DQk9TN_A.d.cts → binding-D13M6Llu.d.cts} +107 -7
- package/dist/shared/{define-config-B3QOs3Kt.d.cts → define-config-D5AluabE.d.cts} +63 -24
- package/dist/shared/{define-config-DyjJkNqG.d.mts → define-config-DzIQxNqU.d.mts} +63 -24
- package/dist/shared/{load-config-CLPLfZVe.mjs → load-config--VYNOtUY.mjs} +1 -1
- package/dist/shared/{load-config-xKQFLlGV.cjs → load-config-DfHD1OI9.cjs} +1 -1
- package/dist/shared/{parse-ast-index-BGzB5Bo-.mjs → parse-ast-index-C_CZT4St.mjs} +1 -1
- package/dist/shared/{parse-ast-index-BZfwAN9P.cjs → parse-ast-index-ChWj_C49.cjs} +1 -1
- package/dist/shared/{src-CZgQg1yE.mjs → src-B4V64IkU.mjs} +105 -90
- package/dist/shared/{src-CGziNJPr.cjs → src-McCMqGpa.cjs} +122 -95
- package/dist/{src-D_htlJ_o.js → src-Bl12Y5ab.js} +102 -87
- package/package.json +19 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-D13M6Llu.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -150,7 +150,7 @@ interface PreRenderedAsset {
|
|
|
150
150
|
}
|
|
151
151
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
152
152
|
type GlobalsFunction = (name: string) => string;
|
|
153
|
-
type MinifyOptions =
|
|
153
|
+
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "sorucemap">;
|
|
154
154
|
interface ChunkingContext {
|
|
155
155
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
156
156
|
}
|
|
@@ -186,6 +186,16 @@ interface OutputOptions {
|
|
|
186
186
|
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
187
187
|
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
188
188
|
sanitizeFileName?: boolean | ((name: string) => string);
|
|
189
|
+
/**
|
|
190
|
+
* Control code minification.
|
|
191
|
+
*
|
|
192
|
+
* - `true`: Enable full minification including code compression and dead code elimination
|
|
193
|
+
* - `false`: Disable minification (default)
|
|
194
|
+
* - `'dce-only'`: Only perform dead code elimination without code compression
|
|
195
|
+
* - `MinifyOptions`: Fine-grained control over minification settings
|
|
196
|
+
*
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
189
199
|
minify?: boolean | "dce-only" | MinifyOptions;
|
|
190
200
|
name?: string;
|
|
191
201
|
globals?: Record<string, string> | GlobalsFunction;
|
|
@@ -574,7 +584,7 @@ interface NormalizedOutputOptions {
|
|
|
574
584
|
sourcemapDebugIds: boolean;
|
|
575
585
|
sourcemapIgnoreList: SourcemapIgnoreListOption;
|
|
576
586
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
577
|
-
minify: false |
|
|
587
|
+
minify: false | MinifyOptions | "dce-only";
|
|
578
588
|
legalComments: "none" | "inline";
|
|
579
589
|
polyfillRequire: boolean;
|
|
580
590
|
plugins: RolldownPlugin[];
|
|
@@ -806,30 +816,12 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
806
816
|
//#region src/index.d.ts
|
|
807
817
|
declare const VERSION: string;
|
|
808
818
|
//#endregion
|
|
809
|
-
//#region src/builtin-plugin/
|
|
819
|
+
//#region src/builtin-plugin/utils.d.ts
|
|
810
820
|
declare class BuiltinPlugin {
|
|
811
821
|
name: BindingBuiltinPluginName;
|
|
812
822
|
_options?: unknown;
|
|
813
823
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
814
824
|
}
|
|
815
|
-
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
816
|
-
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
817
|
-
include?: StringOrRegExp | StringOrRegExp[];
|
|
818
|
-
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
819
|
-
};
|
|
820
|
-
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
821
|
-
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
822
|
-
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
823
|
-
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
824
|
-
declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
|
|
825
|
-
declare function wasmFallbackPlugin(): BuiltinPlugin;
|
|
826
|
-
declare function loadFallbackPlugin(): BuiltinPlugin;
|
|
827
|
-
declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
|
|
828
|
-
declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
829
|
-
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
830
|
-
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
831
|
-
declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
|
|
832
|
-
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
833
825
|
//#endregion
|
|
834
826
|
//#region src/constants/plugin.d.ts
|
|
835
827
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
@@ -878,6 +870,7 @@ interface ModuleOptions {
|
|
|
878
870
|
moduleSideEffects: ModuleSideEffects;
|
|
879
871
|
meta: CustomPluginOptions;
|
|
880
872
|
invalidate?: boolean;
|
|
873
|
+
packageJsonPath?: string;
|
|
881
874
|
}
|
|
882
875
|
interface ResolvedId extends ModuleOptions {
|
|
883
876
|
external: boolean | "absolute";
|
|
@@ -1048,6 +1041,11 @@ interface ChecksOptions {
|
|
|
1048
1041
|
* @default true
|
|
1049
1042
|
*/
|
|
1050
1043
|
configurationFieldConflict?: boolean;
|
|
1044
|
+
/**
|
|
1045
|
+
* Whether to emit warning when detecting prefer builtin feature
|
|
1046
|
+
* @default true
|
|
1047
|
+
*/
|
|
1048
|
+
preferBuiltinFeature?: boolean;
|
|
1051
1049
|
}
|
|
1052
1050
|
//#endregion
|
|
1053
1051
|
//#region src/options/input-options.d.ts
|
|
@@ -1074,6 +1072,32 @@ type HmrOptions = boolean | {
|
|
|
1074
1072
|
implement?: string;
|
|
1075
1073
|
};
|
|
1076
1074
|
type OptimizationOptions = {
|
|
1075
|
+
/**
|
|
1076
|
+
* Inline imported constant values during bundling instead of preserving variable references.
|
|
1077
|
+
*
|
|
1078
|
+
* When enabled, constant values from imported modules will be inlined at their usage sites,
|
|
1079
|
+
* potentially reducing bundle size and improving runtime performance by eliminating variable lookups.
|
|
1080
|
+
*
|
|
1081
|
+
* **example**
|
|
1082
|
+
* ```js
|
|
1083
|
+
* // Input files:
|
|
1084
|
+
* // constants.js
|
|
1085
|
+
* export const API_URL = 'https://api.example.com';
|
|
1086
|
+
*
|
|
1087
|
+
* // main.js
|
|
1088
|
+
* import { API_URL } from './constants.js';
|
|
1089
|
+
* console.log(API_URL);
|
|
1090
|
+
*
|
|
1091
|
+
* // With inlineConst: true, the bundled output becomes:
|
|
1092
|
+
* console.log('https://api.example.com');
|
|
1093
|
+
*
|
|
1094
|
+
* // Instead of:
|
|
1095
|
+
* const API_URL = 'https://api.example.com';
|
|
1096
|
+
* console.log(API_URL);
|
|
1097
|
+
* ```
|
|
1098
|
+
*
|
|
1099
|
+
* @default false
|
|
1100
|
+
*/
|
|
1077
1101
|
inlineConst?: boolean;
|
|
1078
1102
|
};
|
|
1079
1103
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
@@ -1112,7 +1136,6 @@ interface InputOptions {
|
|
|
1112
1136
|
mainFiles?: string[];
|
|
1113
1137
|
modules?: string[];
|
|
1114
1138
|
symlinks?: boolean;
|
|
1115
|
-
tsconfigFilename?: string;
|
|
1116
1139
|
};
|
|
1117
1140
|
cwd?: string;
|
|
1118
1141
|
/**
|
|
@@ -1297,6 +1320,11 @@ interface InputOptions {
|
|
|
1297
1320
|
inject?: Record<string, string | [string, string]>;
|
|
1298
1321
|
profilerNames?: boolean;
|
|
1299
1322
|
/**
|
|
1323
|
+
* @deprecated Use {@link OxcTransformOption.jsx} instead.
|
|
1324
|
+
*
|
|
1325
|
+
* This top-level `jsx` option will be removed in a future release.
|
|
1326
|
+
* It is only kept for backward compatibility and will be mapped internally to `transform.jsx`.
|
|
1327
|
+
*
|
|
1300
1328
|
* - `false` disables the JSX parser, resulting in a syntax error if JSX syntax is used.
|
|
1301
1329
|
* - `"preserve"` disables the JSX transformer, preserving the original JSX syntax in the output.
|
|
1302
1330
|
* - `"react"` enables the `classic` JSX transformer.
|
|
@@ -1334,6 +1362,17 @@ interface InputOptions {
|
|
|
1334
1362
|
preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
|
|
1335
1363
|
optimization?: OptimizationOptions;
|
|
1336
1364
|
context?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Allows you to specify where to find the TypeScript configuration file.
|
|
1367
|
+
*
|
|
1368
|
+
* You may provide:
|
|
1369
|
+
* - a relative path to the configuration file. It will be resolved relative to cwd.
|
|
1370
|
+
* - an absolute path to the configuration file.
|
|
1371
|
+
*
|
|
1372
|
+
* When a tsconfig path is specified, the module resolver will respect `compilerOptions.paths` from the specified `tsconfig.json`,
|
|
1373
|
+
* and the tsconfig options will be merged with the top-level `transform` options, with the `transform` options taking precedence.
|
|
1374
|
+
*/
|
|
1375
|
+
tsconfig?: string;
|
|
1337
1376
|
}
|
|
1338
1377
|
//#endregion
|
|
1339
1378
|
//#region src/types/rolldown-options.d.ts
|
|
@@ -1352,4 +1391,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
|
1352
1391
|
declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
1353
1392
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1354
1393
|
//#endregion
|
|
1355
|
-
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions,
|
|
1394
|
+
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-9k0egz6L.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -150,7 +150,7 @@ interface PreRenderedAsset {
|
|
|
150
150
|
}
|
|
151
151
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
152
152
|
type GlobalsFunction = (name: string) => string;
|
|
153
|
-
type MinifyOptions =
|
|
153
|
+
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "sorucemap">;
|
|
154
154
|
interface ChunkingContext {
|
|
155
155
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
156
156
|
}
|
|
@@ -186,6 +186,16 @@ interface OutputOptions {
|
|
|
186
186
|
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
187
187
|
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
188
188
|
sanitizeFileName?: boolean | ((name: string) => string);
|
|
189
|
+
/**
|
|
190
|
+
* Control code minification.
|
|
191
|
+
*
|
|
192
|
+
* - `true`: Enable full minification including code compression and dead code elimination
|
|
193
|
+
* - `false`: Disable minification (default)
|
|
194
|
+
* - `'dce-only'`: Only perform dead code elimination without code compression
|
|
195
|
+
* - `MinifyOptions`: Fine-grained control over minification settings
|
|
196
|
+
*
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
189
199
|
minify?: boolean | "dce-only" | MinifyOptions;
|
|
190
200
|
name?: string;
|
|
191
201
|
globals?: Record<string, string> | GlobalsFunction;
|
|
@@ -574,7 +584,7 @@ interface NormalizedOutputOptions {
|
|
|
574
584
|
sourcemapDebugIds: boolean;
|
|
575
585
|
sourcemapIgnoreList: SourcemapIgnoreListOption;
|
|
576
586
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
577
|
-
minify: false |
|
|
587
|
+
minify: false | MinifyOptions | "dce-only";
|
|
578
588
|
legalComments: "none" | "inline";
|
|
579
589
|
polyfillRequire: boolean;
|
|
580
590
|
plugins: RolldownPlugin[];
|
|
@@ -806,30 +816,12 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
806
816
|
//#region src/index.d.ts
|
|
807
817
|
declare const VERSION: string;
|
|
808
818
|
//#endregion
|
|
809
|
-
//#region src/builtin-plugin/
|
|
819
|
+
//#region src/builtin-plugin/utils.d.ts
|
|
810
820
|
declare class BuiltinPlugin {
|
|
811
821
|
name: BindingBuiltinPluginName;
|
|
812
822
|
_options?: unknown;
|
|
813
823
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
814
824
|
}
|
|
815
|
-
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
816
|
-
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
817
|
-
include?: StringOrRegExp | StringOrRegExp[];
|
|
818
|
-
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
819
|
-
};
|
|
820
|
-
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
821
|
-
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
822
|
-
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
823
|
-
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
824
|
-
declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
|
|
825
|
-
declare function wasmFallbackPlugin(): BuiltinPlugin;
|
|
826
|
-
declare function loadFallbackPlugin(): BuiltinPlugin;
|
|
827
|
-
declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
|
|
828
|
-
declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
829
|
-
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
830
|
-
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
831
|
-
declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
|
|
832
|
-
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
833
825
|
//#endregion
|
|
834
826
|
//#region src/constants/plugin.d.ts
|
|
835
827
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
@@ -878,6 +870,7 @@ interface ModuleOptions {
|
|
|
878
870
|
moduleSideEffects: ModuleSideEffects;
|
|
879
871
|
meta: CustomPluginOptions;
|
|
880
872
|
invalidate?: boolean;
|
|
873
|
+
packageJsonPath?: string;
|
|
881
874
|
}
|
|
882
875
|
interface ResolvedId extends ModuleOptions {
|
|
883
876
|
external: boolean | "absolute";
|
|
@@ -1048,6 +1041,11 @@ interface ChecksOptions {
|
|
|
1048
1041
|
* @default true
|
|
1049
1042
|
*/
|
|
1050
1043
|
configurationFieldConflict?: boolean;
|
|
1044
|
+
/**
|
|
1045
|
+
* Whether to emit warning when detecting prefer builtin feature
|
|
1046
|
+
* @default true
|
|
1047
|
+
*/
|
|
1048
|
+
preferBuiltinFeature?: boolean;
|
|
1051
1049
|
}
|
|
1052
1050
|
//#endregion
|
|
1053
1051
|
//#region src/options/input-options.d.ts
|
|
@@ -1074,6 +1072,32 @@ type HmrOptions = boolean | {
|
|
|
1074
1072
|
implement?: string;
|
|
1075
1073
|
};
|
|
1076
1074
|
type OptimizationOptions = {
|
|
1075
|
+
/**
|
|
1076
|
+
* Inline imported constant values during bundling instead of preserving variable references.
|
|
1077
|
+
*
|
|
1078
|
+
* When enabled, constant values from imported modules will be inlined at their usage sites,
|
|
1079
|
+
* potentially reducing bundle size and improving runtime performance by eliminating variable lookups.
|
|
1080
|
+
*
|
|
1081
|
+
* **example**
|
|
1082
|
+
* ```js
|
|
1083
|
+
* // Input files:
|
|
1084
|
+
* // constants.js
|
|
1085
|
+
* export const API_URL = 'https://api.example.com';
|
|
1086
|
+
*
|
|
1087
|
+
* // main.js
|
|
1088
|
+
* import { API_URL } from './constants.js';
|
|
1089
|
+
* console.log(API_URL);
|
|
1090
|
+
*
|
|
1091
|
+
* // With inlineConst: true, the bundled output becomes:
|
|
1092
|
+
* console.log('https://api.example.com');
|
|
1093
|
+
*
|
|
1094
|
+
* // Instead of:
|
|
1095
|
+
* const API_URL = 'https://api.example.com';
|
|
1096
|
+
* console.log(API_URL);
|
|
1097
|
+
* ```
|
|
1098
|
+
*
|
|
1099
|
+
* @default false
|
|
1100
|
+
*/
|
|
1077
1101
|
inlineConst?: boolean;
|
|
1078
1102
|
};
|
|
1079
1103
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
@@ -1112,7 +1136,6 @@ interface InputOptions {
|
|
|
1112
1136
|
mainFiles?: string[];
|
|
1113
1137
|
modules?: string[];
|
|
1114
1138
|
symlinks?: boolean;
|
|
1115
|
-
tsconfigFilename?: string;
|
|
1116
1139
|
};
|
|
1117
1140
|
cwd?: string;
|
|
1118
1141
|
/**
|
|
@@ -1297,6 +1320,11 @@ interface InputOptions {
|
|
|
1297
1320
|
inject?: Record<string, string | [string, string]>;
|
|
1298
1321
|
profilerNames?: boolean;
|
|
1299
1322
|
/**
|
|
1323
|
+
* @deprecated Use {@link OxcTransformOption.jsx} instead.
|
|
1324
|
+
*
|
|
1325
|
+
* This top-level `jsx` option will be removed in a future release.
|
|
1326
|
+
* It is only kept for backward compatibility and will be mapped internally to `transform.jsx`.
|
|
1327
|
+
*
|
|
1300
1328
|
* - `false` disables the JSX parser, resulting in a syntax error if JSX syntax is used.
|
|
1301
1329
|
* - `"preserve"` disables the JSX transformer, preserving the original JSX syntax in the output.
|
|
1302
1330
|
* - `"react"` enables the `classic` JSX transformer.
|
|
@@ -1334,6 +1362,17 @@ interface InputOptions {
|
|
|
1334
1362
|
preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
|
|
1335
1363
|
optimization?: OptimizationOptions;
|
|
1336
1364
|
context?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Allows you to specify where to find the TypeScript configuration file.
|
|
1367
|
+
*
|
|
1368
|
+
* You may provide:
|
|
1369
|
+
* - a relative path to the configuration file. It will be resolved relative to cwd.
|
|
1370
|
+
* - an absolute path to the configuration file.
|
|
1371
|
+
*
|
|
1372
|
+
* When a tsconfig path is specified, the module resolver will respect `compilerOptions.paths` from the specified `tsconfig.json`,
|
|
1373
|
+
* and the tsconfig options will be merged with the top-level `transform` options, with the `transform` options taking precedence.
|
|
1374
|
+
*/
|
|
1375
|
+
tsconfig?: string;
|
|
1337
1376
|
}
|
|
1338
1377
|
//#endregion
|
|
1339
1378
|
//#region src/types/rolldown-options.d.ts
|
|
@@ -1352,4 +1391,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
|
1352
1391
|
declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
1353
1392
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1354
1393
|
//#endregion
|
|
1355
|
-
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions,
|
|
1394
|
+
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-McCMqGpa.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.82.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.3/node_modules/oxc-parser/wrap.mjs
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|
|
@@ -187,7 +187,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.82.
|
|
190
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.3/node_modules/oxc-parser/wrap.mjs
|
|
191
191
|
function wrap$1(result) {
|
|
192
192
|
let program, module$1, comments, errors;
|
|
193
193
|
return {
|