@rolldown/browser 1.0.0-beta.10-commit.81375fe → 1.0.0-beta.10-commit.2c4c2a8

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 (37) hide show
  1. package/dist/cli.cjs +2 -2
  2. package/dist/cli.mjs +2 -2
  3. package/dist/config.cjs +2 -2
  4. package/dist/config.d.cts +2 -3
  5. package/dist/config.d.mts +2 -3
  6. package/dist/config.mjs +2 -2
  7. package/dist/experimental-index.browser.mjs +1 -1
  8. package/dist/experimental-index.cjs +1 -1
  9. package/dist/experimental-index.d.cts +13 -44
  10. package/dist/experimental-index.d.mts +13 -44
  11. package/dist/experimental-index.mjs +1 -1
  12. package/dist/filter-index.d.cts +3 -2
  13. package/dist/filter-index.d.mts +3 -2
  14. package/dist/index.browser.mjs +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.d.cts +2 -2
  17. package/dist/index.d.mts +2 -2
  18. package/dist/index.mjs +1 -1
  19. package/dist/parallel-plugin-worker.cjs +1 -1
  20. package/dist/parallel-plugin-worker.mjs +1 -1
  21. package/dist/parallel-plugin.d.cts +6 -6
  22. package/dist/parallel-plugin.d.mts +6 -6
  23. package/dist/parse-ast-index.d.cts +2 -2
  24. package/dist/parse-ast-index.d.mts +2 -2
  25. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  26. package/dist/shared/binding-BYafUgFF.d.cts +1652 -0
  27. package/dist/shared/binding-Dod8fhx9.d.mts +1652 -0
  28. package/dist/shared/define-config-BetvTt9D.d.cts +1048 -0
  29. package/dist/shared/define-config-cqCLLLZ-.d.mts +1048 -0
  30. package/dist/shared/{load-config-a5TDbL5U.mjs → load-config-CYWG5VGh.mjs} +1 -1
  31. package/dist/shared/{load-config-Cr472rVH.cjs → load-config-CZJl5O5j.cjs} +1 -1
  32. package/dist/shared/{src-Cd6dJVwS.cjs → src-BuLkcy4X.cjs} +46 -16
  33. package/dist/shared/{src-Mp5z-lgE.mjs → src-DjLBYDtp.mjs} +46 -16
  34. package/dist/{src--mQWdm3h.js → src-C1J_jnOM.js} +46 -16
  35. package/package.json +1 -1
  36. package/dist/shared/define-config.d-BDJzbjFe.d.mts +0 -1168
  37. package/dist/shared/define-config.d-C0X0fNDk.d.cts +0 -1168
@@ -1,4 +1,4 @@
1
- import { rolldown } from "./src-Mp5z-lgE.mjs";
1
+ import { rolldown } from "./src-DjLBYDtp.mjs";
2
2
  import path from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { cwd } from "node:process";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_src = require('./src-Cd6dJVwS.cjs');
2
+ const require_src = require('./src-BuLkcy4X.cjs');
3
3
  const node_path = require_chunk.__toESM(require("node:path"));
4
4
  const node_url = require_chunk.__toESM(require("node:url"));
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
@@ -8,7 +8,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
8
8
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
9
9
 
10
10
  //#region package.json
11
- var version = "1.0.0-beta.10-commit.81375fe";
11
+ var version = "1.0.0-beta.10-commit.2c4c2a8";
12
12
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
13
13
 
14
14
  //#endregion
@@ -1933,6 +1933,17 @@ const JsxOptionsSchema = strictObject({
1933
1933
  pragmaFlag: pipe(optional(string()), description("Jsx fragment transformation")),
1934
1934
  refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
1935
1935
  });
1936
+ const RollupJsxOptionsSchema = strictObject({
1937
+ mode: optional(union([
1938
+ literal("classic"),
1939
+ literal("automatic"),
1940
+ literal("preserve")
1941
+ ])),
1942
+ factory: optional(string()),
1943
+ fragment: optional(string()),
1944
+ importSource: optional(string()),
1945
+ jsxImportSource: optional(string())
1946
+ });
1936
1947
  const HelperModeSchema = union([literal("Runtime"), literal("External")]);
