@rolldown/browser 1.0.0-rc.9 → 1.0.1

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 (48) hide show
  1. package/dist/cli.mjs +208 -73
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -7
  4. package/dist/{constructors-BgL_dmUe.js → constructors-BTLtc_G_.js} +11 -2
  5. package/dist/{error-DkAP_6fk.js → error-CIj5jXSo.js} +1 -1
  6. package/dist/experimental-index.browser.mjs +10 -10
  7. package/dist/experimental-index.d.mts +17 -19
  8. package/dist/experimental-index.mjs +11 -11
  9. package/dist/experimental-runtime-types.d.ts +14 -5
  10. package/dist/filter-index.d.mts +3 -3
  11. package/dist/filter-index.mjs +3 -3
  12. package/dist/index.browser.mjs +4 -4
  13. package/dist/index.d.mts +4 -3
  14. package/dist/index.mjs +4 -8
  15. package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
  16. package/dist/parallel-plugin-worker.mjs +1 -4
  17. package/dist/parallel-plugin.d.mts +2 -2
  18. package/dist/parse-ast-index.d.mts +1 -2
  19. package/dist/parse-ast-index.mjs +1 -1
  20. package/dist/plugins-index.browser.mjs +2 -2
  21. package/dist/plugins-index.d.mts +3 -3
  22. package/dist/plugins-index.mjs +2 -2
  23. package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-uVC8K7GR.js} +28 -5
  24. package/dist/rolldown-binding.wasi-browser.js +6 -0
  25. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  26. package/dist/{rolldown-build-sRmdtwRU.js → rolldown-build-DCjXbOeh.js} +242 -210
  27. package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
  28. package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-C7dl2XLe.mjs} +126 -58
  29. package/dist/shared/{composable-filters-B2ByPP8y.mjs → composable-filters-DpWB82jk.mjs} +2 -2
  30. package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
  31. package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-CI_8FAaP.mjs} +11 -2
  32. package/dist/shared/{define-config-B1J71V4c.d.mts → define-config-CYgMQYTy.d.mts} +131 -39
  33. package/dist/shared/{load-config-B6MMusXN.mjs → load-config-BFkorvIR.mjs} +1 -1
  34. package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
  35. package/dist/shared/{parse-DDUnGYGU.mjs → parse-Bmk53Le1.mjs} +1 -1
  36. package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
  37. package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
  38. package/dist/shared/{rolldown-BDqeiCX1.mjs → rolldown-Dyy9Y2li.mjs} +1 -1
  39. package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DYE2Qi6z.mjs} +120 -156
  40. package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
  41. package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
  42. package/dist/shared/{watch-Cj4uDLQX.mjs → watch-DXAEaxPd.mjs} +3 -3
  43. package/dist/utils-index.browser.mjs +5 -5
  44. package/dist/utils-index.d.mts +4 -4
  45. package/dist/utils-index.mjs +5 -6
  46. package/dist/wasi-worker-browser.mjs +8 -0
  47. package/package.json +4 -2
  48. package/dist/shared/types-Cx3HYorz.d.mts +0 -1302
@@ -1,14 +1,12 @@
1
- import { Tt as NormalizedOutputOptions, c as InputOptions, ln as freeExternalMemory, mt as defineParallelPlugin, sn as RolldownOutput, tn as OutputOptions } from "./shared/define-config-B1J71V4c.mjs";
2
- import { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.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-C1tQjDsj.mjs";
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
- import { BindingBundleAnalyzerPluginConfig, BindingViteManifestPluginConfig, BindingViteTransformPluginConfig } from "../binding.cjs";
6
- import { BindingBundleState, BindingClientHmrUpdate as BindingClientHmrUpdate$1 } from "../../binding.cjs";
7
- import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig } from "./binding.cjs";
1
+ import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-CaVxb0SV.mjs";
2
+ import { Tt as NormalizedOutputOptions, cn as RolldownOutput, l as InputOptions, mt as defineParallelPlugin, nn as OutputOptions, un as freeExternalMemory } from "./shared/define-config-CYgMQYTy.mjs";
3
+ import { t as BuiltinPlugin } from "./shared/utils-KRVeJqya.mjs";
4
+ import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-kP3ISMFT.mjs";
5
+ import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-B1JYJxhf.mjs";
8
6
 
