@rolldown/browser 1.0.0-rc.2 → 1.0.0-rc.4

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.
Files changed (51) hide show
  1. package/dist/cli.mjs +11 -990
  2. package/dist/config.d.mts +1 -4
  3. package/dist/config.mjs +8 -11
  4. package/dist/{constructors-B8gqcrFr.js → constructors-D2wC6vT5.js} +2 -5
  5. package/dist/error-DfXdOVMF.js +158 -0
  6. package/dist/experimental-index.browser.mjs +61 -5
  7. package/dist/experimental-index.d.mts +74 -16
  8. package/dist/experimental-index.mjs +63 -7
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/get-log-filter.d.mts +1 -1
  11. package/dist/get-log-filter.mjs +1 -2
  12. package/dist/index.browser.mjs +4 -3
  13. package/dist/index.d.mts +5 -4
  14. package/dist/index.mjs +9 -8
  15. package/dist/{normalize-string-or-regex-CL-PJZI7.js → normalize-string-or-regex-B0X1hEA4.js} +1 -1
  16. package/dist/parallel-plugin-worker.mjs +4 -3
  17. package/dist/parallel-plugin.d.mts +2 -2
  18. package/dist/parse-ast-index.d.mts +1 -1
  19. package/dist/parse-ast-index.mjs +44 -1
  20. package/dist/plugins-index.browser.mjs +2 -2
  21. package/dist/plugins-index.d.mts +2 -2
  22. package/dist/plugins-index.mjs +2 -2
  23. package/dist/rolldown-binding.wasi-browser.js +6 -0
  24. package/dist/rolldown-binding.wasi.cjs +6 -0
  25. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  26. package/dist/{rolldown-build-BntP6Bjl.js → rolldown-build-gXO5p6r0.js} +507 -161
  27. package/dist/shared/{bindingify-input-options-CObJx_Uj.mjs → bindingify-input-options-B32m-wO8.mjs} +40 -97
  28. package/dist/shared/{constructors-5bt5oBhE.d.mts → constructors-CtryxP-m.d.mts} +3 -4
  29. package/dist/shared/{constructors-BTW-c3jX.mjs → constructors-f9W8MQZ_.mjs} +2 -5
  30. package/dist/shared/{define-config-C-sO_cLw.d.mts → define-config-MImu5XA0.d.mts} +63 -26
  31. package/dist/shared/error-DTJQ7tjB.mjs +89 -0
  32. package/dist/shared/{load-config-hx3WBhLe.mjs → load-config-nINjF42i.mjs} +2 -2
  33. package/dist/shared/{logs-B2CASPcx.mjs → logs-CCc_0vhs.mjs} +1 -1
  34. package/dist/shared/{normalize-string-or-regex-DIwprzLy.mjs → normalize-string-or-regex-CdT2cmt4.mjs} +1 -1
  35. package/dist/shared/parse-C5IFYsFB.mjs +72 -0
  36. package/dist/shared/{rolldown-D2E0YTeB.mjs → rolldown-CkjERUOD.mjs} +1 -1
  37. package/dist/shared/{rolldown-build-Do6WlRGM.mjs → rolldown-build-nvl-pSiK.mjs} +1011 -17
  38. package/dist/shared/transform-ChAcTNv3.d.mts +92 -0
  39. package/dist/shared/transform-DhHPKnL-.mjs +90 -0
  40. package/dist/shared/{types-CIhJMr1h.d.mts → types-C2Sw7GCQ.d.mts} +1 -1
  41. package/dist/shared/{watch-BsneBCNP.mjs → watch-CC4jn0NJ.mjs} +4 -3
  42. package/dist/transform-DmR2FE2Q.js +90 -0
  43. package/dist/utils-index.browser.mjs +4 -0
  44. package/dist/utils-index.d.mts +2 -0
  45. package/dist/utils-index.mjs +5 -0
  46. package/package.json +1 -1
  47. package/dist/shared/parse-ast-index-BQpfNG1v.mjs +0 -98
  48. /package/dist/shared/{define-config-Dlptvz3X.mjs → define-config-BVG4QvnP.mjs} +0 -0
  49. /package/dist/shared/{logging-RB67zQ4N.d.mts → logging-C28dTP71.d.mts} +0 -0
  50. /package/dist/shared/{prompt-CYPmuhh-.mjs → prompt-BcvPElI8.mjs} +0 -0
  51. /package/dist/shared/{utils-CqMTwlsR.d.mts → utils-DOXNRW_3.d.mts} +0 -0
