@rolldown/browser 1.0.0-rc.8 → 1.0.0
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.mjs +225 -74
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -7
- package/dist/{constructors-BgL_dmUe.js → constructors-BXVEHwHm.js} +8 -2
- package/dist/{error-DkAP_6fk.js → error-DMfKBGWU.js} +1 -1
- package/dist/experimental-index.browser.mjs +10 -10
- package/dist/experimental-index.d.mts +17 -19
- package/dist/experimental-index.mjs +11 -11
- package/dist/experimental-runtime-types.d.ts +14 -5
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.browser.mjs +5 -5
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +5 -9
- package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
- package/dist/parallel-plugin-worker.mjs +1 -4
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -2
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-eqfrsvjc.js} +28 -5
- package/dist/rolldown-binding.wasi-browser.js +6 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-Clh1p2eh.js → rolldown-build-CKS7EawU.js} +221 -199
- package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
- package/dist/shared/{bindingify-input-options-CxjTlvCV.mjs → bindingify-input-options-CboGFdC4.mjs} +132 -56
- package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
- package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-DO36gIcC.mjs} +8 -2
- package/dist/shared/{define-config-TEoV5q6D.d.mts → define-config-Bah0mfyR.d.mts} +88 -26
- package/dist/shared/{load-config-Cs9h9aXF.mjs → load-config-BwBgui4p.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
- package/dist/shared/{parse-DDUnGYGU.mjs → parse-Lc1YQk0q.mjs} +1 -1
- package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
- package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
- package/dist/shared/{rolldown-D2p2QuF1.mjs → rolldown-WowDTCZP.mjs} +1 -1
- package/dist/shared/{rolldown-build-D_FXM8pA.mjs → rolldown-build-DIb-iqkO.mjs} +92 -146
- package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
- package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
- package/dist/shared/{watch-BMFUc4Au.mjs → watch-B81_EvN-.mjs} +2 -2
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +4 -4
- package/dist/utils-index.mjs +5 -6
- package/dist/wasi-worker-browser.mjs +8 -0
- package/package.json +4 -2
- package/dist/shared/types-Cx3HYorz.d.mts +0 -1302
package/dist/shared/{bindingify-input-options-CxjTlvCV.mjs → bindingify-input-options-CboGFdC4.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-D80CXhvg.mjs";
|
|
2
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Dq6w-2tU.mjs";
|
|
3
3
|
import { _ as noop, a as id, b as unsupported, f as or, h as arraify, n as code, r as exclude, s as include, t as and, u as moduleType, y as unreachable } from "./composable-filters-B2ByPP8y.mjs";
|
|
4
4
|
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-CQ6njWsV.mjs";
|
|
5
5
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
@@ -7,7 +7,7 @@ import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, Bin
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.0.0
|
|
10
|
+
var version = "1.0.0";
|
|
11
11
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/constants/version.ts
|
|
@@ -72,6 +72,8 @@ function normalizeHook(hook) {
|
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/plugin/minimal-plugin-context.ts
|
|
74
74
|
var MinimalPluginContextImpl = class {
|
|
75
|
+
pluginName;
|
|
76
|
+
hookName;
|
|
75
77
|
info;
|
|
76
78
|
warn;
|
|
77
79
|
debug;
|
|
@@ -216,7 +218,7 @@ function bindingAssetSource(source) {
|
|
|
216
218
|
return { inner: source };
|
|
217
219
|
}
|
|
218
220
|
//#endregion
|
|
219
|
-
//#region \0@oxc-project+runtime@0.
|
|
221
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
|
|
220
222
|
function __decorate(decorators, target, key, desc) {
|
|
221
223
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
222
224
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -226,6 +228,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
226
228
|
//#endregion
|
|
227
229
|
//#region src/types/output-asset-impl.ts
|
|
228
230
|
var OutputAssetImpl = class extends PlainObjectLike {
|
|
231
|
+
bindingAsset;
|
|
229
232
|
type = "asset";
|
|
230
233
|
constructor(bindingAsset) {
|
|
231
234
|
super();
|
|
@@ -329,6 +332,7 @@ function transformChunkModules(modules) {
|
|
|
329
332
|
//#endregion
|
|
330
333
|
//#region src/types/output-chunk-impl.ts
|
|
331
334
|
var OutputChunkImpl = class extends PlainObjectLike {
|
|
335
|
+
bindingChunk;
|
|
332
336
|
type = "chunk";
|
|
333
337
|
constructor(bindingChunk) {
|
|
334
338
|
super();
|
|
@@ -559,6 +563,80 @@ function collectChangedBundle(changed, bundle) {
|
|
|
559
563
|
};
|
|
560
564
|
}
|
|
561
565
|
//#endregion
|
|
566
|
+
//#region src/binding-magic-string.ts
|
|
567
|
+
Object.defineProperty(BindingMagicString.prototype, "isRolldownMagicString", {
|
|
568
|
+
value: true,
|
|
569
|
+
writable: false,
|
|
570
|
+
configurable: false
|
|
571
|
+
});
|
|
572
|
+
function assertString(content, msg) {
|
|
573
|
+
if (typeof content !== "string") throw new TypeError(msg);
|
|
574
|
+
}
|
|
575
|
+
const nativeAppend = BindingMagicString.prototype.append;
|
|
576
|
+
const nativePrepend = BindingMagicString.prototype.prepend;
|
|
577
|
+
const nativeAppendLeft = BindingMagicString.prototype.appendLeft;
|
|
578
|
+
const nativeAppendRight = BindingMagicString.prototype.appendRight;
|
|
579
|
+
const nativePrependLeft = BindingMagicString.prototype.prependLeft;
|
|
580
|
+
const nativePrependRight = BindingMagicString.prototype.prependRight;
|
|
581
|
+
const nativeOverwrite = BindingMagicString.prototype.overwrite;
|
|
582
|
+
const nativeUpdate = BindingMagicString.prototype.update;
|
|
583
|
+
BindingMagicString.prototype.append = function(content) {
|
|
584
|
+
assertString(content, "outro content must be a string");
|
|
585
|
+
return nativeAppend.call(this, content);
|
|
586
|
+
};
|
|
587
|
+
BindingMagicString.prototype.prepend = function(content) {
|
|
588
|
+
assertString(content, "outro content must be a string");
|
|
589
|
+
return nativePrepend.call(this, content);
|
|
590
|
+
};
|
|
591
|
+
BindingMagicString.prototype.appendLeft = function(index, content) {
|
|
592
|
+
assertString(content, "inserted content must be a string");
|
|
593
|
+
return nativeAppendLeft.call(this, index, content);
|
|
594
|
+
};
|
|
595
|
+
BindingMagicString.prototype.appendRight = function(index, content) {
|
|
596
|
+
assertString(content, "inserted content must be a string");
|
|
597
|
+
return nativeAppendRight.call(this, index, content);
|
|
598
|
+
};
|
|
599
|
+
BindingMagicString.prototype.prependLeft = function(index, content) {
|
|
600
|
+
assertString(content, "inserted content must be a string");
|
|
601
|
+
return nativePrependLeft.call(this, index, content);
|
|
602
|
+
};
|
|
603
|
+
BindingMagicString.prototype.prependRight = function(index, content) {
|
|
604
|
+
assertString(content, "inserted content must be a string");
|
|
605
|
+
return nativePrependRight.call(this, index, content);
|
|
606
|
+
};
|
|
607
|
+
BindingMagicString.prototype.overwrite = function(start, end, content, options) {
|
|
608
|
+
assertString(content, "replacement content must be a string");
|
|
609
|
+
return nativeOverwrite.call(this, start, end, content, options);
|
|
610
|
+
};
|
|
611
|
+
BindingMagicString.prototype.update = function(start, end, content, options) {
|
|
612
|
+
assertString(content, "replacement content must be a string");
|
|
613
|
+
return nativeUpdate.call(this, start, end, content, options);
|
|
614
|
+
};
|
|
615
|
+
const nativeReplace = BindingMagicString.prototype.replace;
|
|
616
|
+
const nativeReplaceAll = BindingMagicString.prototype.replaceAll;
|
|
617
|
+
BindingMagicString.prototype.replace = function(searchValue, replacement) {
|
|
618
|
+
if (typeof searchValue === "string") return nativeReplace.call(this, searchValue, replacement);
|
|
619
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
620
|
+
const lastMatchEnd = this.replaceRegex(searchValue, replacement);
|
|
621
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
622
|
+
else if (searchValue.sticky) searchValue.lastIndex = lastMatchEnd === -1 ? 0 : lastMatchEnd;
|
|
623
|
+
return this;
|
|
624
|
+
};
|
|
625
|
+
BindingMagicString.prototype.replaceAll = function(searchValue, replacement) {
|
|
626
|
+
if (typeof searchValue === "string") return nativeReplaceAll.call(this, searchValue, replacement);
|
|
627
|
+
if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
|
|
628
|
+
searchValue.lastIndex = 0;
|
|
629
|
+
this.replaceRegex(searchValue, replacement);
|
|
630
|
+
searchValue.lastIndex = 0;
|
|
631
|
+
return this;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* A native MagicString implementation powered by Rust.
|
|
635
|
+
*
|
|
636
|
+
* @experimental
|
|
637
|
+
*/
|
|
638
|
+
const RolldownMagicString = BindingMagicString;
|
|
639
|
+
//#endregion
|
|
562
640
|
//#region src/utils/transform-module-info.ts
|
|
563
641
|
function transformModuleInfo(info, option) {
|
|
564
642
|
return {
|
|
@@ -594,7 +672,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
594
672
|
return map;
|
|
595
673
|
}
|
|
596
674
|
//#endregion
|
|
597
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
675
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
598
676
|
function e(e, t, n) {
|
|
599
677
|
let r = (n) => e(n, ...t);
|
|
600
678
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -603,7 +681,7 @@ function e(e, t, n) {
|
|
|
603
681
|
});
|
|
604
682
|
}
|
|
605
683
|
//#endregion
|
|
606
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
684
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/purry.js
|
|
607
685
|
function t$1(t, n, r) {
|
|
608
686
|
let i = t.length - n.length;
|
|
609
687
|
if (i === 0) return t(...n);
|
|
@@ -611,7 +689,7 @@ function t$1(t, n, r) {
|
|
|
611
689
|
throw Error(`Wrong number of arguments`);
|
|
612
690
|
}
|
|
613
691
|
//#endregion
|
|
614
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
692
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/partition.js
|
|
615
693
|
function t(...t) {
|
|
616
694
|
return t$1(n, t);
|
|
617
695
|
}
|
|
@@ -815,6 +893,11 @@ const fsModule = {
|
|
|
815
893
|
//#endregion
|
|
816
894
|
//#region src/plugin/plugin-context.ts
|
|
817
895
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
896
|
+
outputOptions;
|
|
897
|
+
context;
|
|
898
|
+
data;
|
|
899
|
+
onLog;
|
|
900
|
+
currentLoadingModule;
|
|
818
901
|
fs = fsModule;
|
|
819
902
|
getModuleInfo;
|
|
820
903
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
@@ -922,6 +1005,7 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
922
1005
|
//#endregion
|
|
923
1006
|
//#region src/plugin/load-plugin-context.ts
|
|
924
1007
|
var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
1008
|
+
inner;
|
|
925
1009
|
constructor(outputOptions, context, plugin, data, inner, moduleId, onLog, logLevelOption, watchMode) {
|
|
926
1010
|
super(outputOptions, context, plugin, data, onLog, logLevelOption, watchMode, moduleId);
|
|
927
1011
|
this.inner = inner;
|
|
@@ -933,6 +1017,9 @@ var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
|
933
1017
|
//#endregion
|
|
934
1018
|
//#region src/plugin/transform-plugin-context.ts
|
|
935
1019
|
var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
1020
|
+
inner;
|
|
1021
|
+
moduleId;
|
|
1022
|
+
moduleSource;
|
|
936
1023
|
constructor(outputOptions, context, plugin, data, inner, moduleId, moduleSource, onLog, LogLevelOption, watchMode) {
|
|
937
1024
|
super(outputOptions, context, plugin, data, onLog, LogLevelOption, watchMode, moduleId);
|
|
938
1025
|
this.inner = inner;
|
|
@@ -1070,7 +1157,7 @@ function bindingifyTransform(args) {
|
|
|
1070
1157
|
Object.defineProperties(meta, {
|
|
1071
1158
|
magicString: { get() {
|
|
1072
1159
|
if (magicStringInstance) return magicStringInstance;
|
|
1073
|
-
magicStringInstance = new
|
|
1160
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1074
1161
|
return magicStringInstance;
|
|
1075
1162
|
} },
|
|
1076
1163
|
ast: { get() {
|
|
@@ -1104,7 +1191,7 @@ function bindingifyTransform(args) {
|
|
|
1104
1191
|
let normalizedCode = void 0;
|
|
1105
1192
|
let map = ret.map;
|
|
1106
1193
|
if (typeof ret.code === "string") normalizedCode = ret.code;
|
|
1107
|
-
else if (ret.code instanceof
|
|
1194
|
+
else if (ret.code instanceof RolldownMagicString) {
|
|
1108
1195
|
let magicString = ret.code;
|
|
1109
1196
|
normalizedCode = magicString.toString();
|
|
1110
1197
|
let fallbackSourcemap = ctx.sendMagicString(magicString);
|
|
@@ -1193,14 +1280,14 @@ function bindingifyRenderChunk(args) {
|
|
|
1193
1280
|
if (args.options.experimental?.nativeMagicString) Object.defineProperty(renderChunkMeta, "magicString", {
|
|
1194
1281
|
get() {
|
|
1195
1282
|
if (magicStringInstance) return magicStringInstance;
|
|
1196
|
-
magicStringInstance = new
|
|
1283
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1197
1284
|
return magicStringInstance;
|
|
1198
1285
|
},
|
|
1199
1286
|
configurable: true
|
|
1200
1287
|
});
|
|
1201
1288
|
const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), code, transformRenderedChunk(chunk), args.pluginContextData.getOutputOptions(opts), renderChunkMeta);
|
|
1202
1289
|
if (ret == null) return;
|
|
1203
|
-
if (ret instanceof
|
|
1290
|
+
if (ret instanceof RolldownMagicString) {
|
|
1204
1291
|
const normalizedCode = ret.toString();
|
|
1205
1292
|
const generatedMap = ret.generateMap();
|
|
1206
1293
|
return {
|
|
@@ -1215,7 +1302,7 @@ function bindingifyRenderChunk(args) {
|
|
|
1215
1302
|
};
|
|
1216
1303
|
}
|
|
1217
1304
|
if (typeof ret === "string") return { code: ret };
|
|
1218
|
-
if (ret.code instanceof
|
|
1305
|
+
if (ret.code instanceof RolldownMagicString) {
|
|
1219
1306
|
const magicString = ret.code;
|
|
1220
1307
|
const normalizedCode = magicString.toString();
|
|
1221
1308
|
if (ret.map === null) return { code: normalizedCode };
|
|
@@ -1390,30 +1477,6 @@ function bindingifyCloseWatcher(args) {
|
|
|
1390
1477
|
}
|
|
1391
1478
|
//#endregion
|
|
1392
1479
|
//#region src/plugin/generated/hook-usage.ts
|
|
1393
|
-
let HookUsageKind = /* @__PURE__ */ function(HookUsageKind) {
|
|
1394
|
-
HookUsageKind[HookUsageKind["buildStart"] = 1] = "buildStart";
|
|
1395
|
-
HookUsageKind[HookUsageKind["resolveId"] = 2] = "resolveId";
|
|
1396
|
-
HookUsageKind[HookUsageKind["resolveDynamicImport"] = 4] = "resolveDynamicImport";
|
|
1397
|
-
HookUsageKind[HookUsageKind["load"] = 8] = "load";
|
|
1398
|
-
HookUsageKind[HookUsageKind["transform"] = 16] = "transform";
|
|
1399
|
-
HookUsageKind[HookUsageKind["moduleParsed"] = 32] = "moduleParsed";
|
|
1400
|
-
HookUsageKind[HookUsageKind["buildEnd"] = 64] = "buildEnd";
|
|
1401
|
-
HookUsageKind[HookUsageKind["renderStart"] = 128] = "renderStart";
|
|
1402
|
-
HookUsageKind[HookUsageKind["renderError"] = 256] = "renderError";
|
|
1403
|
-
HookUsageKind[HookUsageKind["renderChunk"] = 512] = "renderChunk";
|
|
1404
|
-
HookUsageKind[HookUsageKind["augmentChunkHash"] = 1024] = "augmentChunkHash";
|
|
1405
|
-
HookUsageKind[HookUsageKind["generateBundle"] = 2048] = "generateBundle";
|
|
1406
|
-
HookUsageKind[HookUsageKind["writeBundle"] = 4096] = "writeBundle";
|
|
1407
|
-
HookUsageKind[HookUsageKind["closeBundle"] = 8192] = "closeBundle";
|
|
1408
|
-
HookUsageKind[HookUsageKind["watchChange"] = 16384] = "watchChange";
|
|
1409
|
-
HookUsageKind[HookUsageKind["closeWatcher"] = 32768] = "closeWatcher";
|
|
1410
|
-
HookUsageKind[HookUsageKind["transformAst"] = 65536] = "transformAst";
|
|
1411
|
-
HookUsageKind[HookUsageKind["banner"] = 131072] = "banner";
|
|
1412
|
-
HookUsageKind[HookUsageKind["footer"] = 262144] = "footer";
|
|
1413
|
-
HookUsageKind[HookUsageKind["intro"] = 524288] = "intro";
|
|
1414
|
-
HookUsageKind[HookUsageKind["outro"] = 1048576] = "outro";
|
|
1415
|
-
return HookUsageKind;
|
|
1416
|
-
}({});
|
|
1417
1480
|
var HookUsage = class {
|
|
1418
1481
|
bitflag = BigInt(0);
|
|
1419
1482
|
constructor() {}
|
|
@@ -1426,26 +1489,26 @@ var HookUsage = class {
|
|
|
1426
1489
|
};
|
|
1427
1490
|
function extractHookUsage(plugin) {
|
|
1428
1491
|
let hookUsage = new HookUsage();
|
|
1429
|
-
if (plugin.buildStart) hookUsage.union(
|
|
1430
|
-
if (plugin.resolveId) hookUsage.union(
|
|
1431
|
-
if (plugin.resolveDynamicImport) hookUsage.union(
|
|
1432
|
-
if (plugin.load) hookUsage.union(
|
|
1433
|
-
if (plugin.transform) hookUsage.union(
|
|
1434
|
-
if (plugin.moduleParsed) hookUsage.union(
|
|
1435
|
-
if (plugin.buildEnd) hookUsage.union(
|
|
1436
|
-
if (plugin.renderStart) hookUsage.union(
|
|
1437
|
-
if (plugin.renderError) hookUsage.union(
|
|
1438
|
-
if (plugin.renderChunk) hookUsage.union(
|
|
1439
|
-
if (plugin.augmentChunkHash) hookUsage.union(
|
|
1440
|
-
if (plugin.generateBundle) hookUsage.union(
|
|
1441
|
-
if (plugin.writeBundle) hookUsage.union(
|
|
1442
|
-
if (plugin.closeBundle) hookUsage.union(
|
|
1443
|
-
if (plugin.watchChange) hookUsage.union(
|
|
1444
|
-
if (plugin.closeWatcher) hookUsage.union(
|
|
1445
|
-
if (plugin.banner) hookUsage.union(
|
|
1446
|
-
if (plugin.footer) hookUsage.union(
|
|
1447
|
-
if (plugin.intro) hookUsage.union(
|
|
1448
|
-
if (plugin.outro) hookUsage.union(
|
|
1492
|
+
if (plugin.buildStart) hookUsage.union(1);
|
|
1493
|
+
if (plugin.resolveId) hookUsage.union(2);
|
|
1494
|
+
if (plugin.resolveDynamicImport) hookUsage.union(4);
|
|
1495
|
+
if (plugin.load) hookUsage.union(8);
|
|
1496
|
+
if (plugin.transform) hookUsage.union(16);
|
|
1497
|
+
if (plugin.moduleParsed) hookUsage.union(32);
|
|
1498
|
+
if (plugin.buildEnd) hookUsage.union(64);
|
|
1499
|
+
if (plugin.renderStart) hookUsage.union(128);
|
|
1500
|
+
if (plugin.renderError) hookUsage.union(256);
|
|
1501
|
+
if (plugin.renderChunk) hookUsage.union(512);
|
|
1502
|
+
if (plugin.augmentChunkHash) hookUsage.union(1024);
|
|
1503
|
+
if (plugin.generateBundle) hookUsage.union(2048);
|
|
1504
|
+
if (plugin.writeBundle) hookUsage.union(4096);
|
|
1505
|
+
if (plugin.closeBundle) hookUsage.union(8192);
|
|
1506
|
+
if (plugin.watchChange) hookUsage.union(16384);
|
|
1507
|
+
if (plugin.closeWatcher) hookUsage.union(32768);
|
|
1508
|
+
if (plugin.banner) hookUsage.union(131072);
|
|
1509
|
+
if (plugin.footer) hookUsage.union(262144);
|
|
1510
|
+
if (plugin.intro) hookUsage.union(524288);
|
|
1511
|
+
if (plugin.outro) hookUsage.union(1048576);
|
|
1449
1512
|
return hookUsage;
|
|
1450
1513
|
}
|
|
1451
1514
|
//#endregion
|
|
@@ -1571,6 +1634,8 @@ function wrapHandlers(plugin) {
|
|
|
1571
1634
|
//#endregion
|
|
1572
1635
|
//#region src/options/normalized-input-options.ts
|
|
1573
1636
|
var NormalizedInputOptionsImpl = class extends PlainObjectLike {
|
|
1637
|
+
onLog;
|
|
1638
|
+
inputPlugins;
|
|
1574
1639
|
inner;
|
|
1575
1640
|
constructor(inner, onLog, inputPlugins) {
|
|
1576
1641
|
super();
|
|
@@ -1605,6 +1670,9 @@ __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "context", null);
|
|
|
1605
1670
|
//#endregion
|
|
1606
1671
|
//#region src/options/normalized-output-options.ts
|
|
1607
1672
|
var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
1673
|
+
inner;
|
|
1674
|
+
outputOptions;
|
|
1675
|
+
normalizedOutputPlugins;
|
|
1608
1676
|
constructor(inner, outputOptions, normalizedOutputPlugins) {
|
|
1609
1677
|
super();
|
|
1610
1678
|
this.inner = inner;
|
|
@@ -1695,6 +1763,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1695
1763
|
get sourcemapDebugIds() {
|
|
1696
1764
|
return this.inner.sourcemapDebugIds;
|
|
1697
1765
|
}
|
|
1766
|
+
get sourcemapExcludeSources() {
|
|
1767
|
+
return this.inner.sourcemapExcludeSources;
|
|
1768
|
+
}
|
|
1698
1769
|
get sourcemapIgnoreList() {
|
|
1699
1770
|
return this.outputOptions.sourcemapIgnoreList;
|
|
1700
1771
|
}
|
|
@@ -1770,6 +1841,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "globals", null);
|
|
|
1770
1841
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "paths", null);
|
|
1771
1842
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "hashCharacters", null);
|
|
1772
1843
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapDebugIds", null);
|
|
1844
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapExcludeSources", null);
|
|
1773
1845
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreList", null);
|
|
1774
1846
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
1775
1847
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
@@ -1789,6 +1861,10 @@ function normalizeAddon(value) {
|
|
|
1789
1861
|
//#endregion
|
|
1790
1862
|
//#region src/plugin/plugin-context-data.ts
|
|
1791
1863
|
var PluginContextData = class {
|
|
1864
|
+
onLog;
|
|
1865
|
+
outputOptions;
|
|
1866
|
+
normalizedInputPlugins;
|
|
1867
|
+
normalizedOutputPlugins;
|
|
1792
1868
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
1793
1869
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
1794
1870
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
@@ -2152,4 +2228,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
2152
2228
|
};
|
|
2153
2229
|
}
|
|
2154
2230
|
//#endregion
|
|
2155
|
-
export { version as S,
|
|
2231
|
+
export { version as C, description as S, LOG_LEVEL_INFO as _, RolldownMagicString as a, RUNTIME_MODULE_ID as b, __decorate as c, PlainObjectLike as d, MinimalPluginContextImpl as f, LOG_LEVEL_ERROR as g, LOG_LEVEL_DEBUG as h, transformModuleInfo as i, transformAssetSource as l, normalizeLog as m, PluginContextData as n, transformToRollupOutput as o, normalizeHook as p, bindingifyPlugin as r, transformRenderedChunk as s, bindingifyInputOptions as t, lazyProp as u, LOG_LEVEL_WARN as v, VERSION as x, logLevelPriority as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import {
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-CaVxb0SV.mjs";
|
|
2
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-KRVeJqya.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -28,6 +28,10 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
|
|
|
28
28
|
include?: StringOrRegExp | StringOrRegExp[];
|
|
29
29
|
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* This plugin should not be used for Rolldown.
|
|
33
|
+
*/
|
|
34
|
+
declare function oxcRuntimePlugin(): BuiltinPlugin;
|
|
31
35
|
declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
32
36
|
//#endregion
|
|
33
|
-
export {
|
|
37
|
+
export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Dq6w-2tU.mjs";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -51,6 +51,12 @@ function esmExternalRequirePlugin(config) {
|
|
|
51
51
|
plugin.enforce = "pre";
|
|
52
52
|
return plugin;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* This plugin should not be used for Rolldown.
|
|
56
|
+
*/
|
|
57
|
+
function oxcRuntimePlugin() {
|
|
58
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:oxc-runtime"));
|
|
59
|
+
}
|
|
54
60
|
function viteReactRefreshWrapperPlugin(config) {
|
|
55
61
|
if (config) {
|
|
56
62
|
config.include = normalizedStringOrRegex(config.include);
|
|
@@ -59,4 +65,4 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
59
65
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
60
66
|
}
|
|
61
67
|
//#endregion
|
|
62
|
-
export {
|
|
68
|
+
export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
|