9
7
  //#region src/api/dev/dev-options.d.ts
10
8
  type DevOnHmrUpdates = (result: Error | {
11
- updates: BindingClientHmrUpdate$1[];
9
+ updates: BindingClientHmrUpdate[];
12
10
  changedFiles: string[];
13
11
  }) => void | Promise<void>;
14
12
  type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
@@ -75,7 +73,7 @@ declare class DevEngine {
75
73
  ensureCurrentBuildFinish(): Promise<void>;
76
74
  getBundleState(): Promise<BindingBundleState>;
77
75
  ensureLatestBuildOutput(): Promise<void>;
78
- invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate$1[]>;
76
+ invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate[]>;
79
77
  registerModules(clientId: string, modules: string[]): Promise<void>;
80
78
  removeClient(clientId: string): Promise<void>;
81
79
  close(): Promise<void>;
@@ -161,11 +159,11 @@ declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
161
159
  * @example
162
160
  * **LLM-friendly markdown output**
163
161
  * ```js
164
- * import { chunkVisualizePlugin } from 'rolldown/experimental';
162
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
165
163
  *
166
164
  * export default {
167
165
  * plugins: [
168
- * chunkVisualizePlugin({
166
+ * bundleAnalyzerPlugin({
169
167
  * format: 'md'
170
168
  * })
171
169
  * ]
@@ -227,30 +225,30 @@ declare const parse: typeof parse$1;
227
225
  /** @deprecated Use from `rolldown/utils` instead. */
228
226
  declare const parseSync: typeof parseSync$1;
229
227
  /** @deprecated Use from `rolldown/utils` instead. */
230
- type ParseResult = ParseResult$3;
228
+ type ParseResult = ParseResult$1;
231
229
  /** @deprecated Use from `rolldown/utils` instead. */
232
- type ParserOptions = ParserOptions$3;
230
+ type ParserOptions = ParserOptions$1;
233
231
  /** @deprecated Use from `rolldown/utils` instead. */
234
232
  declare const minify: typeof minify$1;
235
233
  /** @deprecated Use from `rolldown/utils` instead. */
236
234
  declare const minifySync: typeof minifySync$1;
237
235
  /** @deprecated Use from `rolldown/utils` instead. */
238
- type MinifyOptions = MinifyOptions$2;
236
+ type MinifyOptions = MinifyOptions$1;
239
237
  /** @deprecated Use from `rolldown/utils` instead. */
240
- type MinifyResult = MinifyResult$2;
238
+ type MinifyResult = MinifyResult$1;
241
239
  /** @deprecated Use from `rolldown/utils` instead. */
242
240
  declare const transform: typeof transform$1;
243
241
  /** @deprecated Use from `rolldown/utils` instead. */
244
242
  declare const transformSync: typeof transformSync$1;
245
243
  /** @deprecated Use from `rolldown/utils` instead. */
246
- type TransformOptions = TransformOptions$2;
244
+ type TransformOptions = TransformOptions$1;
247
245
  /** @deprecated Use from `rolldown/utils` instead. */
248
246
  type TransformResult = TransformResult$1;
249
247
  /** @deprecated Use from `rolldown/utils` instead. */
250
248
  declare const TsconfigCache: typeof TsconfigCache$1;
251
249
  /** @deprecated Use from `rolldown/utils` instead. */
252
- type TsconfigRawOptions = TsconfigRawOptions$1;
250
+ type TsconfigRawOptions = BindingTsconfigRawOptions;
253
251
  /** @deprecated Use from `rolldown/utils` instead. */
254
- type TsconfigCompilerOptions = TsconfigCompilerOptions$1;
252
+ type TsconfigCompilerOptions = BindingTsconfigCompilerOptions;
255
253
  //#endregion
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 };
254
+ export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type NapiResolveOptions as 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, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
@@ -1,11 +1,11 @@
1
- import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
2
- import { o as transformToRollupOutput } from "./shared/bindingify-input-options-Cfptl9gw.mjs";
3
- import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-DZ7tJkeQ.mjs";
1
+ import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-Dq6w-2tU.mjs";
2
+ import { o as transformToRollupOutput } from "./shared/bindingify-input-options-C7dl2XLe.mjs";
3
+ import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-DYE2Qi6z.mjs";
4
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";
5
+ import { n as parseSync$2, t as parse$2 } from "./shared/parse-Bmk53Le1.mjs";
6
+ import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CI_8FAaP.mjs";
7
+ import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-Cwoo4h_o.mjs";
8
+ import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
9
9
  import { pathToFileURL } from "node:url";
10
10
  //#region src/api/dev/dev-engine.ts
11
11
  var DevEngine = class DevEngine {
@@ -235,11 +235,11 @@ function viteAliasPlugin(config) {
235
235
  * @example
236
236
  * **LLM-friendly markdown output**
237
237
  * ```js
238
- * import { chunkVisualizePlugin } from 'rolldown/experimental';
238
+ * import { bundleAnalyzerPlugin } from 'rolldown/experimental';
239
239
  *
240
240
  * export default {
241
241
  * plugins: [
242
- * chunkVisualizePlugin({
242
+ * bundleAnalyzerPlugin({
243
243
  * format: 'md'
244
244
  * })
245
245
  * ]
@@ -309,6 +309,6 @@ const transform = transform$1;
309
309
  /** @deprecated Use from `rolldown/utils` instead. */
310
310
  const transformSync = transformSync$1;
311
311
  /** @deprecated Use from `rolldown/utils` instead. */
312
- const TsconfigCache = TsconfigCache$1;
312
+ const TsconfigCache = TsconfigCache$2;
313
313
  //#endregion
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 };
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, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
@@ -40,21 +40,30 @@ export class DevRuntime {
40
40
  /**
41
41
  * __esmMin
42
42
  *
43
- * @type {<T>(fn: any, res: T) => () => T}
43
+ * When `dedup` is truthy and `id` is already registered on the runtime,
44
+ * skip the factory: another lazy blob got there first. HMR patches pass
45
+ * no `dedup` so they always re-run the factory and replace the registered
46
+ * exports.
47
+ *
48
+ * @type {<T>(id: string, fn: any, dedup: any, res: T) => () => T}
44
49
  * @internal
45
50
  */
46
- createEsmInitializer: <T>(fn: any, res: T) => () => T;
51
+ createEsmInitializer: <T>(id: string, fn: any, dedup: any, res: T) => () => T;
47
52
  /**
48
53
  * __commonJSMin
49
54
  *
50
- * @type {<T extends { exports: any }>(cb: any, mod: { exports: any }) => () => T}
55
+ * Same dedup gate as createEsmInitializer. With `dedup` truthy and `id`
56
+ * registered, reuse the registered exports object; otherwise run the
57
+ * factory.
58
+ *
59
+ * @type {<T extends { exports: any }>(id: string, cb: any, dedup: any, mod: { exports: any }, registered: any) => () => T}
51
60
  * @internal
52
61
  */
53
62
  createCjsInitializer: <T extends {
54
63
  exports: any;
55
- }>(cb: any, mod: {
64
+ }>(id: string, cb: any, dedup: any, mod: {
56
65
  exports: any;
57
- }) => () => T;
66
+ }, registered: any) => () => T;
58
67
  /** @internal */
59
68
  __toESM: any;
60
69
  /** @internal */
@@ -1,6 +1,6 @@
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-B1J71V4c.mjs";
1
+ import { B as exclude, F as FilterExpressionKind, G as interpreter, H as id, I as QueryFilterObject, J as not, K as interpreterImpl, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, R as and, U as importerId, V as exprInterpreter, W as include, X as queries, Y as or, Z as query, q as moduleType, z as code } from "./shared/define-config-CYgMQYTy.mjs";
2
2
 
3
- //#region ../pluginutils/dist/filter/filter-vite-plugins.d.ts
3
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts
4
4
  /**
5
5
  * Filters out Vite plugins that have `apply: 'serve'` set.
6
6
  *
@@ -30,7 +30,7 @@ import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H a
30
30
  */
31
31
  declare function filterVitePlugins<T = any>(plugins: T | T[] | null | undefined | false): T[];
32
32
  //#endregion
33
- //#region ../pluginutils/dist/filter/simple-filters.d.ts
33
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts
34
34
  /**
35
35
  * Constructs a RegExp that matches the exact string specified.
36
36
  *
@@ -1,5 +1,5 @@
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";
2
- //#region ../pluginutils/dist/filter/filter-vite-plugins.js
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-DpWB82jk.mjs";
2
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js
3
3
  /**
4
4
  * Filters out Vite plugins that have `apply: 'serve'` set.
5
5
  *
@@ -55,7 +55,7 @@ function filterVitePlugins(plugins) {
55
55
  return result;
56
56
  }
57
57
  //#endregion
58
- //#region ../pluginutils/dist/filter/simple-filters.js
58
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
59
59
  /**
60
60
  * Constructs a RegExp that matches the exact string specified.
61
61
  *
@@ -1,6 +1,6 @@
1
- import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-TtAGUp42.js";
2
- import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as BindingMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-sRmdtwRU.js";
3
- import { t as aggregateBindingErrorsIntoJsError } from "./error-DkAP_6fk.js";
1
+ import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-CBPw_c5O.js";
2
+ import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-DCjXbOeh.js";
3
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-CIj5jXSo.js";
4
4
  import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
5
5
  //#region src/api/rolldown/index.ts
6
6
  /**
@@ -235,4 +235,4 @@ function defineConfig(config) {
235
235
  return config;
236
236
  }
237
237
  //#endregion
238
- export { RUNTIME_MODULE_ID, BindingMagicString as RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
238
+ export { RUNTIME_MODULE_ID, RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
+ import { z as PreRenderedChunk } from "./shared/binding-CaVxb0SV.mjs";
1
2
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C6h4g8dA.mjs";
2
- import { $ as VERSION, $t as MinifyOptions, A as SourceDescription, At as WarningHandlerWithDefault, Bt as build, C as PartialResolvedId, Ct as RolldownFsModule, D as ResolvedId, Dt as TransformOptions, E as ResolveIdResult, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkingContext, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingOptions, Kt as CodeSplittingGroup, Lt as rolldown, Mt as watch, Nt as RolldownWatcher, O as RolldownPlugin, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GlobalsFunction, Rt as RolldownBuild, S as ParallelPluginHooks, St as RolldownFileStats, T as ResolveIdExtraOptions, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as ChunkFileNamesFunction, Xt as GeneratedCodeOptions, Yt as CommentsOptions, Z as PreRenderedChunk, Zt as GeneratedCodePreset, _ as ImportKind, _t as GeneralHookFilter, a as ExternalOption, an as RenderedChunk, at as TransformPluginContext, b as ModuleType, bt as BufferEncoding, c as InputOptions, cn as SourceMap, ct as EmittedFile, d as WatcherFileWatcherOptions, dn as SourcemapIgnoreListOption, dt as PluginContext, en as ModuleFormat, et as BundleError, f as WatcherOptions, ft as PluginContextResolveOptions, g as HookFilterExtension, gt as PluginContextMeta, h as FunctionPluginHooks, ht as MinimalPluginContext, i as RolldownOptions, in as OutputChunk, it as TreeshakingOptions, j as TransformResult, jt as BindingMagicString, k as RolldownPluginOption, kt as LoggingFunction, l as ModuleTypes, lt as EmittedPrebuiltChunk, m as CustomPluginOptions, n as RolldownOptionsFunction, nn as PreRenderedAsset, nt as SourceMapInput, o as ExternalOptionFunction, on as RenderedModule, ot as EmittedAsset, p as AsyncPluginHooks, pt as DefineParallelPluginResult, qt as CodeSplittingNameFunction, r as defineConfig, rn as OutputAsset, rt as OutputBundle, s as InputOption, sn as RolldownOutput, st as EmittedChunk, t as ConfigExport, tn as OutputOptions, tt as ExistingRawSourceMap, u as OptimizationOptions, un as ModuleInfo, ut as GetModuleInfo, v as LoadResult, vt as HookFilter, w as Plugin, wt as InternalModuleFormat, x as ObjectHook, xt as RolldownDirectoryEntry, y as ModuleOptions, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-B1J71V4c.mjs";
3
- import { o as PartialNull } from "./shared/utils-6wxe_LMG.mjs";
4
- export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, 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, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, BindingMagicString as RolldownMagicString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherFileWatcherOptions, WatcherOptions, build, defineConfig, rolldown, watch };
3
+ import { $ as VERSION, $t as GlobalsFunction, A as RolldownPluginOption, At as WarningHandlerWithDefault, Bt as build, C as ParallelPluginHooks, Ct as RolldownFsModule, D as ResolveIdResult, Dt as TransformOptions, E as ResolveIdExtraOptions, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkFileNamesFunction, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingNameFunction, Kt as ChunkingContext, Lt as rolldown, M as TransformResult, Mt as watch, Nt as RolldownWatcher, O as ResolvedId, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GeneratedCodePreset, Rt as RolldownBuild, S as ObjectHook, St as RolldownFileStats, T as Plugin, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as BuiltinModuleTag, Xt as CommentsOptions, Yt as CodeSplittingOptions, Zt as GeneratedCodeOptions, _ as HookFilterExtension, _t as GeneralHookFilter, a as ChunkOptimizationOptions, an as OutputChunk, at as TransformPluginContext, b as ModuleOptions, bt as BufferEncoding, c as InputOption, cn as RolldownOutput, ct as EmittedFile, d as OptimizationOptions, dn as ModuleInfo, dt as PluginContext, en as MinifyOptions, et as BundleError, f as WatcherFileWatcherOptions, fn as SourcemapIgnoreListOption, ft as PluginContextResolveOptions, g as FunctionPluginHooks, gt as PluginContextMeta, h as CustomPluginOptions, ht as MinimalPluginContext, i as RolldownOptions, in as OutputAsset, it as TreeshakingOptions, j as SourceDescription, jt as RolldownMagicString, k as RolldownPlugin, kt as LoggingFunction, l as InputOptions, ln as SourceMap, lt as EmittedPrebuiltChunk, m as AsyncPluginHooks, n as RolldownOptionsFunction, nn as OutputOptions, nt as SourceMapInput, o as ExternalOption, on as RenderedChunk, ot as EmittedAsset, p as WatcherOptions, pt as DefineParallelPluginResult, qt as CodeSplittingGroup, r as defineConfig, rn as PreRenderedAsset, rt as OutputBundle, s as ExternalOptionFunction, sn as RenderedModule, st as EmittedChunk, t as ConfigExport, tn as ModuleFormat, tt as ExistingRawSourceMap, u as ModuleTypes, ut as GetModuleInfo, v as ImportKind, vt as HookFilter, w as PartialResolvedId, wt as InternalModuleFormat, x as ModuleType, xt as RolldownDirectoryEntry, y as LoadResult, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-CYgMQYTy.mjs";
4
+ import { o as PartialNull } from "./shared/utils-KRVeJqya.mjs";
5
+ export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BuiltinModuleTag, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkOptimizationOptions, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, 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, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, RolldownMagicString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherFileWatcherOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,10 +1,6 @@
1
- import { n as onExit, t as watch } from "./shared/watch-Cj4uDLQX.mjs";
2
- import "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
3
- import { a as BindingMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-Cfptl9gw.mjs";
4
- import "./shared/rolldown-build-DZ7tJkeQ.mjs";
5
- import "./shared/error-CQ6njWsV.mjs";
6
- import "./shared/parse-DDUnGYGU.mjs";
7
- import { t as rolldown } from "./shared/rolldown-BDqeiCX1.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-DXAEaxPd.mjs";
2
+ import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-C7dl2XLe.mjs";
3
+ import { t as rolldown } from "./shared/rolldown-Dyy9Y2li.mjs";
8
4
  import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
9
5
  import { isMainThread } from "node:worker_threads";
10
6
  import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
@@ -50,4 +46,4 @@ async function build(options) {
50
46
  }
51
47
  }
52
48
  //#endregion
53
- export { RUNTIME_MODULE_ID, BindingMagicString as RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
49
+ export { RUNTIME_MODULE_ID, RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
@@ -186,6 +186,8 @@ function augmentCodeLocation(properties, pos, source, id) {
186
186
  //#endregion
187
187
  //#region src/builtin-plugin/utils.ts
188
188
  var BuiltinPlugin = class {
189
+ name;
190
+ _options;
189
191
  /** Vite-specific option to control plugin ordering */
190
192
  enforce;
191
193
  constructor(name, _options) {
@@ -196,17 +198,25 @@ var BuiltinPlugin = class {
196
198
  function makeBuiltinPluginCallable(plugin) {
197
199
  let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
198
200
  const wrappedPlugin = plugin;
199
- for (const key in callablePlugin) wrappedPlugin[key] = async function(...args) {
200
- try {
201
- return await callablePlugin[key](...args);
202
- } catch (e) {
203
- if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
204
- return error(logPluginError(e, plugin.name, {
205
- hook: key,
206
- id: key === "transform" ? args[2] : void 0
207
- }));
208
- }
209
- };
201
+ for (const key in callablePlugin) {
202
+ const wrappedHook = async function(...args) {
203
+ try {
204
+ return await callablePlugin[key](...args);
205
+ } catch (e) {
206
+ if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
207
+ return error(logPluginError(e, plugin.name, {
208
+ hook: key,
209
+ id: key === "transform" ? args[2] : void 0
210
+ }));
211
+ }
212
+ };
213
+ const order = callablePlugin.getOrder(key);
214
+ if (order == void 0) wrappedPlugin[key] = wrappedHook;
215
+ else wrappedPlugin[key] = {
216
+ handler: wrappedHook,
217
+ order
218
+ };
219
+ }
210
220
  return wrappedPlugin;
211
221
  }
212
222
  function bindingifyBuiltInPlugin(plugin) {
@@ -1,7 +1,4 @@
1
- import "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
2
- import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Cfptl9gw.mjs";
3
- import "./shared/error-CQ6njWsV.mjs";
4
- import "./shared/parse-DDUnGYGU.mjs";
1
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-C7dl2XLe.mjs";
5
2
  import { parentPort, workerData } from "node:worker_threads";
6
3
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
7
4
  //#region src/parallel-plugin-worker.ts
@@ -1,5 +1,5 @@
1
- import { w as Plugin } from "./shared/define-config-B1J71V4c.mjs";
2
- import { i as MaybePromise } from "./shared/utils-6wxe_LMG.mjs";
1
+ import { T as Plugin } from "./shared/define-config-CYgMQYTy.mjs";
2
+ import { i as MaybePromise } from "./shared/utils-KRVeJqya.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,5 +1,4 @@
1
- import { Dt as Program } from "./shared/types-Cx3HYorz.mjs";
2
- import { ParseResult as ParseResult$1, ParserOptions as ParserOptions$1 } from "./binding.cjs";
1
+ import { L as ParseResult$1, R as ParserOptions$1, bn as Program } from "./shared/binding-CaVxb0SV.mjs";
3
2
 
4
3
  //#region src/parse-ast-index.d.ts
5
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-D80CXhvg.mjs";
2
- import { n as parseSync, t as parse } from "./shared/parse-DDUnGYGU.mjs";
2
+ import { n as parseSync, t as parse } from "./shared/parse-Bmk53Le1.mjs";
3
3
  //#region src/parse-ast-index.ts
4
4
  function wrap(result, filename, sourceText) {
5
5
  if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
@@ -1,5 +1,5 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-TtAGUp42.js";
2
- import { t as esmExternalRequirePlugin } from "./constructors-BgL_dmUe.js";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-CBPw_c5O.js";
2
+ import { t as esmExternalRequirePlugin } from "./constructors-BTLtc_G_.js";
3
3
  //#region src/builtin-plugin/replace-plugin.ts
4
4
  /**
5
5
  * Replaces targeted strings in files while bundling.
@@ -1,6 +1,6 @@
1
- import { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.mjs";
2
- import { t as esmExternalRequirePlugin } from "./shared/constructors-C1tQjDsj.mjs";
3
- import { BindingReplacePluginConfig } from "../binding.cjs";
1
+ import { m as BindingReplacePluginConfig } from "./shared/binding-CaVxb0SV.mjs";
2
+ import { t as BuiltinPlugin } from "./shared/utils-KRVeJqya.mjs";
3
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-B1JYJxhf.mjs";
4
4
 
5
5
  //#region src/builtin-plugin/replace-plugin.d.ts
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-CF3Uz6aU.mjs";
2
- import { t as esmExternalRequirePlugin } from "./shared/constructors-C7Kkidxk.mjs";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-Dq6w-2tU.mjs";
2
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-CI_8FAaP.mjs";
3
3
  //#region src/builtin-plugin/replace-plugin.ts
4
4
  /**
5
5
  * Replaces targeted strings in files while bundling.
@@ -1,5 +1,5 @@
1
- import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-DkAP_6fk.js";
2
- import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync } from "./rolldown-binding.wasi-browser.js";
1
+ import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-CIj5jXSo.js";
2
+ import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
3
3
  //#region src/utils/minify.ts
4
4
  /**
5
5
  * Minify asynchronously.
@@ -35,6 +35,7 @@ function minifySync$1(filename, sourceText, options) {
35
35
  }
36
36
  //#endregion
37
37
  //#region src/utils/transform.ts
38
+ const yarnPnp$1 = typeof process === "object" && !!process.versions?.pnp;
38
39
  /**
39
40
  * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
40
41
  *
@@ -54,7 +55,7 @@ function minifySync$1(filename, sourceText, options) {
54
55
  * @experimental
55
56
  */
56
57
  async function transform(filename, sourceText, options, cache) {
57
- const result = await enhancedTransform(filename, sourceText, options, cache);
58
+ const result = await enhancedTransform(filename, sourceText, options, cache, yarnPnp$1);
58
59
  return {
59
60
  ...result,
60
61
  errors: result.errors.map(normalizeBindingError),
@@ -78,7 +79,7 @@ async function transform(filename, sourceText, options, cache) {
78
79
  * @experimental
79
80
  */
80
81
  function transformSync(filename, sourceText, options, cache) {
81
- const result = enhancedTransformSync(filename, sourceText, options, cache);
82
+ const result = enhancedTransformSync(filename, sourceText, options, cache, yarnPnp$1);
82
83
  return {
83
84
  ...result,
84
85
  errors: result.errors.map(normalizeBindingError),
@@ -86,4 +87,26 @@ function transformSync(filename, sourceText, options, cache) {
86
87
  };
87
88
  }
88
89
  //#endregion
89
- export { minifySync$1 as a, minify$1 as i, transform as n, transformSync as r, TsconfigCache as t };
90
+ //#region src/utils/resolve-tsconfig.ts
91
+ const yarnPnp = typeof process === "object" && !!process.versions?.pnp;
92
+ /**
93
+ * Cache for tsconfig resolution to avoid redundant file system operations.
94
+ *
95
+ * The cache stores resolved tsconfig configurations keyed by their file paths.
96
+ * When transforming multiple files in the same project, tsconfig lookups are
97
+ * deduplicated, improving performance.
98
+ *
99
+ * @category Utilities
100
+ * @experimental
101
+ */
102
+ var TsconfigCache$1 = class extends TsconfigCache {
103
+ constructor() {
104
+ super(yarnPnp);
105
+ }
106
+ };
107
+ /** @hidden This is only expected to be used by Vite */
108
+ function resolveTsconfig$1(filename, cache) {
109
+ return resolveTsconfig(filename, cache, yarnPnp);
110
+ }
111
+ //#endregion
112
+ export { minify$1 as a, transformSync as i, resolveTsconfig$1 as n, minifySync$1 as o, transform as r, TsconfigCache$1 as t };
@@ -43,6 +43,12 @@ const {
43
43
  })
44
44
  worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))
45
45
 
46
+ worker.addEventListener('error', (event) => {
47
+ if (event.data && typeof event.data === 'object' && event.data.type === 'error') {
48
+ window.dispatchEvent(new CustomEvent('napi-rs-worker-error', { detail: event.data }))
49
+ }
50
+ })
51
+
46
52
  return worker
47
53
  },
48
54
  overwriteImports(importObject) {