package/dist/config.d.mts CHANGED
@@ -1,9 +1,6 @@
1
- import { r as defineConfig, t as ConfigExport } from "./shared/define-config-C-sO_cLw.mjs";
1
+ import { Z as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-MImu5XA0.mjs";
2
2
 
3
3
  //#region src/utils/load-config.d.ts
4
4
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
5
5
  //#endregion
6
- //#region src/config.d.ts
7
- declare const VERSION: string;
8
- //#endregion
9
6
  export { VERSION, defineConfig, loadConfig };
package/dist/config.mjs CHANGED
@@ -1,13 +1,10 @@
1
- import "./shared/normalize-string-or-regex-DIwprzLy.mjs";
2
- import { w as version } from "./shared/bindingify-input-options-CObJx_Uj.mjs";
3
- import "./shared/rolldown-build-Do6WlRGM.mjs";
4
- import "./shared/parse-ast-index-BQpfNG1v.mjs";
5
- import "./shared/rolldown-D2E0YTeB.mjs";
6
- import { t as defineConfig } from "./shared/define-config-Dlptvz3X.mjs";
7
- import { t as loadConfig } from "./shared/load-config-hx3WBhLe.mjs";
1
+ import "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
2
+ import { b as VERSION } from "./shared/bindingify-input-options-B32m-wO8.mjs";
3
+ import "./shared/rolldown-build-nvl-pSiK.mjs";
4
+ import "./shared/error-DTJQ7tjB.mjs";
5
+ import "./shared/parse-C5IFYsFB.mjs";
6
+ import "./shared/rolldown-CkjERUOD.mjs";
7
+ import { t as defineConfig } from "./shared/define-config-BVG4QvnP.mjs";
8
+ import { t as loadConfig } from "./shared/load-config-nINjF42i.mjs";
8
9
 
9
- //#region src/config.ts
10
- const VERSION = version;
11
-
12
- //#endregion
13
10
  export { VERSION, defineConfig, loadConfig };
@@ -1,4 +1,4 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-CL-PJZI7.js";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B0X1hEA4.js";
2
2
 
3
3
  //#region src/builtin-plugin/constructors.ts
4
4
  function viteModulePreloadPolyfillPlugin(config) {
@@ -17,9 +17,6 @@ function viteImportGlobPlugin(config) {
17
17
  function viteReporterPlugin(config) {
18
18
  return new BuiltinPlugin("builtin:vite-reporter", config);
19
19
  }
20
- function viteWasmHelperPlugin(config) {
21
- return new BuiltinPlugin("builtin:vite-wasm-helper", config);
22
- }
23
20
  function viteWasmFallbackPlugin() {
24
21
  return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-wasm-fallback"));
25
22
  }
@@ -58,4 +55,4 @@ function viteReactRefreshWrapperPlugin(config) {
58
55
  }
59
56
 
60
57
  //#endregion
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 };
58
+ 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 };
@@ -0,0 +1,158 @@
1
+ import { parse, parseSync } from "./rolldown-binding.wasi-browser.js";
2
+
3
+ //#region src/types/sourcemap.ts
4
+ function bindingifySourcemap(map) {
5
+ if (map == null) return;
6
+ return { inner: typeof map === "string" ? map : {
7
+ file: map.file ?? void 0,
8
+ mappings: map.mappings,
9
+ sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
10
+ sources: map.sources?.map((s) => s ?? void 0),
11
+ sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
12
+ names: map.names,
13
+ x_google_ignoreList: map.x_google_ignoreList,
14
+ debugId: "debugId" in map ? map.debugId : void 0
15
+ } };
16
+ }
17
+
18
+ //#endregion
19
+ //#region ../../node_modules/.pnpm/oxc-parser@0.112.0/node_modules/oxc-parser/src-js/wrap.js
20
+ function wrap(result) {
21
+ let program, module, comments, errors;
22
+ return {
23
+ get program() {
24
+ if (!program) program = jsonParseAst(result.program);
25
+ return program;
26
+ },
27
+ get module() {
28
+ if (!module) module = result.module;
29
+ return module;
30
+ },
31
+ get comments() {
32
+ if (!comments) comments = result.comments;
33
+ return comments;
34
+ },
35
+ get errors() {
36
+ if (!errors) errors = result.errors;
37
+ return errors;
38
+ }
39
+ };
40
+ }
41
+ function jsonParseAst(programJson) {
42
+ const { node: program, fixes } = JSON.parse(programJson);
43
+ for (const fixPath of fixes) applyFix(program, fixPath);
44
+ return program;
45
+ }
46
+ function applyFix(program, fixPath) {
47
+ let node = program;
48
+ for (const key of fixPath) node = node[key];
49
+ if (node.bigint) node.value = BigInt(node.bigint);
50
+ else try {
51
+ node.value = RegExp(node.regex.pattern, node.regex.flags);
52
+ } catch {}
53
+ }
54
+
55
+ //#endregion
56
+ //#region src/utils/parse.ts
57
+ /**
58
+ * Parse JS/TS source asynchronously on a separate thread.
59
+ *
60
+ * Note that not all of the workload can happen on a separate thread.
61
+ * Parsing on Rust side does happen in a separate thread, but deserialization of the AST to JS objects
62
+ * has to happen on current thread. This synchronous deserialization work typically outweighs
63
+ * the asynchronous parsing by a factor of between 3 and 20.
64
+ *
65
+ * i.e. the majority of the workload cannot be parallelized by using this method.
66
+ *
67
+ * Generally `parseSync` is preferable to use as it does not have the overhead of spawning a thread.
68
+ * If you need to parallelize parsing multiple files, it is recommended to use worker threads.
69
+ */
70
+ async function parse$1(filename, sourceText, options) {
71
+ return wrap(await parse(filename, sourceText, options));
72
+ }
73
+ /**
74
+ * Parse JS/TS source synchronously on current thread.
75
+ *
76
+ * This is generally preferable over `parse` (async) as it does not have the overhead
77
+ * of spawning a thread, and the majority of the workload cannot be parallelized anyway
78
+ * (see `parse` documentation for details).
79
+ *
80
+ * If you need to parallelize parsing multiple files, it is recommended to use worker threads
81
+ * with `parseSync` rather than using `parse`.
82
+ */
83
+ function parseSync$1(filename, sourceText, options) {
84
+ return wrap(parseSync(filename, sourceText, options));
85
+ }
86
+
87
+ //#endregion
88
+ //#region src/utils/error.ts
89
+ function unwrapBindingResult(container) {
90
+ if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
91
+ return container;
92
+ }
93
+ function normalizeBindingResult(container) {
94
+ if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
95
+ return container;
96
+ }
97
+ function normalizeBindingError(e) {
98
+ return e.type === "JsError" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {
99
+ code: e.field0.kind,
100
+ kind: e.field0.kind,
101
+ message: e.field0.message,
102
+ id: e.field0.id,
103
+ exporter: e.field0.exporter,
104
+ loc: e.field0.loc,
105
+ pos: e.field0.pos,
106
+ stack: void 0
107
+ });
108
+ }
109
+ function aggregateBindingErrorsIntoJsError(rawErrors) {
110
+ const errors = rawErrors.map(normalizeBindingError);
111
+ let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
112
+ for (let i = 0; i < errors.length; i++) {
113
+ summary += "\n";
114
+ if (i >= 5) {
115
+ summary += "...";
116
+ break;
117
+ }
118
+ summary += getErrorMessage(errors[i]);
119
+ }
120
+ const wrapper = new Error(summary);
121
+ Object.defineProperty(wrapper, "errors", {
122
+ configurable: true,
123
+ enumerable: true,
124
+ get: () => errors,
125
+ set: (value) => Object.defineProperty(wrapper, "errors", {
126
+ configurable: true,
127
+ enumerable: true,
128
+ value
129
+ })
130
+ });
131
+ return wrapper;
132
+ }
133
+ function getErrorMessage(e) {
134
+ if (Object.hasOwn(e, "kind")) return e.message;
135
+ let s = "";
136
+ if (e.plugin) s += `[plugin ${e.plugin}]`;
137
+ const id = e.id ?? e.loc?.file;
138
+ if (id) {
139
+ s += " " + id;
140
+ if (e.loc) s += `:${e.loc.line}:${e.loc.column}`;
141
+ }
142
+ if (s) s += "\n";
143
+ const message = `${e.name ?? "Error"}: ${e.message}`;
144
+ s += message;
145
+ if (e.frame) s = joinNewLine(s, e.frame);
146
+ if (e.stack) s = joinNewLine(s, e.stack.replace(message, ""));
147
+ if (e.cause) {
148
+ s = joinNewLine(s, "Caused by:");
149
+ s = joinNewLine(s, getErrorMessage(e.cause).split("\n").map((line) => " " + line).join("\n"));
150
+ }
151
+ return s;
152
+ }
153
+ function joinNewLine(s1, s2) {
154
+ return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
155
+ }
156
+
157
+ //#endregion
158
+ 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,8 +1,10 @@
1
- import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-CL-PJZI7.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-BntP6Bjl.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-B8gqcrFr.js";
1
+ import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B0X1hEA4.js";
2
+ import { a as PluginDriver, i as validateOption, n as createBundlerOptions, r as transformToRollupOutput, t as RolldownBuild } from "./rolldown-build-gXO5p6r0.js";
3
+ import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-DfXdOVMF.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-D2wC6vT5.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-DmR2FE2Q.js";
4
6
  import * as binding from "./rolldown-binding.wasi-browser.js";
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";
7
+ import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
6
8
 
