@rolldown/browser 1.0.0-beta.59 → 1.0.0-beta.60
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 +32 -32
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +7 -7
- package/dist/{constructors-c0HHH7Qq.js → constructors-CPMzz58l.js} +2 -8
- package/dist/experimental-index.browser.mjs +4 -37
- package/dist/experimental-index.d.mts +5 -63
- package/dist/experimental-index.mjs +6 -39
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -2
- package/dist/get-log-filter.d.mts +1 -1
- package/dist/index.browser.mjs +6 -6
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -11
- package/dist/normalize-string-or-regex-DcX5TPjK.js +247 -0
- 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.wasi-browser.js +0 -1
- package/dist/rolldown-binding.wasi.cjs +0 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-Bfw5c2c3.js → rolldown-build-Zb6e1FlF.js} +657 -78
- package/dist/shared/{binding-MAEzB4KA.d.mts → binding-CAB1xlCZ.d.mts} +58 -134
- package/dist/shared/{bindingify-input-options-BTd8uAdf.mjs → bindingify-input-options-C4xVxTKf.mjs} +600 -50
- package/dist/shared/{composable-filters-C5qA4jo-.mjs → composable-filters-DmVadxLf.mjs} +41 -20
- package/dist/shared/{constructors-CQP6o3cR.d.mts → constructors-D_KDVVwY.d.mts} +3 -5
- package/dist/shared/{constructors-C8tBnLHP.mjs → constructors-KqJrL3Ok.mjs} +2 -8
- package/dist/shared/{define-config-CpZLzJD0.d.mts → define-config-CUEbSpq4.d.mts} +954 -408
- package/dist/shared/{load-config-cKGxDu4K.mjs → load-config-DN8SQL2o.mjs} +1 -1
- package/dist/shared/{logging-B4x9qar8.d.mts → logging-DGAQcdLz.d.mts} +4 -0
- package/dist/shared/{logs-DEfpOy5A.mjs → logs-cXucB9vK.mjs} +8 -8
- package/dist/shared/normalize-string-or-regex-Bn5eoSii.mjs +60 -0
- package/dist/shared/{parse-ast-index-BLdgtc2B.mjs → parse-ast-index-B54CTqgh.mjs} +2 -2
- package/dist/shared/{prompt-CNt8OM9C.mjs → prompt-D80rO-gq.mjs} +220 -220
- package/dist/shared/{rolldown-8m9pjMU2.mjs → rolldown-BhEWsQWt.mjs} +1 -1
- package/dist/shared/{rolldown-build-DKF_S8hw.mjs → rolldown-build-PEQvqPGC.mjs} +46 -35
- package/dist/shared/{utils-BGxZdOXA.d.mts → utils-0UHbNgk4.d.mts} +2 -11
- package/dist/shared/{watch-BEzOq0zm.mjs → watch-avpeg13R.mjs} +11 -12
- package/package.json +1 -1
- package/dist/normalize-string-or-regex-BB1FWNyl.js +0 -872
- package/dist/shared/misc-BubmxcE3.mjs +0 -22
- package/dist/shared/normalize-string-or-regex-DJ5EwPtg.mjs +0 -669
- /package/dist/shared/{define-config-BF4P-Pum.mjs → define-config-DrUTwApf.mjs} +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./shared/
|
|
6
|
-
import "./shared/parse-ast-index-
|
|
7
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
8
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-avpeg13R.mjs";
|
|
2
|
+
import "./shared/normalize-string-or-regex-Bn5eoSii.mjs";
|
|
3
|
+
import { C as description, w as version } from "./shared/bindingify-input-options-C4xVxTKf.mjs";
|
|
4
|
+
import { h as arraify } from "./shared/composable-filters-DmVadxLf.mjs";
|
|
5
|
+
import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-PEQvqPGC.mjs";
|
|
6
|
+
import "./shared/parse-ast-index-B54CTqgh.mjs";
|
|
7
|
+
import { t as rolldown } from "./shared/rolldown-BhEWsQWt.mjs";
|
|
8
|
+
import { t as loadConfig } from "./shared/load-config-DN8SQL2o.mjs";
|
|
9
9
|
import path, { sep } from "node:path";
|
|
10
10
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
11
11
|
import process$1 from "node:process";
|
|
@@ -649,20 +649,20 @@ function box(text, _opts = {}) {
|
|
|
649
649
|
//#endregion
|
|
650
650
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
651
651
|
const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
|
|
652
|
-
get(e, s
|
|
653
|
-
return i()[s
|
|
652
|
+
get(e, s) {
|
|
653
|
+
return i()[s] ?? r[s];
|
|
654
654
|
},
|
|
655
|
-
has(e, s
|
|
656
|
-
return s
|
|
655
|
+
has(e, s) {
|
|
656
|
+
return s in i() || s in r;
|
|
657
657
|
},
|
|
658
|
-
set(e, s
|
|
658
|
+
set(e, s, E) {
|
|
659
659
|
const B = i(true);
|
|
660
|
-
return B[s
|
|
660
|
+
return B[s] = E, true;
|
|
661
661
|
},
|
|
662
|
-
deleteProperty(e, s
|
|
663
|
-
if (!s
|
|
662
|
+
deleteProperty(e, s) {
|
|
663
|
+
if (!s) return false;
|
|
664
664
|
const E = i(true);
|
|
665
|
-
return delete E[s
|
|
665
|
+
return delete E[s], true;
|
|
666
666
|
},
|
|
667
667
|
ownKeys() {
|
|
668
668
|
const e = i(true);
|
|
@@ -761,8 +761,8 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
|
|
|
761
761
|
];
|
|
762
762
|
function b() {
|
|
763
763
|
if (globalThis.process?.env) for (const e of f) {
|
|
764
|
-
const s
|
|
765
|
-
if (globalThis.process?.env[s
|
|
764
|
+
const s = e[1] || e[0];
|
|
765
|
+
if (globalThis.process?.env[s]) return {
|
|
766
766
|
name: e[0].toLowerCase(),
|
|
767
767
|
...e[2]
|
|
768
768
|
};
|
|
@@ -787,10 +787,10 @@ const A = /^win/i.test(I);
|
|
|
787
787
|
const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
|
|
788
788
|
Number(C?.split(".")[0]);
|
|
789
789
|
const y = globalThis.process || Object.create(null), _ = { versions: {} };
|
|
790
|
-
new Proxy(y, { get(e, s
|
|
791
|
-
if (s
|
|
792
|
-
if (s
|
|
793
|
-
if (s
|
|
790
|
+
new Proxy(y, { get(e, s) {
|
|
791
|
+
if (s === "env") return o;
|
|
792
|
+
if (s in e) return e[s];
|
|
793
|
+
if (s in _) return _[s];
|
|
794
794
|
} });
|
|
795
795
|
const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
|
|
796
796
|
[S, "netlify"],
|
|
@@ -802,7 +802,7 @@ const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun ||
|
|
|
802
802
|
[c, "node"]
|
|
803
803
|
];
|
|
804
804
|
function G() {
|
|
805
|
-
const e = F.find((s
|
|
805
|
+
const e = F.find((s) => s[0]);
|
|
806
806
|
if (e) return { name: e[1] };
|
|
807
807
|
}
|
|
808
808
|
G()?.name;
|
|
@@ -878,7 +878,7 @@ const LEVEL_COLOR_MAP = {
|
|
|
878
878
|
1: "yellow"
|
|
879
879
|
};
|
|
880
880
|
const unicode = isUnicodeSupported();
|
|
881
|
-
const s = (c
|
|
881
|
+
const s = (c, fallback) => unicode ? c : fallback;
|
|
882
882
|
const TYPE_ICONS = {
|
|
883
883
|
error: s("✖", "×"),
|
|
884
884
|
fatal: s("✖", "×"),
|
|
@@ -900,7 +900,7 @@ var FancyReporter = class extends BasicReporter {
|
|
|
900
900
|
formatStack(stack, message, opts) {
|
|
901
901
|
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
902
902
|
return `
|
|
903
|
-
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_
|
|
903
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join(`
|
|
904
904
|
${indent}`);
|
|
905
905
|
}
|
|
906
906
|
formatType(logObj, isBadge, opts) {
|
|
@@ -934,7 +934,7 @@ ${indent}`);
|
|
|
934
934
|
}
|
|
935
935
|
};
|
|
936
936
|
function characterFormat(str) {
|
|
937
|
-
return str.replace(/`([^`]+)`/gm, (_
|
|
937
|
+
return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
|
|
938
938
|
}
|
|
939
939
|
function getColor(color = "white") {
|
|
940
940
|
return colors[color] || colors.white;
|
|
@@ -950,7 +950,7 @@ function createConsola(options$1 = {}) {
|
|
|
950
950
|
defaults: { level },
|
|
951
951
|
stdout: process.stdout,
|
|
952
952
|
stderr: process.stderr,
|
|
953
|
-
prompt: (...args) => import("./shared/prompt-
|
|
953
|
+
prompt: (...args) => import("./shared/prompt-D80rO-gq.mjs").then((m) => m.prompt(...args)),
|
|
954
954
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
955
955
|
...options$1
|
|
956
956
|
});
|
|
@@ -1237,7 +1237,7 @@ function getClearScreenFunction(options$1) {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
//#endregion
|
|
1240
|
-
//#region \0@oxc-project+runtime@0.
|
|
1240
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/usingCtx.js
|
|
1241
1241
|
function _usingCtx() {
|
|
1242
1242
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1243
1243
|
var n$2 = Error();
|
|
@@ -1301,11 +1301,11 @@ async function bundleWithConfig(configPath, cliOptions, rawArgs = {}) {
|
|
|
1301
1301
|
process.env.ROLLDOWN_WATCH = "true";
|
|
1302
1302
|
}
|
|
1303
1303
|
const config = await loadConfig(configPath);
|
|
1304
|
-
|
|
1305
|
-
|
|
1304
|
+
const resolvedConfig = typeof config === "function" ? await config(rawArgs) : config;
|
|
1305
|
+
if (typeof resolvedConfig !== "object" || resolvedConfig === null) {
|
|
1306
|
+
logger.error(`Invalid configuration from ${configPath}: expected object or array, got ${resolvedConfig}`);
|
|
1306
1307
|
process.exit(1);
|
|
1307
1308
|
}
|
|
1308
|
-
const resolvedConfig = typeof config === "function" ? await config(rawArgs) : config;
|
|
1309
1309
|
if (cliOptions.watch) await watchInner(resolvedConfig, cliOptions);
|
|
1310
1310
|
else await bundleInner(resolvedConfig, cliOptions);
|
|
1311
1311
|
}
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as defineConfig, t as ConfigExport } from "./shared/define-config-CUEbSpq4.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/load-config.d.ts
|
|
4
4
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/parse-ast-index-
|
|
5
|
-
import "./shared/rolldown-
|
|
6
|
-
import { t as defineConfig } from "./shared/define-config-
|
|
7
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
1
|
+
import "./shared/normalize-string-or-regex-Bn5eoSii.mjs";
|
|
2
|
+
import { w as version } from "./shared/bindingify-input-options-C4xVxTKf.mjs";
|
|
3
|
+
import "./shared/rolldown-build-PEQvqPGC.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-B54CTqgh.mjs";
|
|
5
|
+
import "./shared/rolldown-BhEWsQWt.mjs";
|
|
6
|
+
import { t as defineConfig } from "./shared/define-config-DrUTwApf.mjs";
|
|
7
|
+
import { t as loadConfig } from "./shared/load-config-DN8SQL2o.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/config.ts
|
|
10
10
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DcX5TPjK.js";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -56,12 +56,6 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
56
56
|
}
|
|
57
57
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
58
58
|
}
|
|
59
|
-
function viteHtmlInlineProxyPlugin(config) {
|
|
60
|
-
return new BuiltinPlugin("builtin:vite-html-inline-proxy", config);
|
|
61
|
-
}
|
|
62
|
-
function viteAssetImportMetaUrlPlugin(config) {
|
|
63
|
-
return new BuiltinPlugin("builtin:vite-asset-import-meta-url", config);
|
|
64
|
-
}
|
|
65
59
|
|
|
66
60
|
//#endregion
|
|
67
|
-
export {
|
|
61
|
+
export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWasmHelperPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as unwrapBindingResult, c as
|
|
3
|
-
import { a as
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DcX5TPjK.js";
|
|
2
|
+
import { a as unwrapBindingResult, c as transformToRollupOutput, i as normalizeBindingResult, l as validateOption, n as createBundlerOptions, o as parse, s as parseSync, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-Zb6e1FlF.js";
|
|
3
|
+
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWasmHelperPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./constructors-CPMzz58l.js";
|
|
4
4
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
5
5
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime, transform, transformSync } from "./rolldown-binding.wasi-browser.js";
|
|
6
6
|
|
|
@@ -194,12 +194,6 @@ function viteAliasPlugin(config) {
|
|
|
194
194
|
return new BuiltinPlugin("builtin:vite-alias", config);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/builtin-plugin/asset-plugin.ts
|
|
199
|
-
function viteAssetPlugin(config) {
|
|
200
|
-
return new BuiltinPlugin("builtin:vite-asset", config);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
197
|
//#endregion
|
|
204
198
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
205
199
|
function viteTransformPlugin(config) {
|
|
@@ -213,33 +207,6 @@ function viteTransformPlugin(config) {
|
|
|
213
207
|
});
|
|
214
208
|
}
|
|
215
209
|
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region src/builtin-plugin/vite-css-plugin.ts
|
|
218
|
-
function viteCSSPlugin(config) {
|
|
219
|
-
return new BuiltinPlugin("builtin:vite-css", config ? {
|
|
220
|
-
...config,
|
|
221
|
-
async compileCSS(url, importer, resolver) {
|
|
222
|
-
let result = await config.compileCSS(url, importer, resolver);
|
|
223
|
-
return {
|
|
224
|
-
...result,
|
|
225
|
-
map: bindingifySourcemap(result.map)
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
} : void 0);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
//#endregion
|
|
232
|
-
//#region src/builtin-plugin/vite-css-post-plugin.ts
|
|
233
|
-
function viteCSSPostPlugin(config) {
|
|
234
|
-
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
//#endregion
|
|
238
|
-
//#region src/builtin-plugin/vite-html-plugin.ts
|
|
239
|
-
function viteHtmlPlugin(config) {
|
|
240
|
-
return new BuiltinPlugin("builtin:vite-html", config);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
210
|
//#endregion
|
|
244
211
|
//#region src/builtin-plugin/vite-manifest-plugin.ts
|
|
245
212
|
function viteManifestPlugin(config) {
|
|
@@ -281,4 +248,4 @@ const memfs = {
|
|
|
281
248
|
};
|
|
282
249
|
|
|
283
250
|
//#endregion
|
|
284
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin,
|
|
251
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
4
|
-
import { a as
|
|
1
|
+
import { A as MinifyResult, B as isolatedDeclaration, D as IsolatedDeclarationsResult, E as IsolatedDeclarationsOptions, F as ResolveResult, G as transform, H as minify, I as ResolverFactory, K as transformSync, L as TransformOptions, M as ParseResult, N as ParserOptions, R as TransformResult, U as minifySync, V as isolatedDeclarationSync, W as moduleRunnerTransform, c as BindingRebuildStrategy, g as BindingViteManifestPluginConfig, j as NapiResolveOptions, k as MinifyOptions, n as BindingBundleState, r as BindingClientHmrUpdate, x as BindingViteTransformPluginConfig, z as createTokioRuntime } from "./shared/binding-CAB1xlCZ.mjs";
|
|
2
|
+
import { Nt as freeExternalMemory, Tt as OutputOptions, W as defineParallelPlugin, c as InputOptions, jt as RolldownOutput, tt as NormalizedOutputOptions } from "./shared/define-config-CUEbSpq4.mjs";
|
|
3
|
+
import { t as BuiltinPlugin } from "./shared/utils-0UHbNgk4.mjs";
|
|
4
|
+
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWasmHelperPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-D_KDVVwY.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/api/dev/dev-options.d.ts
|
|
7
7
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -130,9 +130,6 @@ type ViteAliasPluginConfig = {
|
|
|
130
130
|
};
|
|
131
131
|
declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
|
|
132
132
|
//#endregion
|
|
133
|
-
//#region src/builtin-plugin/asset-plugin.d.ts
|
|
134
|
-
declare function viteAssetPlugin(config: BindingViteAssetPluginConfig): BuiltinPlugin;
|
|
135
|
-
//#endregion
|
|
136
133
|
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
137
134
|
type TransformPattern = string | RegExp | readonly (RegExp | string)[];
|
|
138
135
|
type TransformPluginConfig = Omit<BindingViteTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude" | "yarnPnp"> & {
|
|
@@ -143,61 +140,6 @@ type TransformPluginConfig = Omit<BindingViteTransformPluginConfig, "include" |
|
|
|
143
140
|
};
|
|
144
141
|
declare function viteTransformPlugin(config: TransformPluginConfig): BuiltinPlugin;
|
|
145
142
|
//#endregion
|
|
146
|
-
//#region src/builtin-plugin/vite-css-plugin.d.ts
|
|
147
|
-
type ViteCssPluginConfig = Omit<BindingViteCssPluginConfig, "compileCSS"> & {
|
|
148
|
-
compileCSS: (url: string, importer: string, resolver: BindingUrlResolver) => Promise<{
|
|
149
|
-
code: string;
|
|
150
|
-
map?: SourceMapInput;
|
|
151
|
-
modules?: Record<string, string>;
|
|
152
|
-
deps?: Set<string>;
|
|
153
|
-
}>;
|
|
154
|
-
};
|
|
155
|
-
declare function viteCSSPlugin(config: ViteCssPluginConfig): BuiltinPlugin;
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/builtin-plugin/vite-css-post-plugin.d.ts
|
|
158
|
-
type ViteCssPostPluginConfig = Omit<BindingViteCssPostPluginConfig, "cssScopeTo" | "isLegacy"> & {
|
|
159
|
-
isOutputOptionsForLegacyChunks?: (outputOptions: NormalizedOutputOptions) => boolean;
|
|
160
|
-
};
|
|
161
|
-
declare function viteCSSPostPlugin(config: ViteCssPostPluginConfig): BuiltinPlugin;
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/builtin-plugin/vite-html-plugin.d.ts
|
|
164
|
-
interface HtmlTagDescriptor {
|
|
165
|
-
tag: string;
|
|
166
|
-
/**
|
|
167
|
-
* attribute values will be escaped automatically if needed
|
|
168
|
-
*/
|
|
169
|
-
attrs?: Record<string, string | boolean | undefined>;
|
|
170
|
-
children?: string | HtmlTagDescriptor[];
|
|
171
|
-
/**
|
|
172
|
-
* default: 'head-prepend'
|
|
173
|
-
*/
|
|
174
|
-
injectTo?: "head" | "body" | "head-prepend" | "body-prepend";
|
|
175
|
-
}
|
|
176
|
-
type IndexHtmlTransformResult = string | HtmlTagDescriptor[] | {
|
|
177
|
-
html: string;
|
|
178
|
-
tags: HtmlTagDescriptor[];
|
|
179
|
-
};
|
|
180
|
-
type IndexHtmlTransformHook = (this: MinimalPluginContext, html: string, ctx: IndexHtmlTransformContext) => IndexHtmlTransformResult | void | Promise<IndexHtmlTransformResult | void>;
|
|
181
|
-
interface IndexHtmlTransformContext {
|
|
182
|
-
/**
|
|
183
|
-
* public path when served
|
|
184
|
-
*/
|
|
185
|
-
path: string;
|
|
186
|
-
/**
|
|
187
|
-
* filename on disk
|
|
188
|
-
*/
|
|
189
|
-
filename: string;
|
|
190
|
-
bundle?: OutputBundle;
|
|
191
|
-
chunk?: OutputChunk;
|
|
192
|
-
}
|
|
193
|
-
interface ViteHtmlPluginOptions extends Omit<BindingViteHtmlPluginConfig, "transformIndexHtml" | "setModuleSideEffects"> {
|
|
194
|
-
preHooks: IndexHtmlTransformHook[];
|
|
195
|
-
normalHooks: IndexHtmlTransformHook[];
|
|
196
|
-
postHooks: IndexHtmlTransformHook[];
|
|
197
|
-
applyHtmlTransforms: (html: string, hooks: IndexHtmlTransformHook[], pluginContext: MinimalPluginContext, ctx: IndexHtmlTransformContext) => Promise<string>;
|
|
198
|
-
}
|
|
199
|
-
declare function viteHtmlPlugin(config: ViteHtmlPluginOptions): BuiltinPlugin;
|
|
200
|
-
//#endregion
|
|
201
143
|
//#region src/builtin-plugin/vite-manifest-plugin.d.ts
|
|
202
144
|
type ViteManifestPluginConfig = Omit<BindingViteManifestPluginConfig, "isLegacy"> & {
|
|
203
145
|
isOutputOptionsForLegacyChunks?: (outputOptions: NormalizedOutputOptions) => boolean;
|
|
@@ -237,4 +179,4 @@ declare const memfs: {
|
|
|
237
179
|
volume: any;
|
|
238
180
|
} | undefined;
|
|
239
181
|
//#endregion
|
|
240
|
-
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult,
|
|
182
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as parseSync, r as parse } from "./shared/parse-ast-index-
|
|
5
|
-
import { a as
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-Bn5eoSii.mjs";
|
|
2
|
+
import { c as transformToRollupOutput, o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-C4xVxTKf.mjs";
|
|
3
|
+
import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-PEQvqPGC.mjs";
|
|
4
|
+
import { i as parseSync, r as parse } from "./shared/parse-ast-index-B54CTqgh.mjs";
|
|
5
|
+
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWasmHelperPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-KqJrL3Ok.mjs";
|
|
6
6
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime, transform, transformSync } from "./rolldown-binding.wasi.cjs";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
|
|
@@ -201,12 +201,6 @@ function viteAliasPlugin(config) {
|
|
|
201
201
|
return new BuiltinPlugin("builtin:vite-alias", config);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/builtin-plugin/asset-plugin.ts
|
|
206
|
-
function viteAssetPlugin(config) {
|
|
207
|
-
return new BuiltinPlugin("builtin:vite-asset", config);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
204
|
//#endregion
|
|
211
205
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
212
206
|
function viteTransformPlugin(config) {
|
|
@@ -220,33 +214,6 @@ function viteTransformPlugin(config) {
|
|
|
220
214
|
});
|
|
221
215
|
}
|
|
222
216
|
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/builtin-plugin/vite-css-plugin.ts
|
|
225
|
-
function viteCSSPlugin(config) {
|
|
226
|
-
return new BuiltinPlugin("builtin:vite-css", config ? {
|
|
227
|
-
...config,
|
|
228
|
-
async compileCSS(url, importer, resolver) {
|
|
229
|
-
let result = await config.compileCSS(url, importer, resolver);
|
|
230
|
-
return {
|
|
231
|
-
...result,
|
|
232
|
-
map: bindingifySourcemap(result.map)
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
} : void 0);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
//#endregion
|
|
239
|
-
//#region src/builtin-plugin/vite-css-post-plugin.ts
|
|
240
|
-
function viteCSSPostPlugin(config) {
|
|
241
|
-
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/builtin-plugin/vite-html-plugin.ts
|
|
246
|
-
function viteHtmlPlugin(config) {
|
|
247
|
-
return new BuiltinPlugin("builtin:vite-html", config);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
217
|
//#endregion
|
|
251
218
|
//#region src/builtin-plugin/vite-manifest-plugin.ts
|
|
252
219
|
function viteManifestPlugin(config) {
|
|
@@ -285,4 +252,4 @@ function viteManifestPlugin(config) {
|
|
|
285
252
|
const memfs = void 0;
|
|
286
253
|
|
|
287
254
|
//#endregion
|
|
288
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin,
|
|
255
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
package/dist/filter-index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as id, c as interpreter, d as not, f as or, i as exprInterpreter, l as interpreterImpl, m as query, n as code, o as importerId, p as queries, r as exclude, s as include, t as and, u as moduleType } from "./shared/composable-filters-C5qA4jo-.mjs";
|
|
1
|
+
import { a as id, c as interpreter, d as not, f as or, g as isPromiseLike, h as arraify, i as exprInterpreter, l as interpreterImpl, m as query, n as code, o as importerId, p as queries, r as exclude, s as include, t as and, u as moduleType } from "./shared/composable-filters-DmVadxLf.mjs";
|
|
3
2
|
|
|
4
3
|
//#region ../pluginutils/dist/filter/filter-vite-plugins.js
|
|
5
4
|
/**
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as logMultiplyNotifyOption } from "./normalize-string-or-regex-DcX5TPjK.js";
|
|
2
|
+
import { d as LOG_LEVEL_WARN, f as arraify, l as validateOption, n as createBundlerOptions, p as VERSION, r as aggregateBindingErrorsIntoJsError, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-Zb6e1FlF.js";
|
|
3
3
|
import { BindingMagicString, BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
@@ -15,12 +15,12 @@ async function build(options) {
|
|
|
15
15
|
if (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));
|
|
16
16
|
else {
|
|
17
17
|
const { output, write = true, ...inputOptions } = options;
|
|
18
|
-
const build
|
|
18
|
+
const build = await rolldown(inputOptions);
|
|
19
19
|
try {
|
|
20
|
-
if (write) return await build
|
|
21
|
-
else return await build
|
|
20
|
+
if (write) return await build.write(output);
|
|
21
|
+
else return await build.generate(output);
|
|
22
22
|
} finally {
|
|
23
|
-
await build
|
|
23
|
+
await build.close();
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import {
|
|
5
|
-
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
|
1
|
+
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-DGAQcdLz.mjs";
|
|
2
|
+
import { P as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-CAB1xlCZ.mjs";
|
|
3
|
+
import { $ as RolldownFsModule, A as TransformResult, At as RenderedModule, B as EmittedPrebuiltChunk, C as Plugin, Ct as MinifyOptions, D as RolldownPlugin, Dt as OutputAsset, E as ResolvedId, Et as PreRenderedAsset, F as OutputBundle, Ft as SourcemapIgnoreListOption, G as MinimalPluginContext, H as PluginContext, I as TreeshakingOptions, J as HookFilter, K as PluginContextMeta, L as TransformPluginContext, M as VERSION, Mt as SourceMap, N as ExistingRawSourceMap, O as RolldownPluginOption, Ot as OutputChunk, P as SourceMapInput, Pt as ModuleInfo, Q as RolldownFileStats, R as EmittedAsset, S as PartialResolvedId, St as GlobalsFunction, T as ResolveIdResult, Tt as OutputOptions, U as DefineParallelPluginResult, V as GetModuleInfo, X as BufferEncoding, Y as ModuleTypeFilter, Z as RolldownDirectoryEntry, _ as LoadResult, _t as ChunkFileNamesFunction, a as ExternalOption, at as LoggingFunction, b as ObjectHook, bt as GeneratedCodeOptions, c as InputOptions, ct as RolldownWatcher, d as WatcherOptions, dt as rolldown, et as InternalModuleFormat, f as AsyncPluginHooks, ft as RolldownBuild, g as ImportKind, gt as AdvancedChunksGroup, h as HookFilterExtension, ht as AddonFunction, i as RolldownOptions, it as ChecksOptions, jt as RolldownOutput, k as SourceDescription, kt as RenderedChunk, l as ModuleTypes, lt as RolldownWatcherEvent, m as FunctionPluginHooks, mt as build, n as RolldownOptionsFunction, nt as NormalizedInputOptions, o as ExternalOptionFunction, ot as WarningHandlerWithDefault, p as CustomPluginOptions, pt as BuildOptions, q as GeneralHookFilter, r as defineConfig, rt as TransformOptions, s as InputOption, st as watch, t as ConfigExport, tt as NormalizedOutputOptions, u as OptimizationOptions, ut as WatchOptions, v as ModuleOptions, vt as ChunkingContext, w as ResolveIdExtraOptions, wt as ModuleFormat, x as ParallelPluginHooks, xt as GeneratedCodePreset, y as ModuleType, yt as CodeSplittingGroup, z as EmittedFile } from "./shared/define-config-CUEbSpq4.mjs";
|
|
4
|
+
import { o as PartialNull } from "./shared/utils-0UHbNgk4.mjs";
|
|
5
|
+
export { AddonFunction, AdvancedChunksGroup, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, ExternalOptionFunction, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/
|
|
5
|
-
import "./shared/parse-ast-index-
|
|
6
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
7
|
-
import { t as defineConfig } from "./shared/define-config-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-avpeg13R.mjs";
|
|
2
|
+
import "./shared/normalize-string-or-regex-Bn5eoSii.mjs";
|
|
3
|
+
import { S as VERSION } from "./shared/bindingify-input-options-C4xVxTKf.mjs";
|
|
4
|
+
import "./shared/rolldown-build-PEQvqPGC.mjs";
|
|
5
|
+
import "./shared/parse-ast-index-B54CTqgh.mjs";
|
|
6
|
+
import { t as rolldown } from "./shared/rolldown-BhEWsQWt.mjs";
|
|
7
|
+
import { t as defineConfig } from "./shared/define-config-DrUTwApf.mjs";
|
|
8
8
|
import { isMainThread } from "node:worker_threads";
|
|
9
9
|
import { BindingMagicString, initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
10
10
|
|
|
@@ -22,12 +22,12 @@ async function build(options) {
|
|
|
22
22
|
if (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));
|
|
23
23
|
else {
|
|
24
24
|
const { output, write = true, ...inputOptions } = options;
|
|
25
|
-
const build
|
|
25
|
+
const build = await rolldown(inputOptions);
|
|
26
26
|
try {
|
|
27
|
-
if (write) return await build
|
|
28
|
-
else return await build
|
|
27
|
+
if (write) return await build.write(output);
|
|
28
|
+
else return await build.generate(output);
|
|
29
29
|
} finally {
|
|
30
|
-
await build
|
|
30
|
+
await build.close();
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|