@rolldown/browser 1.0.0-beta.53 → 1.0.0-beta.55
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 +20 -20
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +7 -7
- package/dist/{constructors-YnYYKXAq.js → constructors-DoEj0CTZ.js} +8 -3
- package/dist/experimental-index.browser.mjs +16 -8
- package/dist/experimental-index.d.mts +17 -11
- package/dist/experimental-index.mjs +14 -10
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +2 -2
- package/dist/get-log-filter.d.mts +7 -0
- package/dist/get-log-filter.mjs +48 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +7 -7
- package/dist/{normalize-string-or-regex-BVvsez4S.js → normalize-string-or-regex-dwgRHUz6.js} +4 -2
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- 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/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-DdLgyfGg.js → rolldown-build-7uuCodq1.js} +51 -23
- package/dist/shared/{binding-CY7Z709f.d.mts → binding-r9j8jqRV.d.mts} +65 -19
- package/dist/shared/{bindingify-input-options-DcGFRvkp.mjs → bindingify-input-options-nvXYfbt3.mjs} +36 -17
- package/dist/shared/{constructors-S9gqtBdT.d.mts → constructors-G-fr57ib.d.mts} +6 -6
- package/dist/shared/{constructors-Bi2whoYR.mjs → constructors-oU7W7sz4.mjs} +8 -3
- package/dist/shared/{define-config-CPSppdHs.d.mts → define-config-Bwwa5Tc_.d.mts} +31 -7
- package/dist/shared/{load-config-B09j7Dnd.mjs → load-config-DumfiMa-.mjs} +1 -1
- package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
- package/dist/shared/{normalize-string-or-regex-Bsz_9HAl.mjs → normalize-string-or-regex-FzNsMab1.mjs} +6 -4
- package/dist/shared/{parse-ast-index-BOAjpcDq.mjs → parse-ast-index-BZ4FJxMm.mjs} +2 -2
- package/dist/shared/{rolldown-vJGs7rCs.mjs → rolldown-CTRsCETA.mjs} +1 -1
- package/dist/shared/{rolldown-build-CyazSAHY.mjs → rolldown-build-D8oOi181.mjs} +22 -13
- package/dist/shared/utils-CMDrspre.d.mts +29 -0
- package/dist/shared/{watch-Abdexkk9.mjs → watch-DDjo8C9u.mjs} +18 -6
- package/package.json +1 -1
- package/dist/shared/utils-m9n-gTFq.d.mts +0 -62
- /package/dist/shared/{composable-filters-DZ5ToxRJ.mjs → composable-filters-G1eqjHFo.mjs} +0 -0
- /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
- /package/dist/shared/{logs-CPsamAuj.mjs → logs-By66Jt-E.mjs} +0 -0
- /package/dist/shared/{misc-5GYLGQ20.mjs → misc-BubmxcE3.mjs} +0 -0
- /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as augmentCodeLocation, C as LOG_LEVEL_INFO, D as unimplemented, E as arraify, F as logNoFileSystemInBrowser, I as logParseError, L as logPluginError, M as logCycleLoading, N as logInputHookInOutputPlugin, O as unreachable, R as locate, S as LOG_LEVEL_ERROR, T as logLevelPriority, _ as PlainObjectLike, a as bindingifyManifestPlugin, b as normalizeLog, c as collectChangedBundle, d as bindingifySourcemap$1, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, i as bindingifyCSSPostPlugin, j as error, k as unsupported, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_WARN, x as LOG_LEVEL_DEBUG, y as VERSION, z as getCodeFrame } from "./normalize-string-or-regex-
|
|
1
|
+
import { A as augmentCodeLocation, C as LOG_LEVEL_INFO, D as unimplemented, E as arraify, F as logNoFileSystemInBrowser, I as logParseError, L as logPluginError, M as logCycleLoading, N as logInputHookInOutputPlugin, O as unreachable, R as locate, S as LOG_LEVEL_ERROR, T as logLevelPriority, _ as PlainObjectLike, a as bindingifyManifestPlugin, b as normalizeLog, c as collectChangedBundle, d as bindingifySourcemap$1, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, i as bindingifyCSSPostPlugin, j as error, k as unsupported, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_WARN, x as LOG_LEVEL_DEBUG, y as VERSION, z as getCodeFrame } from "./normalize-string-or-regex-dwgRHUz6.js";
|
|
2
2
|
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, parse, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
@@ -1952,7 +1952,7 @@ const TransformOptionsSchema = object({
|
|
|
1952
1952
|
JsxOptionsSchema
|
|
1953
1953
|
])),
|
|
1954
1954
|
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
1955
|
-
define: pipe(optional(record(string(), string())), description("Define global variables")),
|
|
1955
|
+
define: pipe(optional(record(string(), string())), description("Define global variables (syntax: key=value,key2=value2)")),
|
|
1956
1956
|
inject: pipe(optional(record(string(), union([string(), tuple([string(), string()])]))), description("Inject import statements on demand")),
|
|
1957
1957
|
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names"))
|
|
1958
1958
|
});
|
|
@@ -1983,7 +1983,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
1983
1983
|
emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
|
|
1984
1984
|
configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
|
|
1985
1985
|
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
|
|
1986
|
-
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory"))
|
|
1986
|
+
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
|
|
1987
|
+
pluginTimings: pipe(optional(boolean()), description("Whether to emit warning when detecting plugin timings"))
|
|
1987
1988
|
});
|
|
1988
1989
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
1989
1990
|
function: boolean(),
|
|
@@ -2062,7 +2063,7 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
|
2062
2063
|
LogOrStringHandlerSchema
|
|
2063
2064
|
])));
|
|
2064
2065
|
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
2065
|
-
const
|
|
2066
|
+
const DevModeSchema = union([boolean(), strictObject({
|
|
2066
2067
|
new: optional(boolean()),
|
|
2067
2068
|
port: optional(number()),
|
|
2068
2069
|
host: optional(string()),
|
|
@@ -2095,7 +2096,7 @@ const InputOptionsSchema = strictObject({
|
|
|
2095
2096
|
strictExecutionOrder: optional(boolean()),
|
|
2096
2097
|
onDemandWrapping: optional(boolean()),
|
|
2097
2098
|
incrementalBuild: optional(boolean()),
|
|
2098
|
-
|
|
2099
|
+
devMode: optional(DevModeSchema),
|
|
2099
2100
|
attachDebugInfo: optional(union([
|
|
2100
2101
|
literal("none"),
|
|
2101
2102
|
literal("simple"),
|
|
@@ -2218,6 +2219,8 @@ const OutputOptionsSchema = strictObject({
|
|
|
2218
2219
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
2219
2220
|
banner: optional(union([string(), AddonFunctionSchema])),
|
|
2220
2221
|
footer: optional(union([string(), AddonFunctionSchema])),
|
|
2222
|
+
postBanner: optional(union([string(), AddonFunctionSchema])),
|
|
2223
|
+
postFooter: optional(union([string(), AddonFunctionSchema])),
|
|
2221
2224
|
intro: optional(union([string(), AddonFunctionSchema])),
|
|
2222
2225
|
outro: optional(union([string(), AddonFunctionSchema])),
|
|
2223
2226
|
extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
@@ -2265,6 +2268,8 @@ const OutputCliOverrideSchema = strictObject({
|
|
|
2265
2268
|
sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
|
|
2266
2269
|
banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
|
|
2267
2270
|
footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
|
|
2271
|
+
postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
2272
|
+
postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
2268
2273
|
intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
|
|
2269
2274
|
outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
|
|
2270
2275
|
esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
@@ -2347,7 +2352,7 @@ var RolldownOutputImpl = class extends PlainObjectLike {
|
|
|
2347
2352
|
__decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
|
|
2348
2353
|
|
|
2349
2354
|
//#endregion
|
|
2350
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2355
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.103.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2351
2356
|
function wrap$1(result) {
|
|
2352
2357
|
let program, module, comments, errors;
|
|
2353
2358
|
return {
|
|
@@ -2443,8 +2448,13 @@ function normalizeBindingResult(container) {
|
|
|
2443
2448
|
}
|
|
2444
2449
|
function normalizeBindingError(e$1) {
|
|
2445
2450
|
return e$1.type === "JsError" ? e$1.field0 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
2451
|
+
code: e$1.field0.kind,
|
|
2446
2452
|
kind: e$1.field0.kind,
|
|
2447
2453
|
message: e$1.field0.message,
|
|
2454
|
+
id: e$1.field0.id,
|
|
2455
|
+
exporter: e$1.field0.exporter,
|
|
2456
|
+
loc: e$1.field0.loc,
|
|
2457
|
+
pos: e$1.field0.pos,
|
|
2448
2458
|
stack: void 0
|
|
2449
2459
|
});
|
|
2450
2460
|
}
|
|
@@ -2628,7 +2638,7 @@ function e(e$1, t$2, n$1) {
|
|
|
2628
2638
|
|
|
2629
2639
|
//#endregion
|
|
2630
2640
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2631
|
-
function t(t$2, n$1, r) {
|
|
2641
|
+
function t$1(t$2, n$1, r) {
|
|
2632
2642
|
let i = t$2.length - n$1.length;
|
|
2633
2643
|
if (i === 0) return t$2(...n$1);
|
|
2634
2644
|
if (i === 1) return e(t$2, n$1, r);
|
|
@@ -2637,8 +2647,8 @@ function t(t$2, n$1, r) {
|
|
|
2637
2647
|
|
|
2638
2648
|
//#endregion
|
|
2639
2649
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/partition-DAu403JQ.js
|
|
2640
|
-
function t
|
|
2641
|
-
return t(n, t$2);
|
|
2650
|
+
function t(...t$2) {
|
|
2651
|
+
return t$1(n, t$2);
|
|
2642
2652
|
}
|
|
2643
2653
|
const n = (e$1, t$2) => {
|
|
2644
2654
|
let n$1 = [[], []];
|
|
@@ -2668,8 +2678,8 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2668
2678
|
let idExcludes = [];
|
|
2669
2679
|
let codeIncludes = [];
|
|
2670
2680
|
let codeExcludes = [];
|
|
2671
|
-
if (id$1) [idIncludes, idExcludes] = t
|
|
2672
|
-
if (code$1) [codeIncludes, codeExcludes] = t
|
|
2681
|
+
if (id$1) [idIncludes, idExcludes] = t(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m) => m.kind === "include");
|
|
2682
|
+
if (code$1) [codeIncludes, codeExcludes] = t(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m) => m.kind === "include");
|
|
2673
2683
|
ret.push(...idExcludes);
|
|
2674
2684
|
ret.push(...codeExcludes);
|
|
2675
2685
|
let andExprList = [];
|
|
@@ -2878,7 +2888,13 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2878
2888
|
};
|
|
2879
2889
|
}
|
|
2880
2890
|
emitFile = (file) => {
|
|
2881
|
-
if (file.type === "prebuilt-chunk") return
|
|
2891
|
+
if (file.type === "prebuilt-chunk") return this.context.emitPrebuiltChunk({
|
|
2892
|
+
fileName: file.fileName,
|
|
2893
|
+
code: file.code,
|
|
2894
|
+
exports: file.exports,
|
|
2895
|
+
map: bindingifySourcemap$1(file.map),
|
|
2896
|
+
sourcemapFileName: file.sourcemapFileName
|
|
2897
|
+
});
|
|
2882
2898
|
if (file.type === "chunk") return this.context.emitChunk({
|
|
2883
2899
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(file.preserveSignature),
|
|
2884
2900
|
...file
|
|
@@ -3526,7 +3542,7 @@ var NormalizedInputOptionsImpl = class extends PlainObjectLike {
|
|
|
3526
3542
|
return this.inner.input;
|
|
3527
3543
|
}
|
|
3528
3544
|
get cwd() {
|
|
3529
|
-
return this.inner.cwd
|
|
3545
|
+
return this.inner.cwd;
|
|
3530
3546
|
}
|
|
3531
3547
|
get platform() {
|
|
3532
3548
|
return this.inner.platform;
|
|
@@ -3601,6 +3617,12 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
3601
3617
|
get footer() {
|
|
3602
3618
|
return normalizeAddon(this.outputOptions.footer);
|
|
3603
3619
|
}
|
|
3620
|
+
get postBanner() {
|
|
3621
|
+
return normalizeAddon(this.outputOptions.postBanner);
|
|
3622
|
+
}
|
|
3623
|
+
get postFooter() {
|
|
3624
|
+
return normalizeAddon(this.outputOptions.postFooter);
|
|
3625
|
+
}
|
|
3604
3626
|
get intro() {
|
|
3605
3627
|
return normalizeAddon(this.outputOptions.intro);
|
|
3606
3628
|
}
|
|
@@ -3682,6 +3704,8 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "inlineDynamicImpo
|
|
|
3682
3704
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "externalLiveBindings", null);
|
|
3683
3705
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "banner", null);
|
|
3684
3706
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "footer", null);
|
|
3707
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "postBanner", null);
|
|
3708
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "postFooter", null);
|
|
3685
3709
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "intro", null);
|
|
3686
3710
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "outro", null);
|
|
3687
3711
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "esModule", null);
|
|
@@ -3886,10 +3910,10 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3886
3910
|
tsconfig: inputOptions.resolve?.tsconfigFilename ?? inputOptions.tsconfig
|
|
3887
3911
|
};
|
|
3888
3912
|
}
|
|
3889
|
-
function
|
|
3890
|
-
if (
|
|
3891
|
-
if (typeof
|
|
3892
|
-
return
|
|
3913
|
+
function bindingifyDevMode(devMode) {
|
|
3914
|
+
if (devMode) {
|
|
3915
|
+
if (typeof devMode === "boolean") return devMode ? {} : void 0;
|
|
3916
|
+
return devMode;
|
|
3893
3917
|
}
|
|
3894
3918
|
}
|
|
3895
3919
|
function bindingifyAttachDebugInfo(attachDebugInfo) {
|
|
@@ -3925,7 +3949,7 @@ function bindingifyExperimental(experimental) {
|
|
|
3925
3949
|
disableLiveBindings: experimental?.disableLiveBindings,
|
|
3926
3950
|
viteMode: experimental?.viteMode,
|
|
3927
3951
|
resolveNewUrlToAsset: experimental?.resolveNewUrlToAsset,
|
|
3928
|
-
|
|
3952
|
+
devMode: bindingifyDevMode(experimental?.devMode),
|
|
3929
3953
|
attachDebugInfo: bindingifyAttachDebugInfo(experimental?.attachDebugInfo),
|
|
3930
3954
|
chunkModulesOrder,
|
|
3931
3955
|
chunkImportMap: experimental?.chunkImportMap,
|
|
@@ -4080,7 +4104,10 @@ var ChunkingContextImpl = class {
|
|
|
4080
4104
|
//#endregion
|
|
4081
4105
|
//#region src/utils/bindingify-output-options.ts
|
|
4082
4106
|
function bindingifyOutputOptions(outputOptions) {
|
|
4083
|
-
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
4107
|
+
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
4108
|
+
if (outputOptions.inlineDynamicImports === true) {
|
|
4109
|
+
if (manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
|
|
4110
|
+
}
|
|
4084
4111
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
4085
4112
|
return {
|
|
4086
4113
|
dir,
|
|
@@ -4095,6 +4122,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
4095
4122
|
sourcemapPathTransform,
|
|
4096
4123
|
banner: bindingifyAddon(banner),
|
|
4097
4124
|
footer: bindingifyAddon(footer),
|
|
4125
|
+
postBanner: bindingifyAddon(postBanner),
|
|
4126
|
+
postFooter: bindingifyAddon(postFooter),
|
|
4098
4127
|
intro: bindingifyAddon(intro),
|
|
4099
4128
|
outro: bindingifyAddon(outro),
|
|
4100
4129
|
extend: outputOptions.extend,
|
|
@@ -4125,10 +4154,9 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
4125
4154
|
};
|
|
4126
4155
|
}
|
|
4127
4156
|
function bindingifyAddon(configAddon) {
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
};
|
|
4157
|
+
if (configAddon == null || configAddon === "") return;
|
|
4158
|
+
if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
|
|
4159
|
+
return configAddon;
|
|
4132
4160
|
}
|
|
4133
4161
|
function bindingifyFormat(format$1) {
|
|
4134
4162
|
switch (format$1) {
|
|
@@ -185,7 +185,7 @@ interface Comment {
|
|
|
185
185
|
end: number;
|
|
186
186
|
}
|
|
187
187
|
interface ErrorLabel {
|
|
188
|
-
message
|
|
188
|
+
message: string | null;
|
|
189
189
|
start: number;
|
|
190
190
|
end: number;
|
|
191
191
|
}
|
|
@@ -193,8 +193,8 @@ interface OxcError {
|
|
|
193
193
|
severity: Severity;
|
|
194
194
|
message: string;
|
|
195
195
|
labels: Array<ErrorLabel>;
|
|
196
|
-
helpMessage
|
|
197
|
-
codeframe
|
|
196
|
+
helpMessage: string | null;
|
|
197
|
+
codeframe: string | null;
|
|
198
198
|
}
|
|
199
199
|
type Severity = 'Error' | 'Warning' | 'Advice';
|
|
200
200
|
declare class ParseResult {
|
|
@@ -228,9 +228,9 @@ interface EcmaScriptModule {
|
|
|
228
228
|
}
|
|
229
229
|
interface ExportExportName {
|
|
230
230
|
kind: ExportExportNameKind;
|
|
231
|
-
name
|
|
232
|
-
start
|
|
233
|
-
end
|
|
231
|
+
name: string | null;
|
|
232
|
+
start: number | null;
|
|
233
|
+
end: number | null;
|
|
234
234
|
}
|
|
235
235
|
type ExportExportNameKind = /** `export { name } */
|
|
236
236
|
'Name' | /** `export default expression` */
|
|
@@ -238,9 +238,9 @@ type ExportExportNameKind = /** `export { name } */
|
|
|
238
238
|
'None';
|
|
239
239
|
interface ExportImportName {
|
|
240
240
|
kind: ExportImportNameKind;
|
|
241
|
-
name
|
|
242
|
-
start
|
|
243
|
-
end
|
|
241
|
+
name: string | null;
|
|
242
|
+
start: number | null;
|
|
243
|
+
end: number | null;
|
|
244
244
|
}
|
|
245
245
|
type ExportImportNameKind = /** `export { name } */
|
|
246
246
|
'Name' | /** `export * as ns from "mod"` */
|
|
@@ -249,9 +249,9 @@ type ExportImportNameKind = /** `export { name } */
|
|
|
249
249
|
'None';
|
|
250
250
|
interface ExportLocalName {
|
|
251
251
|
kind: ExportLocalNameKind;
|
|
252
|
-
name
|
|
253
|
-
start
|
|
254
|
-
end
|
|
252
|
+
name: string | null;
|
|
253
|
+
start: number | null;
|
|
254
|
+
end: number | null;
|
|
255
255
|
}
|
|
256
256
|
type ExportLocalNameKind = /** `export { name } */
|
|
257
257
|
'Name' | /** `export default expression` */
|
|
@@ -263,9 +263,9 @@ type ExportLocalNameKind = /** `export { name } */
|
|
|
263
263
|
'None';
|
|
264
264
|
interface ImportName {
|
|
265
265
|
kind: ImportNameKind;
|
|
266
|
-
name
|
|
267
|
-
start
|
|
268
|
-
end
|
|
266
|
+
name: string | null;
|
|
267
|
+
start: number | null;
|
|
268
|
+
end: number | null;
|
|
269
269
|
}
|
|
270
270
|
type ImportNameKind = /** `import { x } from "mod"` */
|
|
271
271
|
'Name' | /** `import * as ns from "mod"` */
|
|
@@ -323,7 +323,7 @@ interface StaticExport {
|
|
|
323
323
|
interface StaticExportEntry {
|
|
324
324
|
start: number;
|
|
325
325
|
end: number;
|
|
326
|
-
moduleRequest
|
|
326
|
+
moduleRequest: ValueSpan | null;
|
|
327
327
|
/** The name under which the desired binding is exported by the module`. */
|
|
328
328
|
importName: ExportImportName;
|
|
329
329
|
/** The name used to export this binding by this module. */
|
|
@@ -415,6 +415,18 @@ declare class ResolverFactory {
|
|
|
415
415
|
sync(directory: string, request: string): ResolveResult;
|
|
416
416
|
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
417
417
|
async(directory: string, request: string): Promise<ResolveResult>;
|
|
418
|
+
/**
|
|
419
|
+
* Synchronously resolve `specifier` at an absolute path to a `file`.
|
|
420
|
+
*
|
|
421
|
+
* This method automatically discovers tsconfig.json by traversing parent directories.
|
|
422
|
+
*/
|
|
423
|
+
resolveFileSync(file: string, request: string): ResolveResult;
|
|
424
|
+
/**
|
|
425
|
+
* Asynchronously resolve `specifier` at an absolute path to a `file`.
|
|
426
|
+
*
|
|
427
|
+
* This method automatically discovers tsconfig.json by traversing parent directories.
|
|
428
|
+
*/
|
|
429
|
+
resolveFileAsync(file: string, request: string): Promise<ResolveResult>;
|
|
418
430
|
}
|
|
419
431
|
/** Node.js builtin module when `Options::builtin_modules` is enabled. */
|
|
420
432
|
interface Builtin {
|
|
@@ -656,9 +668,8 @@ interface TsconfigOptions {
|
|
|
656
668
|
* Support for Typescript Project References.
|
|
657
669
|
*
|
|
658
670
|
* * `'auto'`: use the `references` field from tsconfig of `config_file`.
|
|
659
|
-
* * `string[]`: manually provided relative or absolute path.
|
|
660
671
|
*/
|
|
661
|
-
references?: 'auto'
|
|
672
|
+
references?: 'auto';
|
|
662
673
|
}
|
|
663
674
|
interface SourceMap {
|
|
664
675
|
file?: string;
|
|
@@ -1271,7 +1282,7 @@ declare class BindingMagicString {
|
|
|
1271
1282
|
}
|
|
1272
1283
|
declare class BindingNormalizedOptions {
|
|
1273
1284
|
get input(): Array<string> | Record<string, string>;
|
|
1274
|
-
get cwd(): string
|
|
1285
|
+
get cwd(): string;
|
|
1275
1286
|
get platform(): 'node' | 'browser' | 'neutral';
|
|
1276
1287
|
get shimMissingExports(): boolean;
|
|
1277
1288
|
get name(): string | null;
|
|
@@ -1292,6 +1303,8 @@ declare class BindingNormalizedOptions {
|
|
|
1292
1303
|
get footer(): string | undefined | null | undefined;
|
|
1293
1304
|
get intro(): string | undefined | null | undefined;
|
|
1294
1305
|
get outro(): string | undefined | null | undefined;
|
|
1306
|
+
get postBanner(): string | undefined | null | undefined;
|
|
1307
|
+
get postFooter(): string | undefined | null | undefined;
|
|
1295
1308
|
get externalLiveBindings(): boolean;
|
|
1296
1309
|
get extend(): boolean;
|
|
1297
1310
|
get globals(): Record<string, string> | undefined;
|
|
@@ -1551,6 +1564,10 @@ interface BindingViteDynamicImportVarsPluginConfig {
|
|
|
1551
1564
|
include?: Array<BindingStringOrRegex>;
|
|
1552
1565
|
exclude?: Array<BindingStringOrRegex>;
|
|
1553
1566
|
resolver?: (id: string, importer: string) => MaybePromise<string | undefined>;
|
|
1567
|
+
isV2?: BindingViteDynamicImportVarsPluginV2Config;
|
|
1568
|
+
}
|
|
1569
|
+
interface BindingViteDynamicImportVarsPluginV2Config {
|
|
1570
|
+
sourcemap: boolean;
|
|
1554
1571
|
}
|
|
1555
1572
|
interface BindingViteHtmlInlineProxyPluginConfig {
|
|
1556
1573
|
root: string;
|
|
@@ -1572,6 +1589,10 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1572
1589
|
interface BindingViteImportGlobPluginConfig {
|
|
1573
1590
|
root?: string;
|
|
1574
1591
|
restoreQueryExtension?: boolean;
|
|
1592
|
+
isV2?: BindingViteImportGlobPluginV2Config;
|
|
1593
|
+
}
|
|
1594
|
+
interface BindingViteImportGlobPluginV2Config {
|
|
1595
|
+
sourcemap?: boolean;
|
|
1575
1596
|
}
|
|
1576
1597
|
interface BindingViteJsonPluginConfig {
|
|
1577
1598
|
minify?: boolean;
|
|
@@ -1621,6 +1642,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1621
1642
|
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
1622
1643
|
onWarn?: (message: string) => void;
|
|
1623
1644
|
onDebug?: (message: string) => void;
|
|
1645
|
+
yarnPnp: boolean;
|
|
1624
1646
|
}
|
|
1625
1647
|
interface BindingViteResolvePluginResolveOptions {
|
|
1626
1648
|
isBuild: boolean;
|
|
@@ -1648,9 +1670,17 @@ interface BindingViteTransformPluginConfig {
|
|
|
1648
1670
|
isServerConsumer?: boolean;
|
|
1649
1671
|
jsxInject?: string;
|
|
1650
1672
|
transformOptions?: TransformOptions;
|
|
1673
|
+
yarnPnp?: boolean;
|
|
1651
1674
|
}
|
|
1652
1675
|
interface BindingViteWasmHelperPluginConfig {
|
|
1653
1676
|
decodedBase: string;
|
|
1677
|
+
v2?: BindingViteWasmHelperPluginV2Config;
|
|
1678
|
+
}
|
|
1679
|
+
interface BindingViteWasmHelperPluginV2Config {
|
|
1680
|
+
root: string;
|
|
1681
|
+
isLib: boolean;
|
|
1682
|
+
publicDir: string;
|
|
1683
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1654
1684
|
}
|
|
1655
1685
|
declare function createTokioRuntime(blockingThreads?: number | undefined | null): void;
|
|
1656
1686
|
interface ExternalMemoryStatus {
|
|
@@ -1661,6 +1691,22 @@ interface ExternalMemoryStatus {
|
|
|
1661
1691
|
interface NativeError {
|
|
1662
1692
|
kind: string;
|
|
1663
1693
|
message: string;
|
|
1694
|
+
/** The id of the file associated with the error */
|
|
1695
|
+
id?: string;
|
|
1696
|
+
/** The exporter associated with the error (for import/export errors) */
|
|
1697
|
+
exporter?: string;
|
|
1698
|
+
/** Location information (line, column, file) */
|
|
1699
|
+
loc?: NativeErrorLocation;
|
|
1700
|
+
/** Position in the source file in UTF-16 code units */
|
|
1701
|
+
pos?: number;
|
|
1702
|
+
}
|
|
1703
|
+
/** Location information for errors */
|
|
1704
|
+
interface NativeErrorLocation {
|
|
1705
|
+
/** 1-based */
|
|
1706
|
+
line: number;
|
|
1707
|
+
/** 0-based position in the line in UTF-16 code units */
|
|
1708
|
+
column: number;
|
|
1709
|
+
file?: string;
|
|
1664
1710
|
}
|
|
1665
1711
|
interface PreRenderedChunk {
|
|
1666
1712
|
name: string;
|
package/dist/shared/{bindingify-input-options-DcGFRvkp.mjs → bindingify-input-options-nvXYfbt3.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-
|
|
2
|
-
import { a as unreachable,
|
|
3
|
-
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-
|
|
4
|
-
import { t as parseAst } from "./parse-ast-index-
|
|
5
|
-
import { a as include, c as or, i as id, n as code, o as moduleType, r as exclude, t as and } from "./composable-filters-
|
|
1
|
+
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-By66Jt-E.mjs";
|
|
2
|
+
import { a as unreachable, o as unsupported, t as arraify } from "./misc-BubmxcE3.mjs";
|
|
3
|
+
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-FzNsMab1.mjs";
|
|
4
|
+
import { t as parseAst } from "./parse-ast-index-BZ4FJxMm.mjs";
|
|
5
|
+
import { a as include, c as or, i as id, n as code, o as moduleType, r as exclude, t as and } from "./composable-filters-G1eqjHFo.mjs";
|
|
6
6
|
import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
@@ -37,8 +37,13 @@ function normalizeBindingResult(container) {
|
|
|
37
37
|
}
|
|
38
38
|
function normalizeBindingError(e$1) {
|
|
39
39
|
return e$1.type === "JsError" ? e$1.field0 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
40
|
+
code: e$1.field0.kind,
|
|
40
41
|
kind: e$1.field0.kind,
|
|
41
42
|
message: e$1.field0.message,
|
|
43
|
+
id: e$1.field0.id,
|
|
44
|
+
exporter: e$1.field0.exporter,
|
|
45
|
+
loc: e$1.field0.loc,
|
|
46
|
+
pos: e$1.field0.pos,
|
|
42
47
|
stack: void 0
|
|
43
48
|
});
|
|
44
49
|
}
|
|
@@ -138,7 +143,7 @@ function e(e$1, t$2, n$1) {
|
|
|
138
143
|
|
|
139
144
|
//#endregion
|
|
140
145
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
141
|
-
function t(t$2, n$1, r) {
|
|
146
|
+
function t$1(t$2, n$1, r) {
|
|
142
147
|
let i = t$2.length - n$1.length;
|
|
143
148
|
if (i === 0) return t$2(...n$1);
|
|
144
149
|
if (i === 1) return e(t$2, n$1, r);
|
|
@@ -147,8 +152,8 @@ function t(t$2, n$1, r) {
|
|
|
147
152
|
|
|
148
153
|
//#endregion
|
|
149
154
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/partition-DAu403JQ.js
|
|
150
|
-
function t
|
|
151
|
-
return t(n, t$2);
|
|
155
|
+
function t(...t$2) {
|
|
156
|
+
return t$1(n, t$2);
|
|
152
157
|
}
|
|
153
158
|
const n = (e$1, t$2) => {
|
|
154
159
|
let n$1 = [[], []];
|
|
@@ -178,8 +183,8 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
178
183
|
let idExcludes = [];
|
|
179
184
|
let codeIncludes = [];
|
|
180
185
|
let codeExcludes = [];
|
|
181
|
-
if (id$1) [idIncludes, idExcludes] = t
|
|
182
|
-
if (code$1) [codeIncludes, codeExcludes] = t
|
|
186
|
+
if (id$1) [idIncludes, idExcludes] = t(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m) => m.kind === "include");
|
|
187
|
+
if (code$1) [codeIncludes, codeExcludes] = t(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m) => m.kind === "include");
|
|
183
188
|
ret.push(...idExcludes);
|
|
184
189
|
ret.push(...codeExcludes);
|
|
185
190
|
let andExprList = [];
|
|
@@ -383,7 +388,13 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
383
388
|
};
|
|
384
389
|
}
|
|
385
390
|
emitFile = (file) => {
|
|
386
|
-
if (file.type === "prebuilt-chunk") return
|
|
391
|
+
if (file.type === "prebuilt-chunk") return this.context.emitPrebuiltChunk({
|
|
392
|
+
fileName: file.fileName,
|
|
393
|
+
code: file.code,
|
|
394
|
+
exports: file.exports,
|
|
395
|
+
map: bindingifySourcemap(file.map),
|
|
396
|
+
sourcemapFileName: file.sourcemapFileName
|
|
397
|
+
});
|
|
387
398
|
if (file.type === "chunk") return this.context.emitChunk({
|
|
388
399
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(file.preserveSignature),
|
|
389
400
|
...file
|
|
@@ -1031,7 +1042,7 @@ var NormalizedInputOptionsImpl = class extends PlainObjectLike {
|
|
|
1031
1042
|
return this.inner.input;
|
|
1032
1043
|
}
|
|
1033
1044
|
get cwd() {
|
|
1034
|
-
return this.inner.cwd
|
|
1045
|
+
return this.inner.cwd;
|
|
1035
1046
|
}
|
|
1036
1047
|
get platform() {
|
|
1037
1048
|
return this.inner.platform;
|
|
@@ -1106,6 +1117,12 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1106
1117
|
get footer() {
|
|
1107
1118
|
return normalizeAddon(this.outputOptions.footer);
|
|
1108
1119
|
}
|
|
1120
|
+
get postBanner() {
|
|
1121
|
+
return normalizeAddon(this.outputOptions.postBanner);
|
|
1122
|
+
}
|
|
1123
|
+
get postFooter() {
|
|
1124
|
+
return normalizeAddon(this.outputOptions.postFooter);
|
|
1125
|
+
}
|
|
1109
1126
|
get intro() {
|
|
1110
1127
|
return normalizeAddon(this.outputOptions.intro);
|
|
1111
1128
|
}
|
|
@@ -1187,6 +1204,8 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "inlineDynamicImpo
|
|
|
1187
1204
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "externalLiveBindings", null);
|
|
1188
1205
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "banner", null);
|
|
1189
1206
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "footer", null);
|
|
1207
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "postBanner", null);
|
|
1208
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "postFooter", null);
|
|
1190
1209
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "intro", null);
|
|
1191
1210
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "outro", null);
|
|
1192
1211
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "esModule", null);
|
|
@@ -1391,10 +1410,10 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
1391
1410
|
tsconfig: inputOptions.resolve?.tsconfigFilename ?? inputOptions.tsconfig
|
|
1392
1411
|
};
|
|
1393
1412
|
}
|
|
1394
|
-
function
|
|
1395
|
-
if (
|
|
1396
|
-
if (typeof
|
|
1397
|
-
return
|
|
1413
|
+
function bindingifyDevMode(devMode) {
|
|
1414
|
+
if (devMode) {
|
|
1415
|
+
if (typeof devMode === "boolean") return devMode ? {} : void 0;
|
|
1416
|
+
return devMode;
|
|
1398
1417
|
}
|
|
1399
1418
|
}
|
|
1400
1419
|
function bindingifyAttachDebugInfo(attachDebugInfo) {
|
|
@@ -1430,7 +1449,7 @@ function bindingifyExperimental(experimental) {
|
|
|
1430
1449
|
disableLiveBindings: experimental?.disableLiveBindings,
|
|
1431
1450
|
viteMode: experimental?.viteMode,
|
|
1432
1451
|
resolveNewUrlToAsset: experimental?.resolveNewUrlToAsset,
|
|
1433
|
-
|
|
1452
|
+
devMode: bindingifyDevMode(experimental?.devMode),
|
|
1434
1453
|
attachDebugInfo: bindingifyAttachDebugInfo(experimental?.attachDebugInfo),
|
|
1435
1454
|
chunkModulesOrder,
|
|
1436
1455
|
chunkImportMap: experimental?.chunkImportMap,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, h as BindingViteBuildImportAnalysisPluginConfig, i as BindingEsmExternalRequirePluginConfig, k as BindingViteWasmHelperPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteAssetImportMetaUrlPluginConfig, v as BindingViteDynamicImportVarsPluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteHtmlInlineProxyPluginConfig } from "./binding-r9j8jqRV.mjs";
|
|
2
|
+
import { t as BuiltinPlugin, u as StringOrRegExp } from "./utils-CMDrspre.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -9,13 +9,13 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
|
|
|
9
9
|
};
|
|
10
10
|
declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
11
11
|
declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
|
|
12
|
-
declare function viteReporterPlugin(config
|
|
13
|
-
declare function viteWasmHelperPlugin(config
|
|
12
|
+
declare function viteReporterPlugin(config: BindingViteReporterPluginConfig): BuiltinPlugin;
|
|
13
|
+
declare function viteWasmHelperPlugin(config: BindingViteWasmHelperPluginConfig): BuiltinPlugin;
|
|
14
14
|
declare function viteWasmFallbackPlugin(): BuiltinPlugin;
|
|
15
15
|
declare function viteLoadFallbackPlugin(): BuiltinPlugin;
|
|
16
|
-
declare function viteJsonPlugin(config
|
|
16
|
+
declare function viteJsonPlugin(config: BindingViteJsonPluginConfig): BuiltinPlugin;
|
|
17
17
|
declare function viteBuildImportAnalysisPlugin(config: BindingViteBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
18
|
-
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
18
|
+
declare function viteResolvePlugin(config: Omit<BindingViteResolvePluginConfig, "yarnPnp">): BuiltinPlugin;
|
|
19
19
|
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
20
20
|
declare function viteWebWorkerPostPlugin(): BuiltinPlugin;
|
|
21
21
|
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-FzNsMab1.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -33,7 +33,10 @@ function viteBuildImportAnalysisPlugin(config) {
|
|
|
33
33
|
return new BuiltinPlugin("builtin:vite-build-import-analysis", config);
|
|
34
34
|
}
|
|
35
35
|
function viteResolvePlugin(config) {
|
|
36
|
-
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve",
|
|
36
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve", {
|
|
37
|
+
...config,
|
|
38
|
+
yarnPnp: typeof process === "object" && !!process.versions?.pnp
|
|
39
|
+
}));
|
|
37
40
|
}
|
|
38
41
|
function isolatedDeclarationPlugin(config) {
|
|
39
42
|
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
@@ -42,7 +45,9 @@ function viteWebWorkerPostPlugin() {
|
|
|
42
45
|
return new BuiltinPlugin("builtin:vite-web-worker-post");
|
|
43
46
|
}
|
|
44
47
|
function esmExternalRequirePlugin(config) {
|
|
45
|
-
|
|
48
|
+
const plugin = new BuiltinPlugin("builtin:esm-external-require", config);
|
|
49
|
+
plugin.enforce = "pre";
|
|
50
|
+
return plugin;
|
|
46
51
|
}
|
|
47
52
|
function viteReactRefreshWrapperPlugin(config) {
|
|
48
53
|
if (config) {
|