1937
1948
  const DecoratorOptionSchema = object({
1938
1949
  legacy: optional(boolean()),
@@ -2057,12 +2068,13 @@ const InputOptionsSchema = strictObject({
2057
2068
  define: pipe(optional(record(string(), string())), description("Define global variables")),
2058
2069
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
2059
2070
  profilerNames: optional(boolean()),
2060
- jsx: pipe(optional(union([
2071
+ jsx: optional(union([
2061
2072
  literal(false),
2062
2073
  literal("react"),
2063
2074
  literal("react-jsx"),
2064
- literal("preserve")
2065
- ])), description("Jsx options preset")),
2075
+ literal("preserve"),
2076
+ RollupJsxOptionsSchema
2077
+ ])),
2066
2078
  transform: optional(TransformOptionsSchema),
2067
2079
  watch: optional(union([WatchOptionsSchema, literal(false)])),
2068
2080
  dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
@@ -2074,7 +2086,13 @@ const InputCliOverrideSchema = strictObject({
2074
2086
  input: pipe(optional(array(string())), description("Entry file")),
2075
2087
  external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
2076
2088
  inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
2077
- treeshake: pipe(optional(boolean()), description("enable treeshaking"))
2089
+ treeshake: pipe(optional(boolean()), description("enable treeshaking")),
2090
+ jsx: pipe(optional(union([
2091
+ literal(false),
2092
+ literal("react"),
2093
+ literal("react-jsx"),
2094
+ literal("preserve")
2095
+ ])), description("Jsx options preset"))
2078
2096
  });
2079
2097
  const InputCliOptionsSchema = omit(strictObject({
2080
2098
  ...InputOptionsSchema.entries,
@@ -2408,7 +2426,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
2408
2426
  }
2409
2427
 
2410
2428
  //#endregion
2411
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-D6FCK2GA.js
2429
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-D6FCK2GA.js
2412
2430
  function u$1(o$1, n$1, a$2) {
2413
2431
  let t$2 = (r$1) => o$1(r$1, ...n$1);
2414
2432
  return a$2 === void 0 ? t$2 : Object.assign(t$2, {
@@ -2418,7 +2436,7 @@ function u$1(o$1, n$1, a$2) {
2418
2436
  }
2419
2437
 
2420
2438
  //#endregion
2421
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-WIMGWYZL.js
2439
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-WIMGWYZL.js
2422
2440
  function u(r$1, n$1, o$1) {
2423
2441
  let a$2 = r$1.length - n$1.length;
2424
2442
  if (a$2 === 0) return r$1(...n$1);
@@ -2427,7 +2445,7 @@ function u(r$1, n$1, o$1) {
2427
2445
  }
2428
2446
 
2429
2447
  //#endregion
2430
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-3IFJP4R5.js
2448
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-3IFJP4R5.js
2431
2449
  function d(...r$1) {
2432
2450
  return u(i, r$1);
2433
2451
  }
@@ -2438,7 +2456,7 @@ var i = (r$1, t$2) => {
2438
2456
  };
2439
2457
 
2440
2458
  //#endregion
2441
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-5NQBDF4H.js
2459
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-5NQBDF4H.js
2442
2460
  function t(...n$1) {
2443
2461
  return u(Object.keys, n$1);
2444
2462
  }
@@ -3764,6 +3782,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3764
3782
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
3765
3783
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3766
3784
  });
3785
+ const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
3786
+ const transform = inputOptions.transform || jsxTransform;
3767
3787
  return {
3768
3788
  input: bindingifyInput(inputOptions.input),
3769
3789
  plugins,
@@ -3787,8 +3807,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3787
3807
  attachDebugInfo: inputOptions.experimental?.attachDebugInfo
3788
3808
  },
3789
3809
  profilerNames: inputOptions?.profilerNames,
3790
- jsx: bindingifyJsx(inputOptions.jsx),
3791
- transform: inputOptions.transform,
3810
+ jsx,
3811
+ transform,
3792
3812
  watch: bindingifyWatch(inputOptions.watch),
3793
3813
  dropLabels: inputOptions.dropLabels,
3794
3814
  keepNames: inputOptions.keepNames,
@@ -3889,12 +3909,22 @@ function bindingifyInput(input) {
3889
3909
  });
3890
3910
  }
3891
3911
  function bindingifyJsx(input) {
3912
+ if (typeof input === "object") {
3913
+ if (input.mode === "preserve") return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Preserve };
3914
+ const mode = input.mode ?? "automatic";
3915
+ return { jsxTransform: { jsx: {
3916
+ runtime: mode,
3917
+ pragma: input.factory,
3918
+ pragmaFrag: input.fragment,
3919
+ importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
3920
+ } } };
3921
+ }
3892
3922
  switch (input) {
3893
- case false: return src_rolldown_binding_wasi_cjs.BindingJsx.Disable;
3894
- case "react": return src_rolldown_binding_wasi_cjs.BindingJsx.React;
3895
- case "react-jsx": return src_rolldown_binding_wasi_cjs.BindingJsx.ReactJsx;
3896
- case "preserve": return src_rolldown_binding_wasi_cjs.BindingJsx.Preserve;
3897
- default: return void 0;
3923
+ case false: return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Disable };
3924
+ case "react": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.React };
3925
+ case "react-jsx": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.ReactJsx };
3926
+ case "preserve": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Preserve };
3927
+ default: return { jsx: void 0 };
3898
3928
  }
3899
3929
  }
3900
3930
  function bindingifyWatch(watch$1) {
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
 
34
34
  //#endregion
35
35
  //#region package.json
36
- var version = "1.0.0-beta.10-commit.81375fe";
36
+ var version = "1.0.0-beta.10-commit.2c4c2a8";
37
37
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
38
38
 
39
39
  //#endregion
@@ -1958,6 +1958,17 @@ const JsxOptionsSchema = strictObject({
1958
1958
  pragmaFlag: pipe(optional(string()), description("Jsx fragment transformation")),
1959
1959
  refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
1960
1960
  });
1961
+ const RollupJsxOptionsSchema = strictObject({
1962
+ mode: optional(union([
1963
+ literal("classic"),
1964
+ literal("automatic"),
1965
+ literal("preserve")
1966
+ ])),
1967
+ factory: optional(string()),
1968
+ fragment: optional(string()),
1969
+ importSource: optional(string()),
1970
+ jsxImportSource: optional(string())
1971
+ });
1961
1972
  const HelperModeSchema = union([literal("Runtime"), literal("External")]);
1962
1973
  const DecoratorOptionSchema = object({
1963
1974
  legacy: optional(boolean()),
@@ -2082,12 +2093,13 @@ const InputOptionsSchema = strictObject({
2082
2093
  define: pipe(optional(record(string(), string())), description("Define global variables")),
2083
2094
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
2084
2095
  profilerNames: optional(boolean()),
2085
- jsx: pipe(optional(union([
2096
+ jsx: optional(union([
2086
2097
  literal(false),
2087
2098
  literal("react"),
2088
2099
  literal("react-jsx"),
2089
- literal("preserve")
2090
- ])), description("Jsx options preset")),
2100
+ literal("preserve"),
2101
+ RollupJsxOptionsSchema
2102
+ ])),
2091
2103
  transform: optional(TransformOptionsSchema),
2092
2104
  watch: optional(union([WatchOptionsSchema, literal(false)])),
2093
2105
  dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
@@ -2099,7 +2111,13 @@ const InputCliOverrideSchema = strictObject({
2099
2111
  input: pipe(optional(array(string())), description("Entry file")),
2100
2112
  external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
2101
2113
  inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
2102
- treeshake: pipe(optional(boolean()), description("enable treeshaking"))
2114
+ treeshake: pipe(optional(boolean()), description("enable treeshaking")),
2115
+ jsx: pipe(optional(union([
2116
+ literal(false),
2117
+ literal("react"),
2118
+ literal("react-jsx"),
2119
+ literal("preserve")
2120
+ ])), description("Jsx options preset"))
2103
2121
  });
2104
2122
  const InputCliOptionsSchema = omit(strictObject({
2105
2123
  ...InputOptionsSchema.entries,
@@ -2433,7 +2451,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
2433
2451
  }
2434
2452
 
2435
2453
  //#endregion
2436
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-D6FCK2GA.js
2454
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-D6FCK2GA.js
2437
2455
  function u$1(o$1, n$1, a$2) {
2438
2456
  let t$2 = (r$1) => o$1(r$1, ...n$1);
2439
2457
  return a$2 === void 0 ? t$2 : Object.assign(t$2, {
@@ -2443,7 +2461,7 @@ function u$1(o$1, n$1, a$2) {
2443
2461
  }
2444
2462
 
2445
2463
  //#endregion
2446
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-WIMGWYZL.js
2464
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-WIMGWYZL.js
2447
2465
  function u(r$1, n$1, o$1) {
2448
2466
  let a$2 = r$1.length - n$1.length;
2449
2467
  if (a$2 === 0) return r$1(...n$1);
@@ -2452,7 +2470,7 @@ function u(r$1, n$1, o$1) {
2452
2470
  }
2453
2471
 
2454
2472
  //#endregion
2455
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-3IFJP4R5.js
2473
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-3IFJP4R5.js
2456
2474
  function d(...r$1) {
2457
2475
  return u(i, r$1);
2458
2476
  }
@@ -2463,7 +2481,7 @@ var i = (r$1, t$2) => {
2463
2481
  };
2464
2482
 
2465
2483
  //#endregion
2466
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-5NQBDF4H.js
2484
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-5NQBDF4H.js
2467
2485
  function t(...n$1) {
2468
2486
  return u(Object.keys, n$1);
2469
2487
  }
@@ -3789,6 +3807,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3789
3807
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
3790
3808
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3791
3809
  });
3810
+ const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
3811
+ const transform = inputOptions.transform || jsxTransform;
3792
3812
  return {
3793
3813
  input: bindingifyInput(inputOptions.input),
3794
3814
  plugins,
@@ -3812,8 +3832,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3812
3832
  attachDebugInfo: inputOptions.experimental?.attachDebugInfo
3813
3833
  },
3814
3834
  profilerNames: inputOptions?.profilerNames,
3815
- jsx: bindingifyJsx(inputOptions.jsx),
3816
- transform: inputOptions.transform,
3835
+ jsx,
3836
+ transform,
3817
3837
  watch: bindingifyWatch(inputOptions.watch),
3818
3838
  dropLabels: inputOptions.dropLabels,
3819
3839
  keepNames: inputOptions.keepNames,
@@ -3914,12 +3934,22 @@ function bindingifyInput(input) {
3914
3934
  });
3915
3935
  }
3916
3936
  function bindingifyJsx(input) {
3937
+ if (typeof input === "object") {
3938
+ if (input.mode === "preserve") return { jsx: BindingJsx.Preserve };
3939
+ const mode = input.mode ?? "automatic";
3940
+ return { jsxTransform: { jsx: {
3941
+ runtime: mode,
3942
+ pragma: input.factory,
3943
+ pragmaFrag: input.fragment,
3944
+ importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
3945
+ } } };
3946
+ }
3917
3947
  switch (input) {
3918
- case false: return BindingJsx.Disable;
3919
- case "react": return BindingJsx.React;
3920
- case "react-jsx": return BindingJsx.ReactJsx;
3921
- case "preserve": return BindingJsx.Preserve;
3922
- default: return void 0;
3948
+ case false: return { jsx: BindingJsx.Disable };
3949
+ case "react": return { jsx: BindingJsx.React };
3950
+ case "react-jsx": return { jsx: BindingJsx.ReactJsx };
3951
+ case "preserve": return { jsx: BindingJsx.Preserve };
3952
+ default: return { jsx: void 0 };
3923
3953
  }
3924
3954
  }
3925
3955
  function bindingifyWatch(watch$1) {
@@ -28,7 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
 
29
29
  //#endregion
30
30
  //#region package.json
31
- var version = "1.0.0-beta.10-commit.81375fe";
31
+ var version = "1.0.0-beta.10-commit.2c4c2a8";
32
32
 
33
33
  //#endregion
34
34
  //#region src/builtin-plugin/utils.ts
@@ -1761,6 +1761,17 @@ const JsxOptionsSchema = strictObject({
1761
1761
  pragmaFlag: pipe(optional(string()), description("Jsx fragment transformation")),
1762
1762
  refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
1763
1763
  });
1764
+ const RollupJsxOptionsSchema = strictObject({
1765
+ mode: optional(union([
1766
+ literal("classic"),
1767
+ literal("automatic"),
1768
+ literal("preserve")
1769
+ ])),
1770
+ factory: optional(string()),
1771
+ fragment: optional(string()),
1772
+ importSource: optional(string()),
1773
+ jsxImportSource: optional(string())
1774
+ });
1764
1775
  const HelperModeSchema = union([literal("Runtime"), literal("External")]);
1765
1776
  const DecoratorOptionSchema = object({
1766
1777
  legacy: optional(boolean()),
@@ -1885,12 +1896,13 @@ const InputOptionsSchema = strictObject({
1885
1896
  define: pipe(optional(record(string(), string())), description("Define global variables")),
1886
1897
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
1887
1898
  profilerNames: optional(boolean()),
1888
- jsx: pipe(optional(union([
1899
+ jsx: optional(union([
1889
1900
  literal(false),
1890
1901
  literal("react"),
1891
1902
  literal("react-jsx"),
1892
- literal("preserve")
1893
- ])), description("Jsx options preset")),
1903
+ literal("preserve"),
1904
+ RollupJsxOptionsSchema
1905
+ ])),
1894
1906
  transform: optional(TransformOptionsSchema),
1895
1907
  watch: optional(union([WatchOptionsSchema, literal(false)])),
1896
1908
  dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
@@ -1902,7 +1914,13 @@ const InputCliOverrideSchema = strictObject({
1902
1914
  input: pipe(optional(array(string())), description("Entry file")),
1903
1915
  external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
1904
1916
  inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
1905
- treeshake: pipe(optional(boolean()), description("enable treeshaking"))
1917
+ treeshake: pipe(optional(boolean()), description("enable treeshaking")),
1918
+ jsx: pipe(optional(union([
1919
+ literal(false),
1920
+ literal("react"),
1921
+ literal("react-jsx"),
1922
+ literal("preserve")
1923
+ ])), description("Jsx options preset"))
1906
1924
  });
1907
1925
  const InputCliOptionsSchema = omit(strictObject({
1908
1926
  ...InputOptionsSchema.entries,
@@ -2304,7 +2322,7 @@ function exclude(expr) {
2304
2322
  }
2305
2323
 
2306
2324
  //#endregion
2307
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-D6FCK2GA.js
2325
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-D6FCK2GA.js
2308
2326
  function u$1(o$1, n$1, a$2) {
2309
2327
  let t$2 = (r$1) => o$1(r$1, ...n$1);
2310
2328
  return a$2 === void 0 ? t$2 : Object.assign(t$2, {
@@ -2314,7 +2332,7 @@ function u$1(o$1, n$1, a$2) {
2314
2332
  }
2315
2333
 
2316
2334
  //#endregion
2317
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-WIMGWYZL.js
2335
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-WIMGWYZL.js
2318
2336
  function u(r$1, n$1, o$1) {
2319
2337
  let a$2 = r$1.length - n$1.length;
2320
2338
  if (a$2 === 0) return r$1(...n$1);
@@ -2323,7 +2341,7 @@ function u(r$1, n$1, o$1) {
2323
2341
  }
2324
2342
 
2325
2343
  //#endregion
2326
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-3IFJP4R5.js
2344
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-3IFJP4R5.js
2327
2345
  function d(...r$1) {
2328
2346
  return u(i, r$1);
2329
2347
  }
@@ -2334,7 +2352,7 @@ var i = (r$1, t$2) => {
2334
2352
  };
2335
2353
 
2336
2354
  //#endregion
2337
- //#region ../../node_modules/.pnpm/remeda@2.22.3/node_modules/remeda/dist/chunk-5NQBDF4H.js
2355
+ //#region ../../node_modules/.pnpm/remeda@2.21.6/node_modules/remeda/dist/chunk-5NQBDF4H.js
2338
2356
  function t(...n$1) {
2339
2357
  return u(Object.keys, n$1);
2340
2358
  }
@@ -3731,6 +3749,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3731
3749
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
3732
3750
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3733
3751
  });
3752
+ const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
3753
+ const transform = inputOptions.transform || jsxTransform;
3734
3754
  return {
3735
3755
  input: bindingifyInput(inputOptions.input),
3736
3756
  plugins,
@@ -3754,8 +3774,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3754
3774
  attachDebugInfo: inputOptions.experimental?.attachDebugInfo
3755
3775
  },
3756
3776
  profilerNames: inputOptions?.profilerNames,
3757
- jsx: bindingifyJsx(inputOptions.jsx),
3758
- transform: inputOptions.transform,
3777
+ jsx,
3778
+ transform,
3759
3779
  watch: bindingifyWatch(inputOptions.watch),
3760
3780
  dropLabels: inputOptions.dropLabels,
3761
3781
  keepNames: inputOptions.keepNames,
@@ -3856,12 +3876,22 @@ function bindingifyInput(input) {
3856
3876
  });
3857
3877
  }
3858
3878
  function bindingifyJsx(input) {
3879
+ if (typeof input === "object") {
3880
+ if (input.mode === "preserve") return { jsx: BindingJsx.Preserve };
3881
+ const mode = input.mode ?? "automatic";
3882
+ return { jsxTransform: { jsx: {
3883
+ runtime: mode,
3884
+ pragma: input.factory,
3885
+ pragmaFrag: input.fragment,
3886
+ importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
3887
+ } } };
3888
+ }
3859
3889
  switch (input) {
3860
- case false: return BindingJsx.Disable;
3861
- case "react": return BindingJsx.React;
3862
- case "react-jsx": return BindingJsx.ReactJsx;
3863
- case "preserve": return BindingJsx.Preserve;
3864
- default: return void 0;
3890
+ case false: return { jsx: BindingJsx.Disable };
3891
+ case "react": return { jsx: BindingJsx.React };
3892
+ case "react-jsx": return { jsx: BindingJsx.ReactJsx };
3893
+ case "preserve": return { jsx: BindingJsx.Preserve };
3894
+ default: return { jsx: void 0 };
3865
3895
  }
3866
3896
  }
3867
3897
  function bindingifyWatch(watch$1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.10-commit.81375fe",
3
+ "version": "1.0.0-beta.10-commit.2c4c2a8",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",