@rolldown/browser 1.0.0-rc.9 → 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 +207 -72
- 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 +4 -4
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +4 -8
- 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-sRmdtwRU.js → rolldown-build-CKS7EawU.js} +211 -197
- package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
- package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-CboGFdC4.mjs} +125 -57
- 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-B1J71V4c.d.mts → define-config-Bah0mfyR.d.mts} +81 -29
- package/dist/shared/{load-config-B6MMusXN.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-BDqeiCX1.mjs → rolldown-WowDTCZP.mjs} +1 -1
- package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DIb-iqkO.mjs} +89 -143
- 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-Cj4uDLQX.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-Cfptl9gw.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();
|
|
@@ -565,7 +569,73 @@ Object.defineProperty(BindingMagicString.prototype, "isRolldownMagicString", {
|
|
|
565
569
|
writable: false,
|
|
566
570
|
configurable: false
|
|
567
571
|
});
|
|
568
|
-
|
|
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;
|
|
569
639
|
//#endregion
|
|
570
640
|
//#region src/utils/transform-module-info.ts
|
|
571
641
|
function transformModuleInfo(info, option) {
|
|
@@ -602,7 +672,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
602
672
|
return map;
|
|
603
673
|
}
|
|
604
674
|
//#endregion
|
|
605
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
675
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
606
676
|
function e(e, t, n) {
|
|
607
677
|
let r = (n) => e(n, ...t);
|
|
608
678
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -611,7 +681,7 @@ function e(e, t, n) {
|
|
|
611
681
|
});
|
|
612
682
|
}
|
|
613
683
|
//#endregion
|
|
614
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
684
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/purry.js
|
|
615
685
|
function t$1(t, n, r) {
|
|
616
686
|
let i = t.length - n.length;
|
|
617
687
|
if (i === 0) return t(...n);
|
|
@@ -619,7 +689,7 @@ function t$1(t, n, r) {
|
|
|
619
689
|
throw Error(`Wrong number of arguments`);
|
|
620
690
|
}
|
|
621
691
|
//#endregion
|
|
622
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
692
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/partition.js
|
|
623
693
|
function t(...t) {
|
|
624
694
|
return t$1(n, t);
|
|
625
695
|
}
|
|
@@ -823,6 +893,11 @@ const fsModule = {
|
|
|
823
893
|
//#endregion
|
|
824
894
|
//#region src/plugin/plugin-context.ts
|
|
825
895
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
896
|
+
outputOptions;
|
|
897
|
+
context;
|
|
898
|
+
data;
|
|
899
|
+
onLog;
|
|
900
|
+
currentLoadingModule;
|
|
826
901
|
fs = fsModule;
|
|
827
902
|
getModuleInfo;
|
|
828
903
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
@@ -930,6 +1005,7 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
930
1005
|
//#endregion
|
|
931
1006
|
//#region src/plugin/load-plugin-context.ts
|
|
932
1007
|
var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
1008
|
+
inner;
|
|
933
1009
|
constructor(outputOptions, context, plugin, data, inner, moduleId, onLog, logLevelOption, watchMode) {
|
|
934
1010
|
super(outputOptions, context, plugin, data, onLog, logLevelOption, watchMode, moduleId);
|
|
935
1011
|
this.inner = inner;
|
|
@@ -941,6 +1017,9 @@ var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
|
941
1017
|
//#endregion
|
|
942
1018
|
//#region src/plugin/transform-plugin-context.ts
|
|
943
1019
|
var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
1020
|
+
inner;
|
|
1021
|
+
moduleId;
|
|
1022
|
+
moduleSource;
|
|
944
1023
|
constructor(outputOptions, context, plugin, data, inner, moduleId, moduleSource, onLog, LogLevelOption, watchMode) {
|
|
945
1024
|
super(outputOptions, context, plugin, data, onLog, LogLevelOption, watchMode, moduleId);
|
|
946
1025
|
this.inner = inner;
|
|
@@ -1078,7 +1157,7 @@ function bindingifyTransform(args) {
|
|
|
1078
1157
|
Object.defineProperties(meta, {
|
|
1079
1158
|
magicString: { get() {
|
|
1080
1159
|
if (magicStringInstance) return magicStringInstance;
|
|
1081
|
-
magicStringInstance = new
|
|
1160
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1082
1161
|
return magicStringInstance;
|
|
1083
1162
|
} },
|
|
1084
1163
|
ast: { get() {
|
|
@@ -1112,7 +1191,7 @@ function bindingifyTransform(args) {
|
|
|
1112
1191
|
let normalizedCode = void 0;
|
|
1113
1192
|
let map = ret.map;
|
|
1114
1193
|
if (typeof ret.code === "string") normalizedCode = ret.code;
|
|
1115
|
-
else if (ret.code instanceof
|
|
1194
|
+
else if (ret.code instanceof RolldownMagicString) {
|
|
1116
1195
|
let magicString = ret.code;
|
|
1117
1196
|
normalizedCode = magicString.toString();
|
|
1118
1197
|
let fallbackSourcemap = ctx.sendMagicString(magicString);
|
|
@@ -1201,14 +1280,14 @@ function bindingifyRenderChunk(args) {
|
|
|
1201
1280
|
if (args.options.experimental?.nativeMagicString) Object.defineProperty(renderChunkMeta, "magicString", {
|
|
1202
1281
|
get() {
|
|
1203
1282
|
if (magicStringInstance) return magicStringInstance;
|
|
1204
|
-
magicStringInstance = new
|
|
1283
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1205
1284
|
return magicStringInstance;
|
|
1206
1285
|
},
|
|
1207
1286
|
configurable: true
|
|
1208
1287
|
});
|
|
1209
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);
|
|
1210
1289
|
if (ret == null) return;
|
|
1211
|
-
if (ret instanceof
|
|
1290
|
+
if (ret instanceof RolldownMagicString) {
|
|
1212
1291
|
const normalizedCode = ret.toString();
|
|
1213
1292
|
const generatedMap = ret.generateMap();
|
|
1214
1293
|
return {
|
|
@@ -1223,7 +1302,7 @@ function bindingifyRenderChunk(args) {
|
|
|
1223
1302
|
};
|
|
1224
1303
|
}
|
|
1225
1304
|
if (typeof ret === "string") return { code: ret };
|
|
1226
|
-
if (ret.code instanceof
|
|
1305
|
+
if (ret.code instanceof RolldownMagicString) {
|
|
1227
1306
|
const magicString = ret.code;
|
|
1228
1307
|
const normalizedCode = magicString.toString();
|
|
1229
1308
|
if (ret.map === null) return { code: normalizedCode };
|
|
@@ -1398,30 +1477,6 @@ function bindingifyCloseWatcher(args) {
|
|
|
1398
1477
|
}
|
|
1399
1478
|
//#endregion
|
|
1400
1479
|
//#region src/plugin/generated/hook-usage.ts
|
|
1401
|
-
let HookUsageKind = /* @__PURE__ */ function(HookUsageKind) {
|
|
1402
|
-
HookUsageKind[HookUsageKind["buildStart"] = 1] = "buildStart";
|
|
1403
|
-
HookUsageKind[HookUsageKind["resolveId"] = 2] = "resolveId";
|
|
1404
|
-
HookUsageKind[HookUsageKind["resolveDynamicImport"] = 4] = "resolveDynamicImport";
|
|
1405
|
-
HookUsageKind[HookUsageKind["load"] = 8] = "load";
|
|
1406
|
-
HookUsageKind[HookUsageKind["transform"] = 16] = "transform";
|
|
1407
|
-
HookUsageKind[HookUsageKind["moduleParsed"] = 32] = "moduleParsed";
|
|
1408
|
-
HookUsageKind[HookUsageKind["buildEnd"] = 64] = "buildEnd";
|
|
1409
|
-
HookUsageKind[HookUsageKind["renderStart"] = 128] = "renderStart";
|
|
1410
|
-
HookUsageKind[HookUsageKind["renderError"] = 256] = "renderError";
|
|
1411
|
-
HookUsageKind[HookUsageKind["renderChunk"] = 512] = "renderChunk";
|
|
1412
|
-
HookUsageKind[HookUsageKind["augmentChunkHash"] = 1024] = "augmentChunkHash";
|
|
1413
|
-
HookUsageKind[HookUsageKind["generateBundle"] = 2048] = "generateBundle";
|
|
1414
|
-
HookUsageKind[HookUsageKind["writeBundle"] = 4096] = "writeBundle";
|
|
1415
|
-
HookUsageKind[HookUsageKind["closeBundle"] = 8192] = "closeBundle";
|
|
1416
|
-
HookUsageKind[HookUsageKind["watchChange"] = 16384] = "watchChange";
|
|
1417
|
-
HookUsageKind[HookUsageKind["closeWatcher"] = 32768] = "closeWatcher";
|
|
1418
|
-
HookUsageKind[HookUsageKind["transformAst"] = 65536] = "transformAst";
|
|
1419
|
-
HookUsageKind[HookUsageKind["banner"] = 131072] = "banner";
|
|
1420
|
-
HookUsageKind[HookUsageKind["footer"] = 262144] = "footer";
|
|
1421
|
-
HookUsageKind[HookUsageKind["intro"] = 524288] = "intro";
|
|
1422
|
-
HookUsageKind[HookUsageKind["outro"] = 1048576] = "outro";
|
|
1423
|
-
return HookUsageKind;
|
|
1424
|
-
}({});
|
|
1425
1480
|
var HookUsage = class {
|
|
1426
1481
|
bitflag = BigInt(0);
|
|
1427
1482
|
constructor() {}
|
|
@@ -1434,26 +1489,26 @@ var HookUsage = class {
|
|
|
1434
1489
|
};
|
|
1435
1490
|
function extractHookUsage(plugin) {
|
|
1436
1491
|
let hookUsage = new HookUsage();
|
|
1437
|
-
if (plugin.buildStart) hookUsage.union(
|
|
1438
|
-
if (plugin.resolveId) hookUsage.union(
|
|
1439
|
-
if (plugin.resolveDynamicImport) hookUsage.union(
|
|
1440
|
-
if (plugin.load) hookUsage.union(
|
|
1441
|
-
if (plugin.transform) hookUsage.union(
|
|
1442
|
-
if (plugin.moduleParsed) hookUsage.union(
|
|
1443
|
-
if (plugin.buildEnd) hookUsage.union(
|
|
1444
|
-
if (plugin.renderStart) hookUsage.union(
|
|
1445
|
-
if (plugin.renderError) hookUsage.union(
|
|
1446
|
-
if (plugin.renderChunk) hookUsage.union(
|
|
1447
|
-
if (plugin.augmentChunkHash) hookUsage.union(
|
|
1448
|
-
if (plugin.generateBundle) hookUsage.union(
|
|
1449
|
-
if (plugin.writeBundle) hookUsage.union(
|
|
1450
|
-
if (plugin.closeBundle) hookUsage.union(
|
|
1451
|
-
if (plugin.watchChange) hookUsage.union(
|
|
1452
|
-
if (plugin.closeWatcher) hookUsage.union(
|
|
1453
|
-
if (plugin.banner) hookUsage.union(
|
|
1454
|
-
if (plugin.footer) hookUsage.union(
|
|
1455
|
-
if (plugin.intro) hookUsage.union(
|
|
1456
|
-
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);
|
|
1457
1512
|
return hookUsage;
|
|
1458
1513
|
}
|
|
1459
1514
|
//#endregion
|
|
@@ -1579,6 +1634,8 @@ function wrapHandlers(plugin) {
|
|
|
1579
1634
|
//#endregion
|
|
1580
1635
|
//#region src/options/normalized-input-options.ts
|
|
1581
1636
|
var NormalizedInputOptionsImpl = class extends PlainObjectLike {
|
|
1637
|
+
onLog;
|
|
1638
|
+
inputPlugins;
|
|
1582
1639
|
inner;
|
|
1583
1640
|
constructor(inner, onLog, inputPlugins) {
|
|
1584
1641
|
super();
|
|
@@ -1613,6 +1670,9 @@ __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "context", null);
|
|
|
1613
1670
|
//#endregion
|
|
1614
1671
|
//#region src/options/normalized-output-options.ts
|
|
1615
1672
|
var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
1673
|
+
inner;
|
|
1674
|
+
outputOptions;
|
|
1675
|
+
normalizedOutputPlugins;
|
|
1616
1676
|
constructor(inner, outputOptions, normalizedOutputPlugins) {
|
|
1617
1677
|
super();
|
|
1618
1678
|
this.inner = inner;
|
|
@@ -1703,6 +1763,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1703
1763
|
get sourcemapDebugIds() {
|
|
1704
1764
|
return this.inner.sourcemapDebugIds;
|
|
1705
1765
|
}
|
|
1766
|
+
get sourcemapExcludeSources() {
|
|
1767
|
+
return this.inner.sourcemapExcludeSources;
|
|
1768
|
+
}
|
|
1706
1769
|
get sourcemapIgnoreList() {
|
|
1707
1770
|
return this.outputOptions.sourcemapIgnoreList;
|
|
1708
1771
|
}
|
|
@@ -1778,6 +1841,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "globals", null);
|
|
|
1778
1841
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "paths", null);
|
|
1779
1842
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "hashCharacters", null);
|
|
1780
1843
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapDebugIds", null);
|
|
1844
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapExcludeSources", null);
|
|
1781
1845
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreList", null);
|
|
1782
1846
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
1783
1847
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
@@ -1797,6 +1861,10 @@ function normalizeAddon(value) {
|
|
|
1797
1861
|
//#endregion
|
|
1798
1862
|
//#region src/plugin/plugin-context-data.ts
|
|
1799
1863
|
var PluginContextData = class {
|
|
1864
|
+
onLog;
|
|
1865
|
+
outputOptions;
|
|
1866
|
+
normalizedInputPlugins;
|
|
1867
|
+
normalizedOutputPlugins;
|
|
1800
1868
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
1801
1869
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
1802
1870
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
@@ -2160,4 +2228,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
2160
2228
|
};
|
|
2161
2229
|
}
|
|
2162
2230
|
//#endregion
|
|
2163
|
-
export { version as C, description as S, LOG_LEVEL_INFO as _,
|
|
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 };
|