@rolldown/browser 1.0.0-beta.23 → 1.0.0-beta.24

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 (42) hide show
  1. package/dist/cli.cjs +7 -7
  2. package/dist/cli.mjs +7 -7
  3. package/dist/config.cjs +3 -3
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +3 -3
  7. package/dist/experimental-index.browser.mjs +1 -1
  8. package/dist/experimental-index.cjs +2 -2
  9. package/dist/experimental-index.d.cts +2 -2
  10. package/dist/experimental-index.d.mts +2 -2
  11. package/dist/experimental-index.mjs +2 -2
  12. package/dist/experimental-runtime-types.d.ts +1 -2
  13. package/dist/filter-index.d.cts +2 -2
  14. package/dist/filter-index.d.mts +2 -2
  15. package/dist/index.browser.mjs +1 -1
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.d.cts +3 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +2 -2
  20. package/dist/parallel-plugin-worker.cjs +2 -2
  21. package/dist/parallel-plugin-worker.mjs +2 -2
  22. package/dist/parallel-plugin.d.cts +2 -2
  23. package/dist/parallel-plugin.d.mts +2 -2
  24. package/dist/parse-ast-index.cjs +1 -1
  25. package/dist/parse-ast-index.d.cts +1 -1
  26. package/dist/parse-ast-index.d.mts +1 -1
  27. package/dist/parse-ast-index.mjs +1 -1
  28. package/dist/rolldown-binding.wasi-browser.js +0 -3
  29. package/dist/rolldown-binding.wasi.cjs +0 -3
  30. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  31. package/dist/shared/{binding-CMKStSph.d.cts → binding-DG3bbtXG.d.cts} +0 -8
  32. package/dist/shared/{binding-DB58iXP8.d.mts → binding-cECB-Ts3.d.mts} +0 -8
  33. package/dist/shared/{define-config-BRkYSF9E.d.cts → define-config-BnlWQIlM.d.cts} +11 -3
  34. package/dist/shared/{define-config-CqVfqfZQ.d.mts → define-config-Dipre2WB.d.mts} +11 -3
  35. package/dist/shared/{load-config-Bh2dNRk9.cjs → load-config-B-Wrkmqo.cjs} +1 -1
  36. package/dist/shared/{load-config-BWbXOTbl.mjs → load-config-FXcGLoFh.mjs} +1 -1
  37. package/dist/shared/{parse-ast-index-CGTVCgvx.cjs → parse-ast-index-B0vXlNs8.cjs} +14 -2
  38. package/dist/shared/{parse-ast-index-BzdtcWzA.mjs → parse-ast-index-DQEVpsUG.mjs} +9 -3
  39. package/dist/shared/{src-BA5CL--T.mjs → src-DmJCtJ15.mjs} +52 -25
  40. package/dist/shared/{src-Co_Bf7DL.cjs → src-dEUToPiW.cjs} +52 -25
  41. package/dist/{src-C1KTaRyZ.js → src-BHNQaKQh.js} +59 -26
  42. package/package.json +2 -2
package/dist/cli.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-Co_Bf7DL.cjs');
2
+ const require_src = require('./shared/src-dEUToPiW.cjs');
3
3
  const require_dist = require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-CGTVCgvx.cjs');
5
- const require_load_config = require('./shared/load-config-Bh2dNRk9.cjs');
4
+ require('./shared/parse-ast-index-B0vXlNs8.cjs');
5
+ const require_load_config = require('./shared/load-config-B-Wrkmqo.cjs');
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_process = require_chunk.__toESM(require("node:process"));
8
8
  const node_util = require_chunk.__toESM(require("node:util"));
@@ -1423,8 +1423,8 @@ const process$2 = globalThis.process;
1423
1423
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
1424
1424
 
1425
1425
  //#endregion