7
9
  //#region src/api/dev/dev-engine.ts
8
10
  var DevEngine = class DevEngine {
@@ -194,6 +196,46 @@ function viteAliasPlugin(config) {
194
196
  return new BuiltinPlugin("builtin:vite-alias", config);
195
197
  }
196
198
 
199
+ //#endregion
200
+ //#region src/builtin-plugin/bundle-analyzer-plugin.ts
201
+ /**
202
+ * A plugin that analyzes bundle composition and generates detailed reports.
203
+ *
204
+ * The plugin outputs a JSON file containing detailed information about:
205
+ * - All chunks and their relationships
206
+ * - Modules bundled in each chunk
207
+ * - Import dependencies between chunks
208
+ * - Reachable modules from each entry point
209
+ *
210
+ * @example
211
+ * ```js
212
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
213
+ *
214
+ * export default {
215
+ * plugins: [
216
+ * bundleAnalyzerPlugin()
217
+ * ]
218
+ * }
219
+ * ```
220
+ *
221
+ * @example
222
+ * **Custom filename**
223
+ * ```js
224
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
225
+ *
226
+ * export default {
227
+ * plugins: [
228
+ * bundleAnalyzerPlugin({
229
+ * fileName: 'bundle-analysis.json'
230
+ * })
231
+ * ]
232
+ * }
233
+ * ```
234
+ */
235
+ function bundleAnalyzerPlugin(config) {
236
+ return new BuiltinPlugin("builtin:bundle-analyzer", config);
237
+ }
238
+
197
239
  //#endregion
198
240
  //#region src/builtin-plugin/transform-plugin.ts
199
241
  function viteTransformPlugin(config) {
@@ -246,6 +288,20 @@ const memfs = {
246
288
  fs: binding.__fs,
247
289
  volume: binding.__volume
248
290
  };
291
+ /** @deprecated Use from `rolldown/utils` instead. */
292
+ const parse = parse$2;
293
+ /** @deprecated Use from `rolldown/utils` instead. */
294
+ const parseSync = parseSync$2;
295
+ /** @deprecated Use from `rolldown/utils` instead. */
296
+ const minify = minify$2;
297
+ /** @deprecated Use from `rolldown/utils` instead. */
298
+ const minifySync = minifySync$2;
299
+ /** @deprecated Use from `rolldown/utils` instead. */
300
+ const transform = transform$1;
301
+ /** @deprecated Use from `rolldown/utils` instead. */
302
+ const transformSync = transformSync$1;
303
+ /** @deprecated Use from `rolldown/utils` instead. */
304
+ const TsconfigCache = TsconfigCache$1;
249
305
 
250
306
  //#endregion
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 };
307
+ export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, createTokioRuntime, 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,9 +1,10 @@
1
- import { Ct as NormalizedOutputOptions, Zt as OutputOptions, an as freeExternalMemory, c as InputOptions, ft as defineParallelPlugin, rn as RolldownOutput } from "./shared/define-config-C-sO_cLw.mjs";
2
- import { t as BuiltinPlugin } from "./shared/utils-CqMTwlsR.mjs";
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 "./shared/constructors-5bt5oBhE.mjs";
4
- import { BindingViteManifestPluginConfig, BindingViteTransformPluginConfig, ParseResult as ParseResult$1, ParserOptions as ParserOptions$1 } from "../binding.cjs";
1
+ import { St as NormalizedOutputOptions, Zt as OutputOptions, an as freeExternalMemory, c as InputOptions, dt as defineParallelPlugin, rn as RolldownOutput } from "./shared/define-config-MImu5XA0.mjs";
2
+ import { t as BuiltinPlugin } from "./shared/utils-DOXNRW_3.mjs";
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-CtryxP-m.mjs";
4
+ import { a as TsconfigRawOptions$1, c as MinifyOptions$2, d as minifySync$1, f as ParseResult$1, h as parseSync$1, i as TsconfigCompilerOptions$1, l as MinifyResult$1, m as parse$1, n as TransformResult$1, o as transform$1, p as ParserOptions$2, r as TsconfigCache$1, s as transformSync$1, t as BindingEnhancedTransformOptions, u as minify$1 } from "./shared/transform-ChAcTNv3.mjs";
5
+ import { BindingBundleAnalyzerPluginConfig, BindingViteManifestPluginConfig, BindingViteTransformPluginConfig } from "../binding.cjs";
5
6
  import { BindingBundleState, BindingClientHmrUpdate as BindingClientHmrUpdate$1 } from "../../binding.cjs";
6
- import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, MinifyResult, NapiResolveOptions as ResolveOptions, ParseResult, ParserOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, transform, transformSync } from "./binding.cjs";
7
+ import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig } from "./binding.cjs";
7
8
 
