@rolldown/browser 1.0.0-beta.9-commit.8371a90 → 1.0.0-beta.9-commit.b174110
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 +10 -10
- package/dist/cli.mjs +2 -2
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +1 -1
- package/dist/experimental-index.d.mts +1 -1
- package/dist/experimental-index.mjs +1 -1
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -5
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{define-config.d-D11P5huJ.d.cts → define-config.d-D4lKXE9V.d.cts} +23 -33
- package/dist/shared/{define-config.d-Sf3K9yNa.d.mts → define-config.d-Dm9iNdt9.d.mts} +23 -33
- package/dist/shared/{load-config--4dZSqAQ.mjs → load-config-CV_7wWhH.mjs} +1 -1
- package/dist/shared/{load-config-CT3T7nfY.cjs → load-config-DegJq4hI.cjs} +1 -1
- package/dist/shared/{src-HTcyNJiS.cjs → src-BDUsoOnL.cjs} +28 -47
- package/dist/shared/{src-CXLmg0t5.mjs → src-CJu4NZI4.mjs} +329 -1505
- package/dist/{src-CB1SRiRS.js → src-CBsKC-xF.js} +29 -48
- package/package.json +1 -1
|
@@ -121,7 +121,7 @@ type NullValue<T = void> = T | undefined | null | void;
|
|
|
121
121
|
type PartialNull<T> = { [P in keyof T] : T[P] | null };
|
|
122
122
|
type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
123
123
|
type MaybeArray<T> = T | T[];
|
|
124
|
-
type StringOrRegExp
|
|
124
|
+
type StringOrRegExp = string | RegExp;
|
|
125
125
|
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/options/output-options.d.ts
|
|
@@ -226,7 +226,7 @@ interface OutputOptions {
|
|
|
226
226
|
* If `test` is a regular expression, the module whose id matches the regular expression will be captured.
|
|
227
227
|
* if `test` is empty, any module will be considered as matched.
|
|
228
228
|
*/
|
|
229
|
-
test?: StringOrRegExp
|
|
229
|
+
test?: StringOrRegExp
|
|
230
230
|
/**
|
|
231
231
|
* - Type: `number`
|
|
232
232
|
*
|
|
@@ -281,7 +281,6 @@ interface OutputOptions {
|
|
|
281
281
|
legalComments?: "none" | "inline";
|
|
282
282
|
plugins?: RolldownOutputPluginOption;
|
|
283
283
|
polyfillRequire?: boolean;
|
|
284
|
-
target?: string | string[];
|
|
285
284
|
hoistTransitiveImports?: false;
|
|
286
285
|
preserveModules?: boolean;
|
|
287
286
|
virtualDirname?: string;
|
|
@@ -430,7 +429,7 @@ interface NormalizedOutputOptions {
|
|
|
430
429
|
|
|
431
430
|
//#endregion
|
|
432
431
|
//#region ../pluginutils/dist/index.d.ts
|
|
433
|
-
type StringOrRegExp = string | RegExp;
|
|
432
|
+
type StringOrRegExp$1 = string | RegExp;
|
|
434
433
|
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
435
434
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Query;
|
|
436
435
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
@@ -450,16 +449,16 @@ declare class Not {
|
|
|
450
449
|
constructor(expr: FilterExpression);
|
|
451
450
|
}
|
|
452
451
|
interface QueryFilterObject {
|
|
453
|
-
[key: string]: StringOrRegExp | boolean;
|
|
452
|
+
[key: string]: StringOrRegExp$1 | boolean;
|
|
454
453
|
}
|
|
455
454
|
interface IdParams {
|
|
456
455
|
cleanUrl?: boolean;
|
|
457
456
|
}
|
|
458
457
|
declare class Id {
|
|
459
458
|
kind: "id";
|
|
460
|
-
pattern: StringOrRegExp;
|
|
459
|
+
pattern: StringOrRegExp$1;
|
|
461
460
|
params: IdParams;
|
|
462
|
-
constructor(pattern: StringOrRegExp, params?: IdParams);
|
|
461
|
+
constructor(pattern: StringOrRegExp$1, params?: IdParams);
|
|
463
462
|
}
|
|
464
463
|
declare class ModuleType$1 {
|
|
465
464
|
kind: "moduleType";
|
|
@@ -468,14 +467,14 @@ declare class ModuleType$1 {
|
|
|
468
467
|
}
|
|
469
468
|
declare class Code {
|
|
470
469
|
kind: "code";
|
|
471
|
-
pattern: StringOrRegExp;
|
|
472
|
-
constructor(expr: StringOrRegExp);
|
|
470
|
+
pattern: StringOrRegExp$1;
|
|
471
|
+
constructor(expr: StringOrRegExp$1);
|
|
473
472
|
}
|
|
474
473
|
declare class Query {
|
|
475
474
|
kind: "query";
|
|
476
475
|
key: string;
|
|
477
|
-
pattern: StringOrRegExp | boolean;
|
|
478
|
-
constructor(key: string, pattern: StringOrRegExp | boolean);
|
|
476
|
+
pattern: StringOrRegExp$1 | boolean;
|
|
477
|
+
constructor(key: string, pattern: StringOrRegExp$1 | boolean);
|
|
479
478
|
}
|
|
480
479
|
declare class Include {
|
|
481
480
|
kind: "include";
|
|
@@ -490,10 +489,10 @@ declare class Exclude$1 {
|
|
|
490
489
|
declare function and(...args: FilterExpression[]): And;
|
|
491
490
|
declare function or(...args: FilterExpression[]): Or;
|
|
492
491
|
declare function not(expr: FilterExpression): Not;
|
|
493
|
-
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
|
|
492
|
+
declare function id(pattern: StringOrRegExp$1, params?: IdParams): Id;
|
|
494
493
|
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
495
|
-
declare function code(pattern: StringOrRegExp): Code;
|
|
496
|
-
declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
|
|
494
|
+
declare function code(pattern: StringOrRegExp$1): Code;
|
|
495
|
+
declare function query(key: string, pattern: StringOrRegExp$1 | boolean): Query;
|
|
497
496
|
declare function include(expr: FilterExpression): Include;
|
|
498
497
|
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
499
498
|
/**
|
|
@@ -516,7 +515,7 @@ declare function queries(queryFilter: QueryFilterObject): And;
|
|
|
516
515
|
|
|
517
516
|
//#endregion
|
|
518
517
|
//#region src/plugin/hook-filter.d.ts
|
|
519
|
-
type GeneralHookFilter<Value = StringOrRegExp
|
|
518
|
+
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
520
519
|
include?: MaybeArray<Value>
|
|
521
520
|
exclude?: MaybeArray<Value>
|
|
522
521
|
};
|
|
@@ -785,7 +784,7 @@ type OverrideFilterObject = {
|
|
|
785
784
|
transform?: HookFilterExtension<"transform">["filter"]
|
|
786
785
|
resolveId?: HookFilterExtension<"resolveId">["filter"]
|
|
787
786
|
load?: HookFilterExtension<"load">["filter"]
|
|
788
|
-
pluginNamePattern?: StringOrRegExp
|
|
787
|
+
pluginNamePattern?: StringOrRegExp[]
|
|
789
788
|
};
|
|
790
789
|
declare function withFilter<
|
|
791
790
|
A,
|
|
@@ -821,7 +820,7 @@ interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
|
821
820
|
interface ResolveIdExtraOptions {
|
|
822
821
|
custom?: CustomPluginOptions;
|
|
823
822
|
isEntry: boolean;
|
|
824
|
-
kind: "
|
|
823
|
+
kind: BindingHookResolveIdExtraArgs["kind"];
|
|
825
824
|
}
|
|
826
825
|
type ResolveIdResult = string | NullValue | false | PartialResolvedId;
|
|
827
826
|
type LoadResult = NullValue | string | SourceDescription;
|
|
@@ -978,18 +977,9 @@ interface ChecksOptions {
|
|
|
978
977
|
//#endregion
|
|
979
978
|
//#region src/options/input-options.d.ts
|
|
980
979
|
type InputOption = string | string[] | Record<string, string>;
|
|
981
|
-
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "
|
|
982
|
-
type ExternalOption = StringOrRegExp
|
|
980
|
+
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject">;
|
|
981
|
+
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
983
982
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
984
|
-
interface JsxOptions {
|
|
985
|
-
mode?: "classic" | "automatic" | "preserve";
|
|
986
|
-
factory?: string;
|
|
987
|
-
fragment?: string;
|
|
988
|
-
importSource?: string;
|
|
989
|
-
jsxImportSource?: string;
|
|
990
|
-
refresh?: boolean;
|
|
991
|
-
development?: boolean;
|
|
992
|
-
}
|
|
993
983
|
interface WatcherOptions {
|
|
994
984
|
skipWrite?: boolean;
|
|
995
985
|
buildDelay?: number;
|
|
@@ -997,8 +987,8 @@ interface WatcherOptions {
|
|
|
997
987
|
pollInterval?: number
|
|
998
988
|
compareContents?: boolean
|
|
999
989
|
};
|
|
1000
|
-
include?: StringOrRegExp
|
|
1001
|
-
exclude?: StringOrRegExp
|
|
990
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
991
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
1002
992
|
}
|
|
1003
993
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
1004
994
|
type HmrOptions = boolean | {
|
|
@@ -1135,9 +1125,9 @@ interface InputOptions {
|
|
|
1135
1125
|
* - `"react"` enables the `classic` JSX transformer.
|
|
1136
1126
|
* - `"react-jsx"` enables the `automatic` JSX transformer.
|
|
1137
1127
|
*
|
|
1138
|
-
* @default
|
|
1128
|
+
* @default runtime = "automatic"
|
|
1139
1129
|
*/
|
|
1140
|
-
jsx?: false | "react" | "react-jsx" | "preserve"
|
|
1130
|
+
jsx?: false | "react" | "react-jsx" | "preserve";
|
|
1141
1131
|
transform?: OxcTransformOption;
|
|
1142
1132
|
watch?: WatcherOptions | false;
|
|
1143
1133
|
dropLabels?: string[];
|
|
@@ -1172,4 +1162,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1172
1162
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1173
1163
|
|
|
1174
1164
|
//#endregion
|
|
1175
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
1165
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, 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, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION as VERSION$1, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, assetPlugin as assetPlugin$1, build as build$1, buildImportAnalysisPlugin as buildImportAnalysisPlugin$1, code, defineConfig as defineConfig$1, defineParallelPlugin, dynamicImportVarsPlugin as dynamicImportVarsPlugin$1, exclude, id, importGlobPlugin as importGlobPlugin$1, include, isolatedDeclarationPlugin as isolatedDeclarationPlugin$1, jsonPlugin as jsonPlugin$1, loadFallbackPlugin as loadFallbackPlugin$1, manifestPlugin as manifestPlugin$1, moduleFederationPlugin as moduleFederationPlugin$1, modulePreloadPolyfillPlugin as modulePreloadPolyfillPlugin$1, moduleType, not, or, queries, query, reporterPlugin as reporterPlugin$1, rolldown as rolldown$1, viteResolvePlugin as viteResolvePlugin$1, wasmFallbackPlugin as wasmFallbackPlugin$1, wasmHelperPlugin as wasmHelperPlugin$1, watch as watch$1, webWorkerPostPlugin as webWorkerPostPlugin$1, withFilter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { init_rolldown, rolldown } from "./src-
|
|
2
|
+
import { init_rolldown, rolldown } from "./src-CJu4NZI4.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { cwd } from "node:process";
|
|
@@ -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-BDUsoOnL.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_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.9-commit.
|
|
12
|
+
var version = "1.0.0-beta.9-commit.b174110";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -1796,17 +1796,13 @@ const ModuleTypesSchema = record(string(), union([
|
|
|
1796
1796
|
literal("tsx")
|
|
1797
1797
|
]));
|
|
1798
1798
|
const JsxOptionsSchema = strictObject({
|
|
1799
|
+
runtime: pipe(optional(union([literal("classic"), literal("automatic")])), description("Which runtime to use")),
|
|
1799
1800
|
development: pipe(optional(boolean()), description("Development specific information")),
|
|
1800
|
-
|
|
1801
|
-
fragment: pipe(optional(string()), description("Jsx fragment transformation")),
|
|
1801
|
+
throwIfNamespace: pipe(optional(string()), description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
1802
1802
|
importSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is classic")),
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
literal("automatic"),
|
|
1807
|
-
literal("preserve")
|
|
1808
|
-
])), description("Jsx transformation mode")),
|
|
1809
|
-
refresh: pipe(optional(boolean()), description("React refresh transformation"))
|
|
1803
|
+
pragma: pipe(optional(string()), description("Jsx element transformation")),
|
|
1804
|
+
pragmaFlag: pipe(optional(string()), description("Jsx fragment transformation")),
|
|
1805
|
+
refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
|
|
1810
1806
|
});
|
|
1811
1807
|
const HelperModeSchema = union([literal("Runtime"), literal("External")]);
|
|
1812
1808
|
const DecoratorOptionSchema = object({
|
|
@@ -1842,7 +1838,9 @@ const TransformOptionsSchema = object({
|
|
|
1842
1838
|
assumptions: optional(AssumptionsSchema),
|
|
1843
1839
|
typescript: optional(TypescriptSchema),
|
|
1844
1840
|
helpers: optional(HelpersSchema),
|
|
1845
|
-
decorators: optional(DecoratorOptionSchema)
|
|
1841
|
+
decorators: optional(DecoratorOptionSchema),
|
|
1842
|
+
jsx: optional(JsxOptionsSchema),
|
|
1843
|
+
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment"))
|
|
1846
1844
|
});
|
|
1847
1845
|
const WatchOptionsSchema = strictObject({
|
|
1848
1846
|
chokidar: optional(never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
|
|
@@ -1930,13 +1928,12 @@ const InputOptionsSchema = strictObject({
|
|
|
1930
1928
|
define: pipe(optional(record(string(), string())), description("Define global variables")),
|
|
1931
1929
|
inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
|
|
1932
1930
|
profilerNames: optional(boolean()),
|
|
1933
|
-
jsx: optional(union([
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
])),
|
|
1931
|
+
jsx: pipe(optional(union([
|
|
1932
|
+
literal(false),
|
|
1933
|
+
literal("react"),
|
|
1934
|
+
literal("react-jsx"),
|
|
1935
|
+
literal("preserve")
|
|
1936
|
+
])), description("Jsx options preset")),
|
|
1940
1937
|
transform: optional(TransformOptionsSchema),
|
|
1941
1938
|
watch: optional(union([WatchOptionsSchema, literal(false)])),
|
|
1942
1939
|
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
|
|
@@ -1948,8 +1945,7 @@ const InputCliOverrideSchema = strictObject({
|
|
|
1948
1945
|
input: pipe(optional(array(string())), description("Entry file")),
|
|
1949
1946
|
external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
1950
1947
|
inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
|
|
1951
|
-
treeshake: pipe(optional(boolean()), description("enable treeshaking"))
|
|
1952
|
-
jsx: pipe(optional(JsxOptionsSchema), description("enable jsx"))
|
|
1948
|
+
treeshake: pipe(optional(boolean()), description("enable treeshaking"))
|
|
1953
1949
|
});
|
|
1954
1950
|
const InputCliOptionsSchema = omit(strictObject({
|
|
1955
1951
|
...InputOptionsSchema.entries,
|
|
@@ -2043,7 +2039,6 @@ const OutputOptionsSchema = strictObject({
|
|
|
2043
2039
|
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
|
|
2044
2040
|
plugins: optional(custom(() => true)),
|
|
2045
2041
|
polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
|
|
2046
|
-
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
2047
2042
|
hoistTransitiveImports: optional(custom((input) => {
|
|
2048
2043
|
if (input) return false;
|
|
2049
2044
|
return true;
|
|
@@ -2166,7 +2161,7 @@ var NormalizedInputOptionsImpl = class {
|
|
|
2166
2161
|
|
|
2167
2162
|
//#endregion
|
|
2168
2163
|
//#region src/types/sourcemap.ts
|
|
2169
|
-
function bindingifySourcemap
|
|
2164
|
+
function bindingifySourcemap(map) {
|
|
2170
2165
|
if (map == null) return;
|
|
2171
2166
|
return { inner: typeof map === "string" ? map : {
|
|
2172
2167
|
file: map.file ?? void 0,
|
|
@@ -2710,7 +2705,7 @@ function bindingifyTransform(args$1) {
|
|
|
2710
2705
|
});
|
|
2711
2706
|
return {
|
|
2712
2707
|
code: ret.code,
|
|
2713
|
-
map: bindingifySourcemap
|
|
2708
|
+
map: bindingifySourcemap(normalizeTransformHookSourcemap(id$1, code$1, ret.map)),
|
|
2714
2709
|
sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects),
|
|
2715
2710
|
moduleType: ret.moduleType
|
|
2716
2711
|
};
|
|
@@ -2736,7 +2731,7 @@ function bindingifyLoad(args$1) {
|
|
|
2736
2731
|
let map = preProcessSourceMap(ret, id$1);
|
|
2737
2732
|
return {
|
|
2738
2733
|
code: ret.code,
|
|
2739
|
-
map: bindingifySourcemap
|
|
2734
|
+
map: bindingifySourcemap(map),
|
|
2740
2735
|
moduleType: ret.moduleType,
|
|
2741
2736
|
sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects)
|
|
2742
2737
|
};
|
|
@@ -2842,7 +2837,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2842
2837
|
format: bindingifyFormat(format),
|
|
2843
2838
|
exports: exports$1,
|
|
2844
2839
|
hashCharacters,
|
|
2845
|
-
sourcemap: bindingifySourcemap(sourcemap),
|
|
2840
|
+
sourcemap: bindingifySourcemap$1(sourcemap),
|
|
2846
2841
|
sourcemapDebugIds,
|
|
2847
2842
|
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
2848
2843
|
sourcemapPathTransform,
|
|
@@ -2865,7 +2860,6 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2865
2860
|
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
2866
2861
|
advancedChunks: outputOptions.advancedChunks,
|
|
2867
2862
|
polyfillRequire: outputOptions.polyfillRequire,
|
|
2868
|
-
target: outputOptions.target,
|
|
2869
2863
|
sanitizeFileName,
|
|
2870
2864
|
preserveModules,
|
|
2871
2865
|
virtualDirname,
|
|
@@ -2893,7 +2887,7 @@ function bindingifyFormat(format) {
|
|
|
2893
2887
|
default: require_dist.unimplemented(`output.format: ${format}`);
|
|
2894
2888
|
}
|
|
2895
2889
|
}
|
|
2896
|
-
function bindingifySourcemap(sourcemap) {
|
|
2890
|
+
function bindingifySourcemap$1(sourcemap) {
|
|
2897
2891
|
switch (sourcemap) {
|
|
2898
2892
|
case true: return "file";
|
|
2899
2893
|
case "inline": return "inline";
|
|
@@ -3159,7 +3153,7 @@ function collectChangedBundle(changed, bundle) {
|
|
|
3159
3153
|
facadeModuleId: item.facadeModuleId || void 0,
|
|
3160
3154
|
isDynamicEntry: item.isDynamicEntry,
|
|
3161
3155
|
moduleIds: item.moduleIds,
|
|
3162
|
-
map: bindingifySourcemap
|
|
3156
|
+
map: bindingifySourcemap(item.map),
|
|
3163
3157
|
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
3164
3158
|
preliminaryFilename: item.preliminaryFileName
|
|
3165
3159
|
});
|
|
@@ -3197,7 +3191,7 @@ function bindingifyRenderChunk(args$1) {
|
|
|
3197
3191
|
if (!ret.map) return { code: ret.code };
|
|
3198
3192
|
return {
|
|
3199
3193
|
code: ret.code,
|
|
3200
|
-
map: bindingifySourcemap
|
|
3194
|
+
map: bindingifySourcemap(ret.map)
|
|
3201
3195
|
};
|
|
3202
3196
|
},
|
|
3203
3197
|
meta: bindingifyPluginHookMeta(meta),
|
|
@@ -3763,25 +3757,12 @@ function bindingifyInput(input) {
|
|
|
3763
3757
|
}
|
|
3764
3758
|
function bindingifyJsx(input) {
|
|
3765
3759
|
switch (input) {
|
|
3766
|
-
case false: return
|
|
3767
|
-
case "react": return
|
|
3768
|
-
case "react-jsx": return
|
|
3769
|
-
case "preserve": return
|
|
3770
|
-
|
|
3760
|
+
case false: return src_rolldown_binding_wasi_cjs.BindingJsx.Disable;
|
|
3761
|
+
case "react": return src_rolldown_binding_wasi_cjs.BindingJsx.React;
|
|
3762
|
+
case "react-jsx": return src_rolldown_binding_wasi_cjs.BindingJsx.ReactJsx;
|
|
3763
|
+
case "preserve": return src_rolldown_binding_wasi_cjs.BindingJsx.Preserve;
|
|
3764
|
+
default: return void 0;
|
|
3771
3765
|
}
|
|
3772
|
-
if (input.mode === "preserve") return { type: "Preserve" };
|
|
3773
|
-
const mode = input.mode ?? "automatic";
|
|
3774
|
-
return {
|
|
3775
|
-
type: "Enable",
|
|
3776
|
-
field0: {
|
|
3777
|
-
runtime: mode,
|
|
3778
|
-
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0,
|
|
3779
|
-
pragma: input.factory,
|
|
3780
|
-
pragmaFrag: input.fragment,
|
|
3781
|
-
development: input.development,
|
|
3782
|
-
refresh: input.refresh
|
|
3783
|
-
}
|
|
3784
|
-
};
|
|
3785
3766
|
}
|
|
3786
3767
|
function bindingifyWatch(watch$1) {
|
|
3787
3768
|
if (watch$1) return {
|