1426
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1427
- var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1426
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1427
+ var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1428
1428
  function _usingCtx() {
1429
1429
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1430
1430
  var n$2 = Error();
@@ -1558,7 +1558,7 @@ async function watchInner(config, cliOptions) {
1558
1558
  break;
1559
1559
  case "BUNDLE_END":
1560
1560
  await event.result.close();
1561
- logger.success(`Rebuilt ${require_src.ansis_default.bold(relativeId(event.output[0]))} in ${require_src.ansis_default.bold(ms(event.duration))}.`);
1561
+ logger.success(`Rebuilt ${require_src.ansis_default.bold(relativeId(event.output[0]))} in ${require_src.ansis_default.green(ms(event.duration))}.`);
1562
1562
  break;
1563
1563
  case "ERROR":
1564
1564
  await event.result.close();
@@ -1592,7 +1592,7 @@ async function bundleInner(config, cliOptions) {
1592
1592
  logger.log(``);
1593
1593
  const endTime = node_perf_hooks.performance.now();
1594
1594
  const duration = endTime - startTime;
1595
- logger.success(`Finished in ${require_src.ansis_default.bold(ms(duration))}`);
1595
+ logger.success(`rolldown v${require_src.version} Finished in ${require_src.ansis_default.green(ms(duration))}`);
1596
1596
  }
1597
1597
  function printBundleOutputPretty(output) {
1598
1598
  const outputEntries = collectOutputEntries(output.output);
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-BA5CL--T.mjs";
1
+ import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-DmJCtJ15.mjs";
2
2
  import { arraify } from "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-BzdtcWzA.mjs";
4
- import { loadConfig } from "./shared/load-config-BWbXOTbl.mjs";
3
+ import "./shared/parse-ast-index-DQEVpsUG.mjs";
4
+ import { loadConfig } from "./shared/load-config-FXcGLoFh.mjs";
5
5
  import path, { sep } from "node:path";
6
6
  import process$1 from "node:process";
7
7
  import { formatWithOptions, parseArgs } from "node:util";
@@ -1422,8 +1422,8 @@ const process$2 = globalThis.process;
1422
1422
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
1423
1423
 
1424
1424
  //#endregion
1425
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1426
- var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1425
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1426
+ var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1427
1427
  function _usingCtx() {
1428
1428
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1429
1429
  var n$2 = Error();
@@ -1557,7 +1557,7 @@ async function watchInner(config, cliOptions) {
1557
1557
  break;
1558
1558
  case "BUNDLE_END":
1559
1559
  await event.result.close();
1560
- logger.success(`Rebuilt ${ansis_default.bold(relativeId(event.output[0]))} in ${ansis_default.bold(ms(event.duration))}.`);
1560
+ logger.success(`Rebuilt ${ansis_default.bold(relativeId(event.output[0]))} in ${ansis_default.green(ms(event.duration))}.`);
1561
1561
  break;
1562
1562
  case "ERROR":
1563
1563
  await event.result.close();
@@ -1591,7 +1591,7 @@ async function bundleInner(config, cliOptions) {
1591
1591
  logger.log(``);
1592
1592
  const endTime = performance.now();
1593
1593
  const duration = endTime - startTime;
1594
- logger.success(`Finished in ${ansis_default.bold(ms(duration))}`);
1594
+ logger.success(`rolldown v${version} Finished in ${ansis_default.green(ms(duration))}`);
1595
1595
  }
1596
1596
  function printBundleOutputPretty(output) {
1597
1597
  const outputEntries = collectOutputEntries(output.output);
package/dist/config.cjs CHANGED
@@ -1,7 +1,7 @@
1
- const require_src = require('./shared/src-Co_Bf7DL.cjs');
1
+ const require_src = require('./shared/src-dEUToPiW.cjs');
2
2
  require('./shared/dist-BVAp8sOm.cjs');
3
- require('./shared/parse-ast-index-CGTVCgvx.cjs');
4
- const require_load_config = require('./shared/load-config-Bh2dNRk9.cjs');
3
+ require('./shared/parse-ast-index-B0vXlNs8.cjs');
4
+ const require_load_config = require('./shared/load-config-B-Wrkmqo.cjs');
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = require_src.version;
package/dist/config.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CMKStSph.cjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-BRkYSF9E.cjs";
1
+ import "./shared/binding-DG3bbtXG.cjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-BnlWQIlM.cjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-DB58iXP8.mjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-CqVfqfZQ.mjs";
1
+ import "./shared/binding-cECB-Ts3.mjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-Dipre2WB.mjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineConfig, version } from "./shared/src-BA5CL--T.mjs";
1
+ import { defineConfig, version } from "./shared/src-DmJCtJ15.mjs";
2
2
  import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-BzdtcWzA.mjs";
4
- import { loadConfig } from "./shared/load-config-BWbXOTbl.mjs";
3
+ import "./shared/parse-ast-index-DQEVpsUG.mjs";
4
+ import { loadConfig } from "./shared/load-config-FXcGLoFh.mjs";
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = version;
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-C1KTaRyZ.js";
1
+ import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-BHNQaKQh.js";
2
2
  import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
3
3
 
4
4
  //#region src/api/experimental.ts
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-Co_Bf7DL.cjs');
2
+ const require_src = require('./shared/src-dEUToPiW.cjs');
3
3
  require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-CGTVCgvx.cjs');
4
+ require('./shared/parse-ast-index-B0vXlNs8.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
7
7
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CMKStSph.cjs";
2
- import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-BRkYSF9E.cjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-DG3bbtXG.cjs";
2
+ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-BnlWQIlM.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-DB58iXP8.mjs";
2
- import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-CqVfqfZQ.mjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-cECB-Ts3.mjs";
2
+ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-Dipre2WB.mjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,6 +1,6 @@
1
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-BA5CL--T.mjs";
1
+ import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-DmJCtJ15.mjs";
2
2
  import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-BzdtcWzA.mjs";
3
+ import "./shared/parse-ast-index-DQEVpsUG.mjs";
4
4
  import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
@@ -1,4 +1,4 @@
1
- declare class DevRuntime {
1
+ export class DevRuntime {
2
2
  /**
3
3
  * @type {Record<string, { exports: any }>}
4
4
  */
@@ -10,7 +10,6 @@ declare class DevRuntime {
10
10
  */
11
11
  createModuleHotContext(_moduleId: string): void;
12
12
  /**
13
- *
14
13
  * @param {string[]} _boundaries
15
14
  */
16
15
  applyUpdates(_boundaries: string[]): void;
@@ -1,4 +1,4 @@
1
- import "./shared/binding-CMKStSph.cjs";
2
- import { withFilter } from "./shared/define-config-BRkYSF9E.cjs";
1
+ import "./shared/binding-DG3bbtXG.cjs";
2
+ import { withFilter } from "./shared/define-config-BnlWQIlM.cjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,4 +1,4 @@
1
- import "./shared/binding-DB58iXP8.mjs";
2
- import { withFilter } from "./shared/define-config-CqVfqfZQ.mjs";
1
+ import "./shared/binding-cECB-Ts3.mjs";
2
+ import { withFilter } from "./shared/define-config-Dipre2WB.mjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./src-C1KTaRyZ.js";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./src-BHNQaKQh.js";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- const require_src = require('./shared/src-Co_Bf7DL.cjs');
1
+ const require_src = require('./shared/src-dEUToPiW.cjs');
2
2
  require('./shared/dist-BVAp8sOm.cjs');
3
- require('./shared/parse-ast-index-CGTVCgvx.cjs');
3
+ require('./shared/parse-ast-index-B0vXlNs8.cjs');
4
4
 
5
5
  exports.VERSION = require_src.VERSION;
6
6
  exports.build = require_src.build;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-CMKStSph.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BRkYSF9E.cjs";
3
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
1
+ import { PreRenderedChunk } from "./shared/binding-DG3bbtXG.cjs";
2
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BnlWQIlM.cjs";
3
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-DB58iXP8.mjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-CqVfqfZQ.mjs";
3
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
1
+ import { PreRenderedChunk } from "./shared/binding-cECB-Ts3.mjs";
2
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-Dipre2WB.mjs";
3
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-BA5CL--T.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-DmJCtJ15.mjs";
2
2
  import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-BzdtcWzA.mjs";
3
+ import "./shared/parse-ast-index-DQEVpsUG.mjs";
4
4
 
5
5
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-Co_Bf7DL.cjs');
2
+ const require_src = require('./shared/src-dEUToPiW.cjs');
3
3
  require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-CGTVCgvx.cjs');
4
+ require('./shared/parse-ast-index-B0vXlNs8.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
7
7
 
@@ -1,6 +1,6 @@
1
- import { PluginContextData, bindingifyPlugin } from "./shared/src-BA5CL--T.mjs";
1
+ import { PluginContextData, bindingifyPlugin } from "./shared/src-DmJCtJ15.mjs";
2
2
  import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-BzdtcWzA.mjs";
3
+ import "./shared/parse-ast-index-DQEVpsUG.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
6
6
 
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CMKStSph.cjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-BRkYSF9E.cjs";
1
+ import "./shared/binding-DG3bbtXG.cjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-BnlWQIlM.cjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,5 +1,5 @@
1
- import "./shared/binding-DB58iXP8.mjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-CqVfqfZQ.mjs";
1
+ import "./shared/binding-cECB-Ts3.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-Dipre2WB.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-CGTVCgvx.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-B0vXlNs8.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst;
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-CMKStSph.cjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-DG3bbtXG.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-DB58iXP8.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-cECB-Ts3.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,3 +1,3 @@
1
- import { parseAst, parseAstAsync } from "./shared/parse-ast-index-BzdtcWzA.mjs";
1
+ import { parseAst, parseAstAsync } from "./shared/parse-ast-index-DQEVpsUG.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };
@@ -66,12 +66,9 @@ export const ParseResult = __napiModule.exports.ParseResult
66
66
  export const ExportExportNameKind = __napiModule.exports.ExportExportNameKind
67
67
  export const ExportImportNameKind = __napiModule.exports.ExportImportNameKind
68
68
  export const ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
69
- export const getBufferOffset = __napiModule.exports.getBufferOffset
70
69
  export const ImportNameKind = __napiModule.exports.ImportNameKind
71
70
  export const parseAsync = __napiModule.exports.parseAsync
72
- export const parseAsyncRaw = __napiModule.exports.parseAsyncRaw
73
71
  export const parseSync = __napiModule.exports.parseSync
74
- export const parseSyncRaw = __napiModule.exports.parseSyncRaw
75
72
  export const rawTransferSupported = __napiModule.exports.rawTransferSupported
76
73
  export const ResolverFactory = __napiModule.exports.ResolverFactory
77
74
  export const EnforceExtension = __napiModule.exports.EnforceExtension
@@ -90,12 +90,9 @@ module.exports.ParseResult = __napiModule.exports.ParseResult
90
90
  module.exports.ExportExportNameKind = __napiModule.exports.ExportExportNameKind
91
91
  module.exports.ExportImportNameKind = __napiModule.exports.ExportImportNameKind
92
92
  module.exports.ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
93
- module.exports.getBufferOffset = __napiModule.exports.getBufferOffset
94
93
  module.exports.ImportNameKind = __napiModule.exports.ImportNameKind
95
94
  module.exports.parseAsync = __napiModule.exports.parseAsync
96
- module.exports.parseAsyncRaw = __napiModule.exports.parseAsyncRaw
97
95
  module.exports.parseSync = __napiModule.exports.parseSync
98
- module.exports.parseSyncRaw = __napiModule.exports.parseSyncRaw
99
96
  module.exports.rawTransferSupported = __napiModule.exports.rawTransferSupported
100
97
  module.exports.ResolverFactory = __napiModule.exports.ResolverFactory
101
98
  module.exports.EnforceExtension = __napiModule.exports.EnforceExtension
@@ -87,14 +87,6 @@ type ExportLocalNameKind = /** `export { name } */
87
87
  * `export default function () {}`
88
88
  */
89
89
  'None';
90
-
91
- /**
92
- * Get offset within a `Uint8Array` which is aligned on 4 GiB.
93
- *
94
- * Does not check that the offset is within bounds of `buffer`.
95
- * To ensure it always is, provide a `Uint8Array` of at least 4 GiB size.
96
- */
97
-
98
90
  interface ImportName {
99
91
  kind: ImportNameKind;
100
92
  name?: string;
@@ -87,14 +87,6 @@ type ExportLocalNameKind = /** `export { name } */
87
87
  * `export default function () {}`
88
88
  */
89
89
  'None';
90
-
91
- /**
92
- * Get offset within a `Uint8Array` which is aligned on 4 GiB.
93
- *
94
- * Does not check that the offset is within bounds of `buffer`.
95
- * To ensure it always is, provide a `Uint8Array` of at least 4 GiB size.
96
- */
97
-
98
90
  interface ImportName {
99
91
  kind: ImportNameKind;
100
92
  name?: string;
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CMKStSph.cjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-DG3bbtXG.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -731,7 +731,11 @@ declare class BuiltinPlugin {
731
731
  constructor(name: BindingBuiltinPluginName, _options?: unknown);
732
732
  }
733
733
  declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
734
- declare function dynamicImportVarsPlugin(config?: BindingDynamicImportVarsPluginConfig): BuiltinPlugin;
734
+ type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
735
+ include?: StringOrRegExp | StringOrRegExp[];
736
+ exclude?: StringOrRegExp | StringOrRegExp[];
737
+ };
738
+ declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
735
739
  declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
736
740
  declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
737
741
  declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
@@ -1002,6 +1006,9 @@ type HmrOptions = boolean | {
1002
1006
  port?: number;
1003
1007
  implement?: string;
1004
1008
  };
1009
+ type OptimizationOptions = {
1010
+ inlineConst?: boolean;
1011
+ };
1005
1012
  type AttachDebugOptions = "none" | "simple" | "full";
1006
1013
  interface RollupJsxOptions {
1007
1014
  mode?: "classic" | "automatic" | "preserve";
@@ -1183,6 +1190,7 @@ interface InputOptions {
1183
1190
  sessionId?: string;
1184
1191
  };
1185
1192
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1193
+ optimization?: OptimizationOptions;
1186
1194
  }
1187
1195
  //#endregion
1188
1196
  //#region src/types/rolldown-options.d.ts
@@ -1201,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
1201
1209
  declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1202
1210
  declare function defineConfig(config: ConfigExport): ConfigExport;
1203
1211
  //#endregion
1204
- export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
1212
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-DB58iXP8.mjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-cECB-Ts3.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -731,7 +731,11 @@ declare class BuiltinPlugin {
731
731
  constructor(name: BindingBuiltinPluginName, _options?: unknown);
732
732
  }
733
733
  declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
734
- declare function dynamicImportVarsPlugin(config?: BindingDynamicImportVarsPluginConfig): BuiltinPlugin;
734
+ type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
735
+ include?: StringOrRegExp | StringOrRegExp[];
736
+ exclude?: StringOrRegExp | StringOrRegExp[];
737
+ };
738
+ declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
735
739
  declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
736
740
  declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
737
741
  declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
@@ -1002,6 +1006,9 @@ type HmrOptions = boolean | {
1002
1006
  port?: number;
1003
1007
  implement?: string;
1004
1008
  };
1009
+ type OptimizationOptions = {
1010
+ inlineConst?: boolean;
1011
+ };
1005
1012
  type AttachDebugOptions = "none" | "simple" | "full";
1006
1013
  interface RollupJsxOptions {
1007
1014
  mode?: "classic" | "automatic" | "preserve";
@@ -1183,6 +1190,7 @@ interface InputOptions {
1183
1190
  sessionId?: string;
1184
1191
  };
1185
1192
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1193
+ optimization?: OptimizationOptions;
1186
1194
  }
1187
1195
  //#endregion
1188
1196
  //#region src/types/rolldown-options.d.ts
@@ -1201,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
1201
1209
  declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1202
1210
  declare function defineConfig(config: ConfigExport): ConfigExport;
1203
1211
  //#endregion
1204
- export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
1212
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_src = require('./src-Co_Bf7DL.cjs');
2
+ const require_src = require('./src-dEUToPiW.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"));
@@ -1,4 +1,4 @@
1
- import { rolldown } from "./src-BA5CL--T.mjs";
1
+ import { rolldown } from "./src-DmJCtJ15.mjs";
2
2
  import path from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { cwd } from "node:process";
@@ -102,7 +102,7 @@ function locate(source, search, options) {
102
102
 
103
103
  //#endregion
104
104
  //#region src/log/logs.ts
105
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
105
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
106
106
  function logParseError(message) {
107
107
  return {
108
108
  code: PARSE_ERROR,
@@ -133,6 +133,12 @@ function logMultiplyNotifyOption() {
133
133
  message: `Found multiply notify option at watch options, using first one to start notify watcher.`
134
134
  };
135
135
  }
136
+ function logDuplicateJsxConfig() {
137
+ return {
138
+ code: DUPLICATE_JSX_CONFIG,
139
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
140
+ };
141
+ }
136
142
  function logPluginError(error$1, plugin, { hook, id } = {}) {
137
143
  try {
138
144
  const code = error$1.code;
@@ -181,7 +187,7 @@ function augmentCodeLocation(properties, pos, source, id) {
181
187
  }
182
188
 
183
189
  //#endregion
184
- //#region ../../node_modules/.pnpm/oxc-parser@0.75.0/node_modules/oxc-parser/wrap.mjs
190
+ //#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
185
191
  function wrap$1(result) {
186
192
  let program, module$1, comments, errors;
187
193
  return {
@@ -276,6 +282,12 @@ Object.defineProperty(exports, 'logCycleLoading', {
276
282
  return logCycleLoading;
277
283
  }
278
284
  });
285
+ Object.defineProperty(exports, 'logDuplicateJsxConfig', {
286
+ enumerable: true,
287
+ get: function () {
288
+ return logDuplicateJsxConfig;
289
+ }
290
+ });
279
291
  Object.defineProperty(exports, 'logInputHookInOutputPlugin', {
280
292
  enumerable: true,
281
293
  get: function () {
@@ -101,7 +101,7 @@ function locate(source, search, options) {
101
101
 
102
102
  //#endregion
103
103
  //#region src/log/logs.ts
104
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
104
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
105
105
  function logParseError(message) {
106
106
  return {
107
107
  code: PARSE_ERROR,
@@ -132,6 +132,12 @@ function logMultiplyNotifyOption() {
132
132
  message: `Found multiply notify option at watch options, using first one to start notify watcher.`
133
133
  };
134
134
  }
135
+ function logDuplicateJsxConfig() {
136
+ return {
137
+ code: DUPLICATE_JSX_CONFIG,
138
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
139
+ };
140
+ }
135
141
  function logPluginError(error$1, plugin, { hook, id } = {}) {
136
142
  try {
137
143
  const code = error$1.code;
@@ -180,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
180
186
  }
181
187
 
182
188
  //#endregion
183
- //#region ../../node_modules/.pnpm/oxc-parser@0.75.0/node_modules/oxc-parser/wrap.mjs
189
+ //#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
184
190
  function wrap$1(result) {
185
191
  let program, module, comments, errors;
186
192
  return {
@@ -257,4 +263,4 @@ async function parseAstAsync(sourceText, options, filename) {
257
263
  }
258
264
 
259
265
  //#endregion
260
- export { augmentCodeLocation, error, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
266
+ export { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
@@ -1,5 +1,5 @@
1
1
  import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-DvBwroyk.mjs";
2
- import { augmentCodeLocation, error, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-BzdtcWzA.mjs";
2
+ import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-DQEVpsUG.mjs";
3
3
  import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -33,9 +33,20 @@ 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.23";
36
+ var version = "1.0.0-beta.24";
37
37
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
38
38
 
39
+ //#endregion
40
+ //#region src/utils/normalize-string-or-regex.ts
41
+ function normalizedStringOrRegex(pattern) {
42
+ if (!pattern) return void 0;
43
+ if (!isReadonlyArray(pattern)) return [pattern];
44
+ return pattern;
45
+ }
46
+ function isReadonlyArray(input) {
47
+ return Array.isArray(input);
48
+ }
49
+
39
50
  //#endregion
40
51
  //#region src/builtin-plugin/utils.ts
41
52
  function makeBuiltinPluginCallable(plugin) {
@@ -65,6 +76,10 @@ function modulePreloadPolyfillPlugin(config) {
65
76
  return new BuiltinPlugin("builtin:module-preload-polyfill", config);
66
77
  }
67
78
  function dynamicImportVarsPlugin(config) {
79
+ if (config) {
80
+ config.include = normalizedStringOrRegex(config.include);
81
+ config.exclude = normalizedStringOrRegex(config.exclude);
82
+ }
68
83
  return new BuiltinPlugin("builtin:dynamic-import-vars", config);
69
84
  }
70
85
  function importGlobPlugin(config) {
@@ -2127,6 +2142,7 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
2127
2142
  unknownGlobalSideEffects: optional(boolean()),
2128
2143
  commonjs: optional(boolean())
2129
2144
  })]);
2145
+ const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
2130
2146
  const OnLogSchema = pipe(function_(), args(tuple([
2131
2147
  LogLevelSchema,
2132
2148
  RollupLogSchema,
@@ -2152,6 +2168,7 @@ const InputOptionsSchema = strictObject({
2152
2168
  ])), description(`Platform for which the code should be generated (node, ${ansis_default.underline("browser")}, neutral)`)),
2153
2169
  shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
2154
2170
  treeshake: optional(TreeshakingOptionsSchema),
2171
+ optimization: optional(OptimizationOptionsSchema),
2155
2172
  logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${ansis_default.dim("silent")}, ${ansis_default.underline(ansis_default.gray("info"))}, debug, ${ansis_default.yellow("warn")})`)),
2156
2173
  onLog: optional(OnLogSchema),
2157
2174
  onwarn: optional(OnwarnSchema),
@@ -3932,17 +3949,6 @@ var PluginContextData = class {
3932
3949
  }
3933
3950
  };
3934
3951
 
3935
- //#endregion
3936
- //#region src/utils/normalize-string-or-regex.ts
3937
- function normalizedStringOrRegex(pattern) {
3938
- if (!pattern) return void 0;
3939
- if (!isReadonlyArray(pattern)) return [pattern];
3940
- return pattern;
3941
- }
3942
- function isReadonlyArray(input) {
3943
- return Array.isArray(input);
3944
- }
3945
-
3946
3952
  //#endregion
3947
3953
  //#region src/utils/bindingify-input-options.ts
3948
3954
  function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
@@ -3952,8 +3958,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3952
3958
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
3953
3959
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3954
3960
  });
3955
- const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
3956
- const transform = inputOptions.transform || jsxTransform;
3961
+ const { jsx, transform } = bindingifyJsx(onLog, inputOptions.jsx, inputOptions.transform);
3957
3962
  return {
3958
3963
  input: bindingifyInput(inputOptions.input),
3959
3964
  plugins,
@@ -3997,7 +4002,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3997
4002
  debug: inputOptions.debug,
3998
4003
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
3999
4004
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
4000
- preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures)
4005
+ preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
4006
+ optimization: inputOptions.optimization
4001
4007
  };
4002
4008
  }
4003
4009
  function bindingifyHmr(hmr) {
@@ -4087,24 +4093,45 @@ function bindingifyInput(input) {
4087
4093
  };
4088
4094
  });
4089
4095
  }
4090
- function bindingifyJsx(input) {
4096
+ function bindingifyJsx(onLog, input, transform) {
4097
+ if (transform?.jsx) {
4098
+ if (input !== void 0) onLog(LOG_LEVEL_WARN, logDuplicateJsxConfig());
4099
+ return { transform };
4100
+ }
4091
4101
  if (typeof input === "object") {
4092
- if (input.mode === "preserve") return { jsx: BindingJsx.Preserve };
4102
+ if (input.mode === "preserve") return {
4103
+ jsx: BindingJsx.Preserve,
4104
+ transform
4105
+ };
4093
4106
  const mode = input.mode ?? "automatic";
4094
- return { jsxTransform: { jsx: {
4107
+ transform ??= {};
4108
+ transform.jsx = {
4095
4109
  runtime: mode,
4096
4110
  pragma: input.factory,
4097
4111
  pragmaFrag: input.fragment,
4098
4112
  importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
4099
- } } };
4113
+ };
4114
+ return { transform };
4100
4115
  }
4116
+ let jsx;
4101
4117
  switch (input) {
4102
- case false: return { jsx: BindingJsx.Disable };
4103
- case "react": return { jsx: BindingJsx.React };
4104
- case "react-jsx": return { jsx: BindingJsx.ReactJsx };
4105
- case "preserve": return { jsx: BindingJsx.Preserve };
4106
- default: return { jsx: void 0 };
4118
+ case false:
4119
+ jsx = BindingJsx.Disable;
4120
+ break;
4121
+ case "react":
4122
+ jsx = BindingJsx.React;
4123
+ break;
4124
+ case "react-jsx":
4125
+ jsx = BindingJsx.ReactJsx;
4126
+ break;
4127
+ case "preserve":
4128
+ jsx = BindingJsx.Preserve;
4129
+ break;
4107
4130
  }
4131
+ return {
4132
+ jsx,
4133
+ transform
4134
+ };
4108
4135
  }
4109
4136
  function bindingifyWatch(watch$1) {
4110
4137
  if (watch$1) return {
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
2
  const require_dist = require('./dist-BVAp8sOm.cjs');
3
- const require_parse_ast_index = require('./parse-ast-index-CGTVCgvx.cjs');
3
+ const require_parse_ast_index = require('./parse-ast-index-B0vXlNs8.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
5
5
  const node_path = require_chunk.__toESM(require("node:path"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -8,9 +8,20 @@ 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.23";
11
+ var version = "1.0.0-beta.24";
12
12
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
13
13
 
14
+ //#endregion
15
+ //#region src/utils/normalize-string-or-regex.ts
16
+ function normalizedStringOrRegex(pattern) {
17
+ if (!pattern) return void 0;
18
+ if (!isReadonlyArray(pattern)) return [pattern];
19
+ return pattern;
20
+ }
21
+ function isReadonlyArray(input) {
22
+ return Array.isArray(input);
23
+ }
24
+
14
25
  //#endregion
15
26
  //#region src/builtin-plugin/utils.ts
16
27
  function makeBuiltinPluginCallable(plugin) {
@@ -40,6 +51,10 @@ function modulePreloadPolyfillPlugin(config) {
40
51
  return new BuiltinPlugin("builtin:module-preload-polyfill", config);
41
52
  }
42
53
  function dynamicImportVarsPlugin(config) {
54
+ if (config) {
55
+ config.include = normalizedStringOrRegex(config.include);
56
+ config.exclude = normalizedStringOrRegex(config.exclude);
57
+ }
43
58
  return new BuiltinPlugin("builtin:dynamic-import-vars", config);
44
59
  }
45
60
  function importGlobPlugin(config) {
@@ -2102,6 +2117,7 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
2102
2117
  unknownGlobalSideEffects: optional(boolean()),
2103
2118
  commonjs: optional(boolean())
2104
2119
  })]);
2120
+ const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
2105
2121
  const OnLogSchema = pipe(function_(), args(tuple([
2106
2122
  LogLevelSchema,
2107
2123
  RollupLogSchema,
@@ -2127,6 +2143,7 @@ const InputOptionsSchema = strictObject({
2127
2143
  ])), description(`Platform for which the code should be generated (node, ${ansis_default.underline("browser")}, neutral)`)),
2128
2144
  shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
2129
2145
  treeshake: optional(TreeshakingOptionsSchema),
2146
+ optimization: optional(OptimizationOptionsSchema),
2130
2147
  logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${ansis_default.dim("silent")}, ${ansis_default.underline(ansis_default.gray("info"))}, debug, ${ansis_default.yellow("warn")})`)),
2131
2148
  onLog: optional(OnLogSchema),
2132
2149
  onwarn: optional(OnwarnSchema),
@@ -3907,17 +3924,6 @@ var PluginContextData = class {
3907
3924
  }
3908
3925
  };
3909
3926
 
3910
- //#endregion
3911
- //#region src/utils/normalize-string-or-regex.ts
3912
- function normalizedStringOrRegex(pattern) {
3913
- if (!pattern) return void 0;
3914
- if (!isReadonlyArray(pattern)) return [pattern];
3915
- return pattern;
3916
- }
3917
- function isReadonlyArray(input) {
3918
- return Array.isArray(input);
3919
- }
3920
-
3921
3927
  //#endregion
3922
3928
  //#region src/utils/bindingify-input-options.ts
3923
3929
  function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
@@ -3927,8 +3933,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3927
3933
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
3928
3934
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3929
3935
  });
3930
- const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
3931
- const transform = inputOptions.transform || jsxTransform;
3936
+ const { jsx, transform } = bindingifyJsx(onLog, inputOptions.jsx, inputOptions.transform);
3932
3937
  return {
3933
3938
  input: bindingifyInput(inputOptions.input),
3934
3939
  plugins,
@@ -3972,7 +3977,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3972
3977
  debug: inputOptions.debug,
3973
3978
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
3974
3979
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
3975
- preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures)
3980
+ preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
3981
+ optimization: inputOptions.optimization
3976
3982
  };
3977
3983
  }
3978
3984
  function bindingifyHmr(hmr) {
@@ -4062,24 +4068,45 @@ function bindingifyInput(input) {
4062
4068
  };
4063
4069
  });
4064
4070
  }
4065
- function bindingifyJsx(input) {
4071
+ function bindingifyJsx(onLog, input, transform) {
4072
+ if (transform?.jsx) {
4073
+ if (input !== void 0) onLog(LOG_LEVEL_WARN, require_parse_ast_index.logDuplicateJsxConfig());
4074
+ return { transform };
4075
+ }
4066
4076
  if (typeof input === "object") {
4067
- if (input.mode === "preserve") return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Preserve };
4077
+ if (input.mode === "preserve") return {
4078
+ jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Preserve,
4079
+ transform
4080
+ };
4068
4081
  const mode = input.mode ?? "automatic";
4069
- return { jsxTransform: { jsx: {
4082
+ transform ??= {};
4083
+ transform.jsx = {
4070
4084
  runtime: mode,
4071
4085
  pragma: input.factory,
4072
4086
  pragmaFrag: input.fragment,
4073
4087
  importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
4074
- } } };
4088
+ };
4089
+ return { transform };
4075
4090
  }
4091
+ let jsx;
4076
4092
  switch (input) {
4077
- case false: return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Disable };
4078
- case "react": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.React };
4079
- case "react-jsx": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.ReactJsx };
4080
- case "preserve": return { jsx: src_rolldown_binding_wasi_cjs.BindingJsx.Preserve };
4081
- default: return { jsx: void 0 };
4093
+ case false:
4094
+ jsx = src_rolldown_binding_wasi_cjs.BindingJsx.Disable;
4095
+ break;
4096
+ case "react":
4097
+ jsx = src_rolldown_binding_wasi_cjs.BindingJsx.React;
4098
+ break;
4099
+ case "react-jsx":
4100
+ jsx = src_rolldown_binding_wasi_cjs.BindingJsx.ReactJsx;
4101
+ break;
4102
+ case "preserve":
4103
+ jsx = src_rolldown_binding_wasi_cjs.BindingJsx.Preserve;
4104
+ break;
4082
4105
  }
4106
+ return {
4107
+ jsx,
4108
+ transform
4109
+ };
4083
4110
  }
4084
4111
  function bindingifyWatch(watch$1) {
4085
4112
  if (watch$1) return {
@@ -27,7 +27,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
 
28
28
  //#endregion
29
29
  //#region package.json
30
- var version = "1.0.0-beta.23";
30
+ var version = "1.0.0-beta.24";
31
+
32
+ //#endregion
33
+ //#region src/utils/normalize-string-or-regex.ts
34
+ function normalizedStringOrRegex(pattern) {
35
+ if (!pattern) return void 0;
36
+ if (!isReadonlyArray(pattern)) return [pattern];
37
+ return pattern;
38
+ }
39
+ function isReadonlyArray(input) {
40
+ return Array.isArray(input);
41
+ }
31
42
 
32
43
  //#endregion
33
44
  //#region src/builtin-plugin/utils.ts
@@ -58,6 +69,10 @@ function modulePreloadPolyfillPlugin(config) {
58
69
  return new BuiltinPlugin("builtin:module-preload-polyfill", config);
59
70
  }
60
71
  function dynamicImportVarsPlugin(config) {
72
+ if (config) {
73
+ config.include = normalizedStringOrRegex(config.include);
74
+ config.exclude = normalizedStringOrRegex(config.exclude);
75
+ }
61
76
  return new BuiltinPlugin("builtin:dynamic-import-vars", config);
62
77
  }
63
78
  function importGlobPlugin(config) {
@@ -709,7 +724,7 @@ function locate(source, search, options) {
709
724
 
710
725
  //#endregion
711
726
  //#region src/log/logs.ts
712
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
727
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
713
728
  function logParseError(message) {
714
729
  return {
715
730
  code: PARSE_ERROR,
@@ -740,6 +755,12 @@ function logMultiplyNotifyOption() {
740
755
  message: `Found multiply notify option at watch options, using first one to start notify watcher.`
741
756
  };
742
757
  }
758
+ function logDuplicateJsxConfig() {
759
+ return {
760
+ code: DUPLICATE_JSX_CONFIG,
761
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
762
+ };
763
+ }
743
764
  function logPluginError(error$1, plugin, { hook, id: id$1 } = {}) {
744
765
  try {
745
766
  const code$1 = error$1.code;
@@ -2310,6 +2331,7 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
2310
2331
  unknownGlobalSideEffects: optional(boolean()),
2311
2332
  commonjs: optional(boolean())
2312
2333
  })]);
2334
+ const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
2313
2335
  const OnLogSchema = pipe(function_(), args(tuple([
2314
2336
  LogLevelSchema,
2315
2337
  RollupLogSchema,
@@ -2335,6 +2357,7 @@ const InputOptionsSchema = strictObject({
2335
2357
  ])), description(`Platform for which the code should be generated (node, ${ansis_default.underline("browser")}, neutral)`)),
2336
2358
  shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
2337
2359
  treeshake: optional(TreeshakingOptionsSchema),
2360
+ optimization: optional(OptimizationOptionsSchema),
2338
2361
  logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${ansis_default.dim("silent")}, ${ansis_default.underline(ansis_default.gray("info"))}, debug, ${ansis_default.yellow("warn")})`)),
2339
2362
  onLog: optional(OnLogSchema),
2340
2363
  onwarn: optional(OnwarnSchema),
@@ -2943,7 +2966,7 @@ function bindingPluginOrder(order) {
2943
2966
  }
2944
2967
 
2945
2968
  //#endregion
2946
- //#region ../../node_modules/.pnpm/oxc-parser@0.75.0/node_modules/oxc-parser/wrap.mjs
2969
+ //#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
2947
2970
  function wrap$1(result) {
2948
2971
  let program, module$1, comments, errors;
2949
2972
  return {
@@ -4254,17 +4277,6 @@ var PluginContextData = class {
4254
4277
  }
4255
4278
  };
4256
4279
 
4257
- //#endregion
4258
- //#region src/utils/normalize-string-or-regex.ts
4259
- function normalizedStringOrRegex(pattern) {
4260
- if (!pattern) return void 0;
4261
- if (!isReadonlyArray(pattern)) return [pattern];
4262
- return pattern;
4263
- }
4264
- function isReadonlyArray(input) {
4265
- return Array.isArray(input);
4266
- }
4267
-
4268
4280
  //#endregion
4269
4281
  //#region src/utils/bindingify-input-options.ts
4270
4282
  function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
@@ -4274,8 +4286,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
4274
4286
  if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
4275
4287
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
4276
4288
  });
4277
- const { jsx, jsxTransform } = bindingifyJsx(inputOptions.jsx);
4278
- const transform = inputOptions.transform || jsxTransform;
4289
+ const { jsx, transform } = bindingifyJsx(onLog, inputOptions.jsx, inputOptions.transform);
4279
4290
  return {
4280
4291
  input: bindingifyInput(inputOptions.input),
4281
4292
  plugins,
@@ -4319,7 +4330,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
4319
4330
  debug: inputOptions.debug,
4320
4331
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
4321
4332
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
4322
- preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures)
4333
+ preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
4334
+ optimization: inputOptions.optimization
4323
4335
  };
4324
4336
  }
4325
4337
  function bindingifyHmr(hmr) {
@@ -4409,24 +4421,45 @@ function bindingifyInput(input) {
4409
4421
  };
4410
4422
  });
4411
4423
  }
4412
- function bindingifyJsx(input) {
4424
+ function bindingifyJsx(onLog, input, transform) {
4425
+ if (transform?.jsx) {
4426
+ if (input !== void 0) onLog(LOG_LEVEL_WARN, logDuplicateJsxConfig());
4427
+ return { transform };
4428
+ }
4413
4429
  if (typeof input === "object") {
4414
- if (input.mode === "preserve") return { jsx: BindingJsx.Preserve };
4430
+ if (input.mode === "preserve") return {
4431
+ jsx: BindingJsx.Preserve,
4432
+ transform
4433
+ };
4415
4434
  const mode = input.mode ?? "automatic";
4416
- return { jsxTransform: { jsx: {
4435
+ transform ??= {};
4436
+ transform.jsx = {
4417
4437
  runtime: mode,
4418
4438
  pragma: input.factory,
4419
4439
  pragmaFrag: input.fragment,
4420
4440
  importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
4421
- } } };
4441
+ };
4442
+ return { transform };
4422
4443
  }
4444
+ let jsx;
4423
4445
  switch (input) {
4424
- case false: return { jsx: BindingJsx.Disable };
4425
- case "react": return { jsx: BindingJsx.React };
4426
- case "react-jsx": return { jsx: BindingJsx.ReactJsx };
4427
- case "preserve": return { jsx: BindingJsx.Preserve };
4428
- default: return { jsx: void 0 };
4446
+ case false:
4447
+ jsx = BindingJsx.Disable;
4448
+ break;
4449
+ case "react":
4450
+ jsx = BindingJsx.React;
4451
+ break;
4452
+ case "react-jsx":
4453
+ jsx = BindingJsx.ReactJsx;
4454
+ break;
4455
+ case "preserve":
4456
+ jsx = BindingJsx.Preserve;
4457
+ break;
4429
4458
  }
4459
+ return {
4460
+ jsx,
4461
+ transform
4462
+ };
4430
4463
  }
4431
4464
  function bindingifyWatch(watch$1) {
4432
4465
  if (watch$1) return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.23",
3
+ "version": "1.0.0-beta.24",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@napi-rs/wasm-runtime": "^0.2.10",
59
- "@oxc-project/runtime": "=0.75.0"
59
+ "@oxc-project/runtime": "=0.75.1"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "pnpm run build:debug",