8
9
  //#region src/api/dev/dev-options.d.ts
9
10
  type DevOnHmrUpdates = (result: Error | {
@@ -113,16 +114,6 @@ declare const dev: typeof DevEngine.create;
113
114
  */
114
115
  declare const scan: (rawInputOptions: InputOptions, rawOutputOptions?: {}) => Promise<Promise<void>>;
115
116
  //#endregion
116
- //#region src/utils/parse.d.ts
117
- /**
118
- * Parse asynchronously.
119
- *
120
- * Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
121
- */
122
- declare function parse(filename: string, sourceText: string, options?: ParserOptions$1 | null): Promise<ParseResult$1>;
123
- /** Parse synchronously. */
124
- declare function parseSync(filename: string, sourceText: string, options?: ParserOptions$1 | null): ParseResult$1;
125
- //#endregion
126
117
  //#region src/builtin-plugin/alias-plugin.d.ts
127
118
  type ViteAliasPluginConfig = {
128
119
  entries: {
@@ -132,6 +123,43 @@ type ViteAliasPluginConfig = {
132
123
  };
133
124
  declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
134
125
  //#endregion
126
+ //#region src/builtin-plugin/bundle-analyzer-plugin.d.ts
127
+ /**
128
+ * A plugin that analyzes bundle composition and generates detailed reports.
129
+ *
130
+ * The plugin outputs a JSON file containing detailed information about:
131
+ * - All chunks and their relationships
132
+ * - Modules bundled in each chunk
133
+ * - Import dependencies between chunks
134
+ * - Reachable modules from each entry point
135
+ *
136
+ * @example
137
+ * ```js
138
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
139
+ *
140
+ * export default {
141
+ * plugins: [
142
+ * bundleAnalyzerPlugin()
143
+ * ]
144
+ * }
145
+ * ```
146
+ *
147
+ * @example
148
+ * **Custom filename**
149
+ * ```js
150
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
151
+ *
152
+ * export default {
153
+ * plugins: [
154
+ * bundleAnalyzerPlugin({
155
+ * fileName: 'bundle-analysis.json'
156
+ * })
157
+ * ]
158
+ * }
159
+ * ```
160
+ */
161
+ declare function bundleAnalyzerPlugin(config?: BindingBundleAnalyzerPluginConfig): BuiltinPlugin;
162
+ //#endregion
135
163
  //#region src/builtin-plugin/transform-plugin.d.ts
136
164
  type TransformPattern = string | RegExp | readonly (RegExp | string)[];
137
165
  type TransformPluginConfig = Omit<BindingViteTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude" | "yarnPnp"> & {
@@ -180,5 +208,35 @@ declare const memfs: {
180
208
  fs: any;
181
209
  volume: any;
182
210
  } | undefined;
211
+ /** @deprecated Use from `rolldown/utils` instead. */
212
+ declare const parse: typeof parse$1;
213
+ /** @deprecated Use from `rolldown/utils` instead. */
214
+ declare const parseSync: typeof parseSync$1;
215
+ /** @deprecated Use from `rolldown/utils` instead. */
216
+ type ParseResult = ParseResult$1;
217
+ /** @deprecated Use from `rolldown/utils` instead. */
218
+ type ParserOptions = ParserOptions$2;
219
+ /** @deprecated Use from `rolldown/utils` instead. */
220
+ declare const minify: typeof minify$1;
221
+ /** @deprecated Use from `rolldown/utils` instead. */
222
+ declare const minifySync: typeof minifySync$1;
223
+ /** @deprecated Use from `rolldown/utils` instead. */
224
+ type MinifyOptions = MinifyOptions$2;
225
+ /** @deprecated Use from `rolldown/utils` instead. */
226
+ type MinifyResult = MinifyResult$1;
227
+ /** @deprecated Use from `rolldown/utils` instead. */
228
+ declare const transform: typeof transform$1;
229
+ /** @deprecated Use from `rolldown/utils` instead. */
230
+ declare const transformSync: typeof transformSync$1;
231
+ /** @deprecated Use from `rolldown/utils` instead. */
232
+ type TransformOptions = BindingEnhancedTransformOptions;
233
+ /** @deprecated Use from `rolldown/utils` instead. */
234
+ type TransformResult = TransformResult$1;
235
+ /** @deprecated Use from `rolldown/utils` instead. */
236
+ declare const TsconfigCache: typeof TsconfigCache$1;
237
+ /** @deprecated Use from `rolldown/utils` instead. */
238
+ type TsconfigRawOptions = TsconfigRawOptions$1;
239
+ /** @deprecated Use from `rolldown/utils` instead. */
240
+ type TsconfigCompilerOptions = TsconfigCompilerOptions$1;
183
241
  //#endregion
184
- export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type 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 };
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, createTokioRuntime, 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,9 +1,11 @@
1
- import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-DIwprzLy.mjs";
2
- import { c as transformToRollupOutput, o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-CObJx_Uj.mjs";
3
- import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-Do6WlRGM.mjs";
4
- import { i as parseSync, r as parse } from "./shared/parse-ast-index-BQpfNG1v.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-BTW-c3jX.mjs";
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";
1
+ import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
2
+ import { a as transformToRollupOutput } from "./shared/bindingify-input-options-B32m-wO8.mjs";
3
+ import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-nvl-pSiK.mjs";
4
+ import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-DTJQ7tjB.mjs";
5
+ import { n as parseSync$2, t as parse$2 } from "./shared/parse-C5IFYsFB.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-f9W8MQZ_.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-DhHPKnL-.mjs";
8
+ import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
7
9
  import { pathToFileURL } from "node:url";
8
10
 
9
11
  //#region src/api/dev/dev-engine.ts
@@ -201,6 +203,46 @@ function viteAliasPlugin(config) {
201
203
  return new BuiltinPlugin("builtin:vite-alias", config);
202
204
  }
203
205
 
206
+ //#endregion
207
+ //#region src/builtin-plugin/bundle-analyzer-plugin.ts
208
+ /**
209
+ * A plugin that analyzes bundle composition and generates detailed reports.
210
+ *
211
+ * The plugin outputs a JSON file containing detailed information about:
212
+ * - All chunks and their relationships
213
+ * - Modules bundled in each chunk
214
+ * - Import dependencies between chunks
215
+ * - Reachable modules from each entry point
216
+ *
217
+ * @example
218
+ * ```js
219
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
220
+ *
221
+ * export default {
222
+ * plugins: [
223
+ * bundleAnalyzerPlugin()
224
+ * ]
225
+ * }
226
+ * ```
227
+ *
228
+ * @example
229
+ * **Custom filename**
230
+ * ```js
231
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
232
+ *
233
+ * export default {
234
+ * plugins: [
235
+ * bundleAnalyzerPlugin({
236
+ * fileName: 'bundle-analysis.json'
237
+ * })
238
+ * ]
239
+ * }
240
+ * ```
241
+ */
242
+ function bundleAnalyzerPlugin(config) {
243
+ return new BuiltinPlugin("builtin:bundle-analyzer", config);
244
+ }
245
+
204
246
  //#endregion
205
247
  //#region src/builtin-plugin/transform-plugin.ts
206
248
  function viteTransformPlugin(config) {
@@ -250,6 +292,20 @@ function viteManifestPlugin(config) {
250
292
  * @see {@link https://github.com/streamich/memfs} for more information on the memfs API.
251
293
  */
252
294
  const memfs = void 0;
295
+ /** @deprecated Use from `rolldown/utils` instead. */
296
+ const parse = parse$2;
297
+ /** @deprecated Use from `rolldown/utils` instead. */
298
+ const parseSync = parseSync$2;
299
+ /** @deprecated Use from `rolldown/utils` instead. */
300
+ const minify = minify$2;
301
+ /** @deprecated Use from `rolldown/utils` instead. */
302
+ const minifySync = minifySync$2;
303
+ /** @deprecated Use from `rolldown/utils` instead. */
304
+ const transform = transform$1;
305
+ /** @deprecated Use from `rolldown/utils` instead. */
306
+ const transformSync = transformSync$1;
307
+ /** @deprecated Use from `rolldown/utils` instead. */
308
+ const TsconfigCache = TsconfigCache$1;
253
309
 
254
310
  //#endregion
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 };
311
+ export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, createTokioRuntime, 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,4 +1,4 @@
1
- import { B as id, F as TopLevelFilterExpression, G as moduleType, H as include, I as and, J as queries, K as not, L as code, M as FilterExpression, N as FilterExpressionKind, P as QueryFilterObject, R as exclude, U as interpreter, V as importerId, W as interpreterImpl, Y as query, j as withFilter, q as or, z as exprInterpreter } from "./shared/define-config-C-sO_cLw.mjs";
1
+ import { B as id, F as TopLevelFilterExpression, G as moduleType, H as include, I as and, J as queries, K as not, L as code, M as FilterExpression, N as FilterExpressionKind, P as QueryFilterObject, R as exclude, U as interpreter, V as importerId, W as interpreterImpl, Y as query, j as withFilter, q as or, z as exprInterpreter } from "./shared/define-config-MImu5XA0.mjs";
2
2
 
3
3
  //#region ../pluginutils/dist/filter/filter-vite-plugins.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as RolldownLog } from "./shared/logging-RB67zQ4N.mjs";
1
+ import { a as RolldownLog } from "./shared/logging-C28dTP71.mjs";
2
2
 
3
3
  //#region src/get-log-filter.d.ts
4
4
  type GetLogFilter = (filters: string[]) => (log: RolldownLog) => boolean;
@@ -42,7 +42,6 @@ const testFilter = (log, key, parts) => {
42
42
  }
43
43
  return value.endsWith(parts[lastPartIndex]);
44
44
  };
45
- var get_log_filter_default = getLogFilter;
46
45
 
47
46
  //#endregion
48
- export { get_log_filter_default as default };
47
+ export { getLogFilter as default };
@@ -1,5 +1,6 @@
1
- import { d as logMultiplyNotifyOption } from "./normalize-string-or-regex-CL-PJZI7.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-BntP6Bjl.js";
1
+ import { d as logMultiplyNotifyOption } from "./normalize-string-or-regex-B0X1hEA4.js";
2
+ import { a as PluginDriver, c as RUNTIME_MODULE_ID, i as validateOption, l as VERSION, n as createBundlerOptions, o as LOG_LEVEL_WARN, s as arraify, t as RolldownBuild } from "./rolldown-build-gXO5p6r0.js";
3
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-DfXdOVMF.js";
3
4
  import { BindingMagicString, BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
4
5
 
5
6
  //#region src/api/rolldown/index.ts
@@ -240,4 +241,4 @@ function defineConfig(config) {
240
241
  }
241
242
 
242
243
  //#endregion
243
- export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
244
+ export { BindingMagicString, RUNTIME_MODULE_ID, VERSION, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-RB67zQ4N.mjs";
2
- import { $ as ExistingRawSourceMap, $t as OutputAsset, A as TransformResult, At as RolldownWatcher, Bt as AdvancedChunksOptions, C as Plugin, Ct as NormalizedOutputOptions, D as RolldownPlugin, Dt as LoggingFunction, E as ResolvedId, Et as ChecksOptions, Ft as RolldownBuild, Gt as CodeSplittingOptions, Ht as ChunkingContext, It as BuildOptions, Jt as GlobalsFunction, Kt as GeneratedCodeOptions, Lt as build, Mt as RolldownWatcherWatcherEventMap, Nt as WatchOptions, O as RolldownPluginOption, Ot as WarningHandlerWithDefault, Pt as rolldown, Q as VERSION, Qt as PreRenderedAsset, Rt as AddonFunction, S as PartialResolvedId, St as InternalModuleFormat, T as ResolveIdResult, Tt as TransformOptions, Ut as CodeSplittingGroup, Vt as ChunkFileNamesFunction, Wt as CodeSplittingNameFunction, X as BindingMagicString, Xt as ModuleFormat, Yt as MinifyOptions, Z as PreRenderedChunk, Zt as OutputOptions, _ as LoadResult, _t as ModuleTypeFilter, a as ExternalOption, at as EmittedChunk, b as ObjectHook, bt as RolldownFileStats, c as InputOptions, ct as GetModuleInfo, d as WatcherOptions, dt as DefineParallelPluginResult, en as OutputChunk, et as SourceMapInput, f as AsyncPluginHooks, g as ImportKind, gt as HookFilter, h as HookFilterExtension, ht as GeneralHookFilter, i as RolldownOptions, in as SourceMap, it as EmittedAsset, jt as RolldownWatcherEvent, k as SourceDescription, kt as watch, l as ModuleTypes, lt as PluginContext, m as FunctionPluginHooks, mt as PluginContextMeta, n as RolldownOptionsFunction, nn as RenderedModule, nt as TreeshakingOptions, o as ExternalOptionFunction, on as ModuleInfo, ot as EmittedFile, p as CustomPluginOptions, pt as MinimalPluginContext, qt as GeneratedCodePreset, r as defineConfig, rn as RolldownOutput, rt as TransformPluginContext, s as InputOption, sn as SourcemapIgnoreListOption, st as EmittedPrebuiltChunk, t as ConfigExport, tn as RenderedChunk, tt as OutputBundle, u as OptimizationOptions, ut as PluginContextResolveOptions, v as ModuleOptions, vt as BufferEncoding, w as ResolveIdExtraOptions, wt as NormalizedInputOptions, x as ParallelPluginHooks, xt as RolldownFsModule, y as ModuleType, yt as RolldownDirectoryEntry, zt as AdvancedChunksGroup } from "./shared/define-config-C-sO_cLw.mjs";
3
- import { o as PartialNull } from "./shared/utils-CqMTwlsR.mjs";
4
- export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedChunk, 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, PluginContextResolveOptions, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
1
+ import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C28dTP71.mjs";
2
+ import { $ as SourceMapInput, $t as OutputAsset, A as TransformResult, At as RolldownWatcherEvent, Bt as ChunkFileNamesFunction, C as Plugin, Ct as NormalizedInputOptions, D as RolldownPlugin, Dt as WarningHandlerWithDefault, E as ResolvedId, Et as LoggingFunction, Ft as BuildOptions, Gt as CommentsOptions, Ht as CodeSplittingGroup, It as build, Jt as GlobalsFunction, Kt as GeneratedCodeOptions, Lt as AddonFunction, Mt as WatchOptions, Nt as rolldown, O as RolldownPluginOption, Ot as watch, Pt as RolldownBuild, Q as ExistingRawSourceMap, Qt as PreRenderedAsset, Rt as AdvancedChunksGroup, S as PartialResolvedId, St as NormalizedOutputOptions, T as ResolveIdResult, Tt as ChecksOptions, Ut as CodeSplittingNameFunction, Vt as ChunkingContext, Wt as CodeSplittingOptions, X as RUNTIME_MODULE_ID, Xt as ModuleFormat, Yt as MinifyOptions, Z as VERSION, Zt as OutputOptions, _ as LoadResult, _t as BufferEncoding, a as ExternalOption, at as EmittedFile, b as ObjectHook, bt as RolldownFsModule, c as InputOptions, ct as PluginContext, d as WatcherOptions, en as OutputChunk, et as OutputBundle, f as AsyncPluginHooks, ft as MinimalPluginContext, g as ImportKind, gt as ModuleTypeFilter, h as HookFilterExtension, ht as HookFilter, i as RolldownOptions, in as SourceMap, it as EmittedChunk, jt as RolldownWatcherWatcherEventMap, k as SourceDescription, kt as RolldownWatcher, l as ModuleTypes, lt as PluginContextResolveOptions, m as FunctionPluginHooks, mt as GeneralHookFilter, n as RolldownOptionsFunction, nn as RenderedModule, nt as TransformPluginContext, o as ExternalOptionFunction, on as ModuleInfo, ot as EmittedPrebuiltChunk, p as CustomPluginOptions, pt as PluginContextMeta, qt as GeneratedCodePreset, r as defineConfig, rn as RolldownOutput, rt as EmittedAsset, s as InputOption, sn as SourcemapIgnoreListOption, st as GetModuleInfo, t as ConfigExport, tn as RenderedChunk, tt as TreeshakingOptions, u as OptimizationOptions, ut as DefineParallelPluginResult, v as ModuleOptions, vt as RolldownDirectoryEntry, w as ResolveIdExtraOptions, wt as TransformOptions, x as ParallelPluginHooks, xt as InternalModuleFormat, y as ModuleType, yt as RolldownFileStats, zt as AdvancedChunksOptions } from "./shared/define-config-MImu5XA0.mjs";
3
+ import { o as PartialNull } from "./shared/utils-DOXNRW_3.mjs";
4
+ import { BindingMagicString, PreRenderedChunk } from "./binding.cjs";
5
+ export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, BindingMagicString, type BufferEncoding, type BuildOptions, type ChecksOptions, type ChunkFileNamesFunction, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
- import { n as onExit, t as watch } from "./shared/watch-BsneBCNP.mjs";
2
- import "./shared/normalize-string-or-regex-DIwprzLy.mjs";
3
- import { S as VERSION } from "./shared/bindingify-input-options-CObJx_Uj.mjs";
4
- import "./shared/rolldown-build-Do6WlRGM.mjs";
5
- import "./shared/parse-ast-index-BQpfNG1v.mjs";
6
- import { t as rolldown } from "./shared/rolldown-D2E0YTeB.mjs";
7
- import { t as defineConfig } from "./shared/define-config-Dlptvz3X.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-CC4jn0NJ.mjs";
2
+ import "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
3
+ import { b as VERSION, y as RUNTIME_MODULE_ID } from "./shared/bindingify-input-options-B32m-wO8.mjs";
4
+ import "./shared/rolldown-build-nvl-pSiK.mjs";
5
+ import "./shared/error-DTJQ7tjB.mjs";
6
+ import "./shared/parse-C5IFYsFB.mjs";
7
+ import { t as rolldown } from "./shared/rolldown-CkjERUOD.mjs";
8
+ import { t as defineConfig } from "./shared/define-config-BVG4QvnP.mjs";
8
9
  import { isMainThread } from "node:worker_threads";
9
10
  import { BindingMagicString, initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
10
11
 
@@ -52,4 +53,4 @@ async function build(options) {
52
53
  }
53
54
 
54
55
  //#endregion
55
- export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
56
+ export { BindingMagicString, RUNTIME_MODULE_ID, VERSION, build, defineConfig, rolldown, watch };
@@ -156,7 +156,7 @@ function error(base) {
156
156
  if (!(base instanceof Error)) {
157
157
  base = Object.assign(new Error(base.message), base);
158
158
  Object.defineProperty(base, "name", {
159
- value: "RollupError",
159
+ value: "RolldownError",
160
160
  writable: true
161
161
  });
162
162
  }
@@ -1,6 +1,7 @@
1
- import "./shared/normalize-string-or-regex-DIwprzLy.mjs";
2
- import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-CObJx_Uj.mjs";
3
- import "./shared/parse-ast-index-BQpfNG1v.mjs";
1
+ import "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
2
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-B32m-wO8.mjs";
3
+ import "./shared/error-DTJQ7tjB.mjs";
4
+ import "./shared/parse-C5IFYsFB.mjs";
4
5
  import { parentPort, workerData } from "node:worker_threads";
5
6
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
6
7
 
@@ -1,5 +1,5 @@
1
- import { C as Plugin } from "./shared/define-config-C-sO_cLw.mjs";
2
- import { i as MaybePromise } from "./shared/utils-CqMTwlsR.mjs";
1
+ import { C as Plugin } from "./shared/define-config-MImu5XA0.mjs";
2
+ import { i as MaybePromise } from "./shared/utils-DOXNRW_3.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;