@rolldown/browser 1.0.0-rc.6 → 1.0.0-rc.7
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 +10 -21
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +9 -10
- package/dist/{constructors-WyngiSlS.js → constructors-BgL_dmUe.js} +2 -4
- package/dist/{error-D4EjR7H_.js → error-DkAP_6fk.js} +1 -6
- package/dist/experimental-index.browser.mjs +22 -19
- package/dist/experimental-index.d.mts +18 -4
- package/dist/experimental-index.mjs +24 -21
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +2 -6
- package/dist/get-log-filter.mjs +1 -2
- package/dist/index.browser.mjs +67 -73
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +9 -12
- package/dist/{normalize-string-or-regex-B0X1hEA4.js → normalize-string-or-regex-TtAGUp42.js} +5 -11
- package/dist/parallel-plugin-worker.mjs +6 -8
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parallel-plugin.mjs +1 -2
- package/dist/parse-ast-index.mjs +3 -5
- package/dist/plugins-index.browser.mjs +3 -5
- package/dist/plugins-index.mjs +3 -5
- 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-DwnjyX40.js → rolldown-build-D97C-VhN.js} +440 -522
- package/dist/shared/{bindingify-input-options-CSIYh5O4.mjs → bindingify-input-options-kCVufQp0.mjs} +33 -56
- package/dist/shared/{composable-filters-C_jBPRPI.mjs → composable-filters-B2ByPP8y.mjs} +1 -4
- package/dist/shared/{constructors-B2viugwd.mjs → constructors-C7Kkidxk.mjs} +2 -4
- package/dist/shared/{define-config-DMEhSrNE.d.mts → define-config-Cci3IvO_.d.mts} +65 -29
- package/dist/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
- package/dist/shared/{error-DDzqVYr_.mjs → error-CQ6njWsV.mjs} +1 -4
- package/dist/shared/{load-config-CmC4WvoS.mjs → load-config-DNGVjxdv.mjs} +2 -4
- package/dist/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
- package/dist/shared/{normalize-string-or-regex-FTOVR1Jb.mjs → normalize-string-or-regex-CF3Uz6aU.mjs} +2 -5
- package/dist/shared/{parse-DIZtKd4C.mjs → parse-DDUnGYGU.mjs} +1 -4
- package/dist/shared/{prompt-B56gTa4S.mjs → prompt-BYQIwEjg.mjs} +1 -3
- package/dist/shared/{rolldown-D7O5_axp.mjs → rolldown-C9kn7lTZ.mjs} +2 -4
- package/dist/shared/{rolldown-build-BV90HQts.mjs → rolldown-build-8_xyZuDH.mjs} +423 -472
- package/dist/shared/{transform-D49mi4JH.mjs → transform-B_n5An0U.mjs} +2 -5
- package/dist/shared/{watch-COON6c2j.mjs → watch-dCFQWE8a.mjs} +69 -75
- package/dist/{transform-qJgOBSav.js → transform-UkHb5h4g.js} +2 -5
- package/dist/utils-index.browser.mjs +7 -16
- package/dist/utils-index.mjs +8 -17
- package/package.json +1 -1
- package/dist/cli-setup.d.mts +0 -1
- package/dist/cli-setup.mjs +0 -16
package/dist/cli.mjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import "./shared/normalize-string-or-regex-
|
|
3
|
-
import { S as version, x as description } from "./shared/bindingify-input-options-
|
|
4
|
-
import { h as arraify } from "./shared/composable-filters-
|
|
5
|
-
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText$1, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-
|
|
6
|
-
import "./shared/error-
|
|
7
|
-
import "./shared/parse-
|
|
8
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
9
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-dCFQWE8a.mjs";
|
|
2
|
+
import "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
|
|
3
|
+
import { S as version, x as description } from "./shared/bindingify-input-options-kCVufQp0.mjs";
|
|
4
|
+
import { h as arraify } from "./shared/composable-filters-B2ByPP8y.mjs";
|
|
5
|
+
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText$1, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-8_xyZuDH.mjs";
|
|
6
|
+
import "./shared/error-CQ6njWsV.mjs";
|
|
7
|
+
import "./shared/parse-DDUnGYGU.mjs";
|
|
8
|
+
import { t as rolldown } from "./shared/rolldown-C9kn7lTZ.mjs";
|
|
9
|
+
import { t as loadConfig } from "./shared/load-config-DNGVjxdv.mjs";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
12
12
|
import process$1 from "node:process";
|
|
13
13
|
import { performance } from "node:perf_hooks";
|
|
14
|
-
|
|
15
14
|
//#region src/cli/arguments/alias.ts
|
|
16
15
|
const alias = {
|
|
17
16
|
config: {
|
|
@@ -56,7 +55,6 @@ const alias = {
|
|
|
56
55
|
},
|
|
57
56
|
moduleTypes: { hint: "types" }
|
|
58
57
|
};
|
|
59
|
-
|
|
60
58
|
//#endregion
|
|
61
59
|
//#region src/cli/arguments/utils.ts
|
|
62
60
|
function setNestedProperty(obj, path, value) {
|
|
@@ -80,7 +78,6 @@ function camelCaseToKebabCase(str) {
|
|
|
80
78
|
function kebabCaseToCamelCase(str) {
|
|
81
79
|
return str.replace(/-./g, (match) => match[1].toUpperCase());
|
|
82
80
|
}
|
|
83
|
-
|
|
84
81
|
//#endregion
|
|
85
82
|
//#region src/cli/arguments/normalize.ts
|
|
86
83
|
function normalizeCliOptions(cliOptions, positionals) {
|
|
@@ -134,7 +131,6 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
134
131
|
else result.input.input = positionals;
|
|
135
132
|
return result;
|
|
136
133
|
}
|
|
137
|
-
|
|
138
134
|
//#endregion
|
|
139
135
|
//#region src/cli/arguments/index.ts
|
|
140
136
|
const schemaInfo = getCliSchemaInfo();
|
|
@@ -255,7 +251,6 @@ function parseCliArguments() {
|
|
|
255
251
|
rawArgs
|
|
256
252
|
};
|
|
257
253
|
}
|
|
258
|
-
|
|
259
254
|
//#endregion
|
|
260
255
|
//#region src/utils/clear-screen.ts
|
|
261
256
|
const CLEAR_SCREEN = "\x1Bc";
|
|
@@ -266,7 +261,6 @@ function getClearScreenFunction(options) {
|
|
|
266
261
|
process.stdout.write(CLEAR_SCREEN);
|
|
267
262
|
};
|
|
268
263
|
}
|
|
269
|
-
|
|
270
264
|
//#endregion
|
|
271
265
|
//#region \0@oxc-project+runtime@0.115.0/helpers/usingCtx.js
|
|
272
266
|
function _usingCtx() {
|
|
@@ -323,7 +317,6 @@ function _usingCtx() {
|
|
|
323
317
|
}
|
|
324
318
|
};
|
|
325
319
|
}
|
|
326
|
-
|
|
327
320
|
//#endregion
|
|
328
321
|
//#region src/cli/commands/bundle.ts
|
|
329
322
|
async function bundleWithConfig(configPath, cliOptions, rawArgs = {}) {
|
|
@@ -500,7 +493,6 @@ function relativeId(id) {
|
|
|
500
493
|
if (!path.isAbsolute(id)) return id;
|
|
501
494
|
return path.relative(path.resolve(), id);
|
|
502
495
|
}
|
|
503
|
-
|
|
504
496
|
//#endregion
|
|
505
497
|
//#region src/cli/commands/help.ts
|
|
506
498
|
const examples = [
|
|
@@ -573,7 +565,6 @@ function generateHelpText() {
|
|
|
573
565
|
function showHelp() {
|
|
574
566
|
logger.log(generateHelpText());
|
|
575
567
|
}
|
|
576
|
-
|
|
577
568
|
//#endregion
|
|
578
569
|
//#region src/cli/version-check.ts
|
|
579
570
|
function checkNodeVersion(nodeVersion) {
|
|
@@ -582,7 +573,6 @@ function checkNodeVersion(nodeVersion) {
|
|
|
582
573
|
const minor = parseInt(currentVersion[1], 10);
|
|
583
574
|
return major === 20 && minor >= 19 || major === 22 && minor >= 12 || major > 22;
|
|
584
575
|
}
|
|
585
|
-
|
|
586
576
|
//#endregion
|
|
587
577
|
//#region src/cli/index.ts
|
|
588
578
|
if (!checkNodeVersion(process$1.versions.node)) logger.warn(`You are using Node.js ${process$1.versions.node}. Rolldown requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.`);
|
|
@@ -613,6 +603,5 @@ main().catch((err) => {
|
|
|
613
603
|
logger.error(err);
|
|
614
604
|
process$1.exit(1);
|
|
615
605
|
});
|
|
616
|
-
|
|
617
606
|
//#endregion
|
|
618
|
-
export {
|
|
607
|
+
export {};
|
package/dist/config.d.mts
CHANGED
package/dist/config.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "./shared/normalize-string-or-regex-
|
|
2
|
-
import { b as VERSION } from "./shared/bindingify-input-options-
|
|
3
|
-
import "./shared/rolldown-build-
|
|
4
|
-
import "./shared/error-
|
|
5
|
-
import "./shared/parse-
|
|
6
|
-
import "./shared/rolldown-
|
|
7
|
-
import { t as defineConfig } from "./shared/define-config-
|
|
8
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
9
|
-
|
|
10
|
-
export { VERSION, defineConfig, loadConfig };
|
|
1
|
+
import "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
|
|
2
|
+
import { b as VERSION } from "./shared/bindingify-input-options-kCVufQp0.mjs";
|
|
3
|
+
import "./shared/rolldown-build-8_xyZuDH.mjs";
|
|
4
|
+
import "./shared/error-CQ6njWsV.mjs";
|
|
5
|
+
import "./shared/parse-DDUnGYGU.mjs";
|
|
6
|
+
import "./shared/rolldown-C9kn7lTZ.mjs";
|
|
7
|
+
import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
|
|
8
|
+
import { t as loadConfig } from "./shared/load-config-DNGVjxdv.mjs";
|
|
9
|
+
export { VERSION, defineConfig, loadConfig };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-TtAGUp42.js";
|
|
3
2
|
//#region src/builtin-plugin/constructors.ts
|
|
4
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
5
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -59,6 +58,5 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
59
58
|
}
|
|
60
59
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
61
60
|
}
|
|
62
|
-
|
|
63
61
|
//#endregion
|
|
64
|
-
export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWebWorkerPostPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
|
|
62
|
+
export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWebWorkerPostPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { parse, parseSync } from "./rolldown-binding.wasi-browser.js";
|
|
2
|
-
|
|
3
2
|
//#region src/types/sourcemap.ts
|
|
4
3
|
function bindingifySourcemap(map) {
|
|
5
4
|
if (map == null) return;
|
|
@@ -14,7 +13,6 @@ function bindingifySourcemap(map) {
|
|
|
14
13
|
debugId: "debugId" in map ? map.debugId : void 0
|
|
15
14
|
} };
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
17
|
//#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/wrap.js
|
|
20
18
|
function wrap(result) {
|
|
@@ -51,7 +49,6 @@ function applyFix(program, fixPath) {
|
|
|
51
49
|
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
52
50
|
} catch {}
|
|
53
51
|
}
|
|
54
|
-
|
|
55
52
|
//#endregion
|
|
56
53
|
//#region src/utils/parse.ts
|
|
57
54
|
/**
|
|
@@ -87,7 +84,6 @@ async function parse$1(filename, sourceText, options) {
|
|
|
87
84
|
function parseSync$1(filename, sourceText, options) {
|
|
88
85
|
return wrap(parseSync(filename, sourceText, options));
|
|
89
86
|
}
|
|
90
|
-
|
|
91
87
|
//#endregion
|
|
92
88
|
//#region src/utils/error.ts
|
|
93
89
|
function unwrapBindingResult(container) {
|
|
@@ -157,6 +153,5 @@ function getErrorMessage(e) {
|
|
|
157
153
|
function joinNewLine(s1, s2) {
|
|
158
154
|
return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
|
|
159
155
|
}
|
|
160
|
-
|
|
161
156
|
//#endregion
|
|
162
|
-
export { parse$1 as a, unwrapBindingResult as i, normalizeBindingError as n, parseSync$1 as o, normalizeBindingResult as r, bindingifySourcemap as s, aggregateBindingErrorsIntoJsError as t };
|
|
157
|
+
export { parse$1 as a, unwrapBindingResult as i, normalizeBindingError as n, parseSync$1 as o, normalizeBindingResult as r, bindingifySourcemap as s, aggregateBindingErrorsIntoJsError as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as PluginDriver, i as validateOption, n as createBundlerOptions, r as transformToRollupOutput, t as RolldownBuild } from "./rolldown-build-
|
|
3
|
-
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-
|
|
4
|
-
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./constructors-
|
|
5
|
-
import { a as minifySync$2, i as minify$2, n as transform$1, r as transformSync$1, t as TsconfigCache$1 } from "./transform-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-TtAGUp42.js";
|
|
2
|
+
import { a as PluginDriver, i as validateOption, n as createBundlerOptions, r as transformToRollupOutput, t as RolldownBuild } from "./rolldown-build-D97C-VhN.js";
|
|
3
|
+
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-DkAP_6fk.js";
|
|
4
|
+
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./constructors-BgL_dmUe.js";
|
|
5
|
+
import { a as minifySync$2, i as minify$2, n as transform$1, r as transformSync$1, t as TsconfigCache$1 } from "./transform-UkHb5h4g.js";
|
|
6
6
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
7
|
-
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory,
|
|
8
|
-
|
|
7
|
+
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
9
8
|
//#region src/api/dev/dev-engine.ts
|
|
10
9
|
var DevEngine = class DevEngine {
|
|
11
10
|
#inner;
|
|
@@ -97,11 +96,9 @@ var DevEngine = class DevEngine {
|
|
|
97
96
|
return this.#inner.compileEntry(moduleId, clientId);
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
|
-
|
|
101
99
|
//#endregion
|
|
102
100
|
//#region src/api/dev/index.ts
|
|
103
101
|
const dev = (...args) => DevEngine.create(...args);
|
|
104
|
-
|
|
105
102
|
//#endregion
|
|
106
103
|
//#region src/types/external-memory-handle.ts
|
|
107
104
|
const symbolForExternalMemoryHandle = "__rolldown_external_memory_handle__";
|
|
@@ -142,7 +139,6 @@ const symbolForExternalMemoryHandle = "__rolldown_external_memory_handle__";
|
|
|
142
139
|
function freeExternalMemory(handle, keepDataAlive = false) {
|
|
143
140
|
return handle[symbolForExternalMemoryHandle](keepDataAlive);
|
|
144
141
|
}
|
|
145
|
-
|
|
146
142
|
//#endregion
|
|
147
143
|
//#region src/api/experimental.ts
|
|
148
144
|
/**
|
|
@@ -183,25 +179,22 @@ const scan = async (rawInputOptions, rawOutputOptions = {}) => {
|
|
|
183
179
|
}
|
|
184
180
|
return cleanupPromise;
|
|
185
181
|
};
|
|
186
|
-
|
|
187
182
|
//#endregion
|
|
188
183
|
//#region src/plugin/parallel-plugin.ts
|
|
189
184
|
function defineParallelPlugin(pluginPath) {
|
|
190
185
|
throw new Error("`defineParallelPlugin` is not supported in browser build");
|
|
191
186
|
}
|
|
192
|
-
|
|
193
187
|
//#endregion
|
|
194
188
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
195
189
|
function viteAliasPlugin(config) {
|
|
196
190
|
return new BuiltinPlugin("builtin:vite-alias", config);
|
|
197
191
|
}
|
|
198
|
-
|
|
199
192
|
//#endregion
|
|
200
193
|
//#region src/builtin-plugin/bundle-analyzer-plugin.ts
|
|
201
194
|
/**
|
|
202
195
|
* A plugin that analyzes bundle composition and generates detailed reports.
|
|
203
196
|
*
|
|
204
|
-
* The plugin outputs a
|
|
197
|
+
* The plugin outputs a file containing detailed information about:
|
|
205
198
|
* - All chunks and their relationships
|
|
206
199
|
* - Modules bundled in each chunk
|
|
207
200
|
* - Import dependencies between chunks
|
|
@@ -231,11 +224,24 @@ function viteAliasPlugin(config) {
|
|
|
231
224
|
* ]
|
|
232
225
|
* }
|
|
233
226
|
* ```
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* **LLM-friendly markdown output**
|
|
230
|
+
* ```js
|
|
231
|
+
* import { chunkVisualizePlugin } from 'rolldown/experimental';
|
|
232
|
+
*
|
|
233
|
+
* export default {
|
|
234
|
+
* plugins: [
|
|
235
|
+
* chunkVisualizePlugin({
|
|
236
|
+
* format: 'md'
|
|
237
|
+
* })
|
|
238
|
+
* ]
|
|
239
|
+
* }
|
|
240
|
+
* ```
|
|
234
241
|
*/
|
|
235
242
|
function bundleAnalyzerPlugin(config) {
|
|
236
243
|
return new BuiltinPlugin("builtin:bundle-analyzer", config);
|
|
237
244
|
}
|
|
238
|
-
|
|
239
245
|
//#endregion
|
|
240
246
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
241
247
|
function viteTransformPlugin(config) {
|
|
@@ -248,13 +254,11 @@ function viteTransformPlugin(config) {
|
|
|
248
254
|
yarnPnp: typeof process === "object" && !!process.versions?.pnp
|
|
249
255
|
});
|
|
250
256
|
}
|
|
251
|
-
|
|
252
257
|
//#endregion
|
|
253
258
|
//#region src/builtin-plugin/vite-manifest-plugin.ts
|
|
254
259
|
function viteManifestPlugin(config) {
|
|
255
260
|
return new BuiltinPlugin("builtin:vite-manifest", config);
|
|
256
261
|
}
|
|
257
|
-
|
|
258
262
|
//#endregion
|
|
259
263
|
//#region src/experimental-index.ts
|
|
260
264
|
/**
|
|
@@ -302,6 +306,5 @@ const transform = transform$1;
|
|
|
302
306
|
const transformSync = transformSync$1;
|
|
303
307
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
304
308
|
const TsconfigCache = TsconfigCache$1;
|
|
305
|
-
|
|
306
309
|
//#endregion
|
|
307
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin,
|
|
310
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Et as NormalizedOutputOptions, c as InputOptions, ht as defineParallelPlugin, ln as freeExternalMemory, sn as RolldownOutput, tn as OutputOptions } from "./shared/define-config-Cci3IvO_.mjs";
|
|
2
2
|
import { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.mjs";
|
|
3
3
|
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-C1tQjDsj.mjs";
|
|
4
4
|
import { a as TsconfigRawOptions$1, c as MinifyOptions$2, d as minifySync$1, f as ParseResult$3, h as parseSync$1, i as TsconfigCompilerOptions$1, l as MinifyResult$2, m as parse$1, n as TransformResult$1, o as transform$1, p as ParserOptions$3, r as TsconfigCache$1, s as transformSync$1, t as TransformOptions$2, u as minify$1 } from "./shared/transform-BSAGL1b_.mjs";
|
|
5
5
|
import { BindingBundleAnalyzerPluginConfig, BindingViteManifestPluginConfig, BindingViteTransformPluginConfig } from "../binding.cjs";
|
|
6
6
|
import { BindingBundleState, BindingClientHmrUpdate as BindingClientHmrUpdate$1 } from "../../binding.cjs";
|
|
7
|
-
import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory,
|
|
7
|
+
import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig } from "./binding.cjs";
|
|
8
8
|
|
|
9
9
|
//#region src/api/dev/dev-options.d.ts
|
|
10
10
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -127,7 +127,7 @@ declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
|
|
|
127
127
|
/**
|
|
128
128
|
* A plugin that analyzes bundle composition and generates detailed reports.
|
|
129
129
|
*
|
|
130
|
-
* The plugin outputs a
|
|
130
|
+
* The plugin outputs a file containing detailed information about:
|
|
131
131
|
* - All chunks and their relationships
|
|
132
132
|
* - Modules bundled in each chunk
|
|
133
133
|
* - Import dependencies between chunks
|
|
@@ -157,6 +157,20 @@ declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
|
|
|
157
157
|
* ]
|
|
158
158
|
* }
|
|
159
159
|
* ```
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* **LLM-friendly markdown output**
|
|
163
|
+
* ```js
|
|
164
|
+
* import { chunkVisualizePlugin } from 'rolldown/experimental';
|
|
165
|
+
*
|
|
166
|
+
* export default {
|
|
167
|
+
* plugins: [
|
|
168
|
+
* chunkVisualizePlugin({
|
|
169
|
+
* format: 'md'
|
|
170
|
+
* })
|
|
171
|
+
* ]
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
160
174
|
*/
|
|
161
175
|
declare function bundleAnalyzerPlugin(config?: BindingBundleAnalyzerPluginConfig): BuiltinPlugin;
|
|
162
176
|
//#endregion
|
|
@@ -239,4 +253,4 @@ type TsconfigRawOptions = TsconfigRawOptions$1;
|
|
|
239
253
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
240
254
|
type TsconfigCompilerOptions = TsconfigCompilerOptions$1;
|
|
241
255
|
//#endregion
|
|
242
|
-
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin,
|
|
256
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { a as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
3
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
4
|
-
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
6
|
-
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-
|
|
7
|
-
import { a as minifySync$2, i as minify$2, n as transform$1, r as transformSync$1, t as TsconfigCache$1 } from "./shared/transform-
|
|
8
|
-
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory,
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
|
|
2
|
+
import { a as transformToRollupOutput } from "./shared/bindingify-input-options-kCVufQp0.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-8_xyZuDH.mjs";
|
|
4
|
+
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CQ6njWsV.mjs";
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-DDUnGYGU.mjs";
|
|
6
|
+
import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-C7Kkidxk.mjs";
|
|
7
|
+
import { a as minifySync$2, i as minify$2, n as transform$1, r as transformSync$1, t as TsconfigCache$1 } from "./shared/transform-B_n5An0U.mjs";
|
|
8
|
+
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
|
-
|
|
11
10
|
//#region src/api/dev/dev-engine.ts
|
|
12
11
|
var DevEngine = class DevEngine {
|
|
13
12
|
#inner;
|
|
@@ -99,11 +98,9 @@ var DevEngine = class DevEngine {
|
|
|
99
98
|
return this.#inner.compileEntry(moduleId, clientId);
|
|
100
99
|
}
|
|
101
100
|
};
|
|
102
|
-
|
|
103
101
|
//#endregion
|
|
104
102
|
//#region src/api/dev/index.ts
|
|
105
103
|
const dev = (...args) => DevEngine.create(...args);
|
|
106
|
-
|
|
107
104
|
//#endregion
|
|
108
105
|
//#region src/types/external-memory-handle.ts
|
|
109
106
|
const symbolForExternalMemoryHandle = "__rolldown_external_memory_handle__";
|
|
@@ -144,7 +141,6 @@ const symbolForExternalMemoryHandle = "__rolldown_external_memory_handle__";
|
|
|
144
141
|
function freeExternalMemory(handle, keepDataAlive = false) {
|
|
145
142
|
return handle[symbolForExternalMemoryHandle](keepDataAlive);
|
|
146
143
|
}
|
|
147
|
-
|
|
148
144
|
//#endregion
|
|
149
145
|
//#region src/api/experimental.ts
|
|
150
146
|
/**
|
|
@@ -185,7 +181,6 @@ const scan = async (rawInputOptions, rawOutputOptions = {}) => {
|
|
|
185
181
|
}
|
|
186
182
|
return cleanupPromise;
|
|
187
183
|
};
|
|
188
|
-
|
|
189
184
|
//#endregion
|
|
190
185
|
//#region src/plugin/parallel-plugin.ts
|
|
191
186
|
function defineParallelPlugin(pluginPath) {
|
|
@@ -196,19 +191,17 @@ function defineParallelPlugin(pluginPath) {
|
|
|
196
191
|
} };
|
|
197
192
|
};
|
|
198
193
|
}
|
|
199
|
-
|
|
200
194
|
//#endregion
|
|
201
195
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
202
196
|
function viteAliasPlugin(config) {
|
|
203
197
|
return new BuiltinPlugin("builtin:vite-alias", config);
|
|
204
198
|
}
|
|
205
|
-
|
|
206
199
|
//#endregion
|
|
207
200
|
//#region src/builtin-plugin/bundle-analyzer-plugin.ts
|
|
208
201
|
/**
|
|
209
202
|
* A plugin that analyzes bundle composition and generates detailed reports.
|
|
210
203
|
*
|
|
211
|
-
* The plugin outputs a
|
|
204
|
+
* The plugin outputs a file containing detailed information about:
|
|
212
205
|
* - All chunks and their relationships
|
|
213
206
|
* - Modules bundled in each chunk
|
|
214
207
|
* - Import dependencies between chunks
|
|
@@ -238,11 +231,24 @@ function viteAliasPlugin(config) {
|
|
|
238
231
|
* ]
|
|
239
232
|
* }
|
|
240
233
|
* ```
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* **LLM-friendly markdown output**
|
|
237
|
+
* ```js
|
|
238
|
+
* import { chunkVisualizePlugin } from 'rolldown/experimental';
|
|
239
|
+
*
|
|
240
|
+
* export default {
|
|
241
|
+
* plugins: [
|
|
242
|
+
* chunkVisualizePlugin({
|
|
243
|
+
* format: 'md'
|
|
244
|
+
* })
|
|
245
|
+
* ]
|
|
246
|
+
* }
|
|
247
|
+
* ```
|
|
241
248
|
*/
|
|
242
249
|
function bundleAnalyzerPlugin(config) {
|
|
243
250
|
return new BuiltinPlugin("builtin:bundle-analyzer", config);
|
|
244
251
|
}
|
|
245
|
-
|
|
246
252
|
//#endregion
|
|
247
253
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
248
254
|
function viteTransformPlugin(config) {
|
|
@@ -255,13 +261,11 @@ function viteTransformPlugin(config) {
|
|
|
255
261
|
yarnPnp: typeof process === "object" && !!process.versions?.pnp
|
|
256
262
|
});
|
|
257
263
|
}
|
|
258
|
-
|
|
259
264
|
//#endregion
|
|
260
265
|
//#region src/builtin-plugin/vite-manifest-plugin.ts
|
|
261
266
|
function viteManifestPlugin(config) {
|
|
262
267
|
return new BuiltinPlugin("builtin:vite-manifest", config);
|
|
263
268
|
}
|
|
264
|
-
|
|
265
269
|
//#endregion
|
|
266
270
|
//#region src/experimental-index.ts
|
|
267
271
|
/**
|
|
@@ -306,6 +310,5 @@ const transform = transform$1;
|
|
|
306
310
|
const transformSync = transformSync$1;
|
|
307
311
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
308
312
|
const TsconfigCache = TsconfigCache$1;
|
|
309
|
-
|
|
310
313
|
//#endregion
|
|
311
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin,
|
|
314
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-Cci3IvO_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../pluginutils/dist/filter/filter-vite-plugins.d.ts
|
|
4
4
|
/**
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
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-
|
|
2
|
-
|
|
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-B2ByPP8y.mjs";
|
|
3
2
|
//#region ../pluginutils/dist/filter/filter-vite-plugins.js
|
|
4
3
|
/**
|
|
5
4
|
* Filters out Vite plugins that have `apply: 'serve'` set.
|
|
@@ -55,7 +54,6 @@ function filterVitePlugins(plugins) {
|
|
|
55
54
|
}
|
|
56
55
|
return result;
|
|
57
56
|
}
|
|
58
|
-
|
|
59
57
|
//#endregion
|
|
60
58
|
//#region ../pluginutils/dist/filter/simple-filters.js
|
|
61
59
|
/**
|
|
@@ -119,7 +117,6 @@ function makeIdFilterToMatchWithQuery(input) {
|
|
|
119
117
|
function makeRegexIdFilterToMatchWithQuery(input) {
|
|
120
118
|
return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
|
|
121
119
|
}
|
|
122
|
-
|
|
123
120
|
//#endregion
|
|
124
121
|
//#region src/plugin/with-filter.ts
|
|
125
122
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
@@ -182,6 +179,5 @@ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
|
182
179
|
}
|
|
183
180
|
return -1;
|
|
184
181
|
}
|
|
185
|
-
|
|
186
182
|
//#endregion
|
|
187
|
-
export { and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
|
|
183
|
+
export { and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
|