@voidzero-dev/vite-plus-core 1.0.0 → 1.2.0

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 (68) hide show
  1. package/LICENSE +36 -177
  2. package/dist/rolldown/cli.mjs +33 -29
  3. package/dist/rolldown/config.d.mts +3 -3
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-index.d.mts +29 -29
  6. package/dist/rolldown/experimental-index.mjs +8 -8
  7. package/dist/rolldown/experimental-runtime-types.d.ts +39 -7
  8. package/dist/rolldown/experimental-runtime.d.ts +39 -7
  9. package/dist/rolldown/experimental-runtime.mjs +284 -255
  10. package/dist/rolldown/filter-index.d.mts +1 -1
  11. package/dist/rolldown/index.d.mts +3 -3
  12. package/dist/rolldown/index.mjs +4 -4
  13. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  14. package/dist/rolldown/parallel-plugin.d.mts +3 -3
  15. package/dist/rolldown/parse-ast-index.d.mts +6 -7
  16. package/dist/rolldown/parse-ast-index.mjs +1 -1
  17. package/dist/rolldown/plugins-index.d.mts +5 -5
  18. package/dist/rolldown/plugins-index.mjs +2 -2
  19. package/dist/rolldown/shared/{binding-BY0qR5iS.mjs → binding-DlR5d34p.mjs} +27 -28
  20. package/dist/rolldown/shared/{binding-BTa6BPQe.d.mts → binding-tzp6Hc_3.d.mts} +1 -1
  21. package/dist/rolldown/shared/{bindingify-input-options-B8JHmN6_.mjs → bindingify-input-options-DhjlrWZE.mjs} +203 -20
  22. package/dist/rolldown/shared/{constructors-xEvVj3lN.mjs → constructors-B2hkJoIA.mjs} +1 -1
  23. package/dist/rolldown/shared/{constructors-DuOq7MqW.d.mts → constructors-Dw9H1IvX.d.mts} +2 -2
  24. package/dist/rolldown/shared/{create-bundler-option-COco-7P6.mjs → create-bundler-option-1AEe_J0o.mjs} +36 -10
  25. package/dist/rolldown/shared/{define-config-C7HCoqY8.d.mts → define-config-CGhm2DU-.d.mts} +94 -5
  26. package/dist/rolldown/shared/{error-C7pxws0W.mjs → error-Dsqzw0Oa.mjs} +2 -1
  27. package/dist/rolldown/shared/{load-config-DkUBnDsI.mjs → load-config-bvw8z7Ft.mjs} +2 -2
  28. package/dist/rolldown/shared/{normalize-string-or-regex-F14uvr6D.mjs → normalize-string-or-regex-B7Gsiuz7.mjs} +1 -1
  29. package/dist/rolldown/shared/{parse-BWeE7Vr9.mjs → parse-BCSSrLHf.mjs} +2 -2
  30. package/dist/rolldown/shared/{resolve-tsconfig-DHwpIs5e.mjs → resolve-tsconfig-DyR2RUTm.mjs} +2 -2
  31. package/dist/rolldown/shared/{rolldown-Bue0gNT5.mjs → rolldown-C8QomUuX.mjs} +4 -4
  32. package/dist/rolldown/shared/{transform-DK_nCt9j.d.mts → transform-D4RDjIPI.d.mts} +1 -1
  33. package/dist/rolldown/shared/{watch-RXhXN1aG.mjs → watch-CPI70Lkn.mjs} +4 -4
  34. package/dist/rolldown/utils-index.d.mts +5 -5
  35. package/dist/rolldown/utils-index.mjs +5 -5
  36. package/dist/tsdown/{build-JVmLFaZt-DRlLhpV3.js → build-KEepWO_k-BOsPZ2cH.js} +26 -25
  37. package/dist/tsdown/{debug-CpC4hV25-C-OYr2iI.js → debug-DKTolR2K-BMJOFfj2.js} +4 -5
  38. package/dist/tsdown/{detect-Bg-d8iUV-Du8LljhG.js → detect-DHDepxVX-CpWW52Jd.js} +38 -34
  39. package/dist/tsdown/dist-BebyOHRu.js +6224 -0
  40. package/dist/tsdown/index-types.d.ts +216 -216
  41. package/dist/tsdown/index.js +4 -4
  42. package/dist/tsdown/{main-CyNcZUzu.js → main-Du9xCnhX.js} +105 -19
  43. package/dist/tsdown/npm_entry_picomatch.cjs +36 -25
  44. package/dist/tsdown/{resolver-DE0_sy8o-Bi3xbRxi.js → resolver-DE0_sy8o-DNoi-dFQ.js} +3 -2
  45. package/dist/tsdown/run.js +28 -26
  46. package/dist/tsdown/{src-pN7Bl6zo.js → src-CBWRkeF5.js} +4 -4
  47. package/dist/tsdown/{target-DgdLrXba-DpO9JXxB.js → target-HZbF5Cux-Cmv1LI5D.js} +175 -9
  48. package/dist/tsdown/{tsc-BLb4pSBY.js → tsc-YwU2b8yT.js} +4 -4
  49. package/dist/tsdown/tsdown-css.js +4 -4
  50. package/dist/tsdown/tsdown-exe.js +5 -43
  51. package/dist/vite/client/bundledDevClient.mjs +109 -345
  52. package/dist/vite/client/client.mjs +80 -28
  53. package/dist/vite/node/chunks/build.js +19 -19
  54. package/dist/vite/node/chunks/node.js +5210 -4942
  55. package/dist/vite/node/chunks/postcss-import.js +10 -10
  56. package/dist/vite/node/cli.js +24 -21
  57. package/dist/vite/node/index.d.ts +5 -2
  58. package/dist/vite/node/index.js +1 -2
  59. package/dist/vite/node/internal.js +1 -2
  60. package/dist/vite/node/module-runner.d.ts +1 -0
  61. package/dist/vite/node/module-runner.js +32 -27
  62. package/package.json +46 -30
  63. package/dist/rolldown/experimental-default-runtime.mjs +0 -116
  64. package/dist/rolldown/experimental-runtime-base.mjs +0 -95
  65. package/dist/tsdown/dist-VDcV1Qyy.js +0 -2952
  66. package/dist/tsdown/require-BbBF8Ii0-BDaWJgzA.js +0 -320
  67. package/dist/tsdown/style-DiMP8pYv-DIC5PXeH.js +0 -88
  68. package/dist/tsdown/version-CQ98ZBpL-D6GAHapk.js +0 -169
@@ -1,17 +1,197 @@
1
- import { n as __toESM, t as require_binding } from "./binding-BY0qR5iS.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
2
2
  import { i as logFailedValidation, n as error, o as logInvalidLogPosition, r as logCycleLoading, t as augmentCodeLocation, u as logPluginError } from "./logs-D6uA606S.mjs";
3
- import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-F14uvr6D.mjs";
3
+ import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B7Gsiuz7.mjs";
4
4
  import { i as noop, n as isPathFragment, o as unreachable, s as unsupported, t as arraify } from "./misc-DOSKtd97.mjs";
5
- import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-C7pxws0W.mjs";
5
+ import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-Dsqzw0Oa.mjs";
6
6
  import { parseAst } from "../parse-ast-index.mjs";
7
- import fs from "node:fs";
8
7
  import path from "node:path";
9
8
  import * as filter from "@voidzero-dev/vite-plus-core/rolldown/pluginutils";
10
9
  import fsp from "node:fs/promises";
11
- import { fileURLToPath } from "node:url";
12
10
  //#region package.json
13
- var version = "1.2.11";
14
- var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
11
+ var version = "1.2.13";
12
+ var package_default = {
13
+ name: "rolldown",
14
+ version,
15
+ description: "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
16
+ keywords: [
17
+ "bundler",
18
+ "esbuild",
19
+ "parcel",
20
+ "rolldown",
21
+ "rollup",
22
+ "webpack"
23
+ ],
24
+ homepage: "https://rolldown.rs/",
25
+ bugs: { "url": "https://github.com/rolldown/rolldown/issues" },
26
+ license: "MIT",
27
+ repository: {
28
+ "type": "git",
29
+ "url": "git+https://github.com/rolldown/rolldown.git",
30
+ "directory": "packages/rolldown"
31
+ },
32
+ bin: { "rolldown": "./bin/cli.mjs" },
33
+ files: [
34
+ "bin",
35
+ "cli",
36
+ "dist",
37
+ "LICENSE",
38
+ "THIRD-PARTY-LICENSE",
39
+ "!dist/*.node"
40
+ ],
41
+ type: "module",
42
+ main: "./dist/index.mjs",
43
+ module: "./dist/index.mjs",
44
+ types: "./dist/index.d.mts",
45
+ imports: { "#parallel-plugin-worker": "./dist/parallel-plugin-worker.mjs" },
46
+ exports: {
47
+ ".": {
48
+ "dev": "./src/index.ts",
49
+ "default": "./dist/index.mjs"
50
+ },
51
+ "./config": {
52
+ "dev": "./src/config.ts",
53
+ "default": "./dist/config.mjs"
54
+ },
55
+ "./experimental": {
56
+ "dev": "./src/experimental-index.ts",
57
+ "default": "./dist/experimental-index.mjs"
58
+ },
59
+ "./experimental/runtime-types": { "types": "./dist/experimental-runtime-types.d.ts" },
60
+ "./experimental/runtime": {
61
+ "types": "./dist/experimental-runtime.d.ts",
62
+ "default": "./dist/experimental-runtime.mjs"
63
+ },
64
+ "./filter": {
65
+ "dev": "./src/filter-index.ts",
66
+ "default": "./dist/filter-index.mjs"
67
+ },
68
+ "./getLogFilter": {
69
+ "dev": "./src/get-log-filter.ts",
70
+ "default": "./dist/get-log-filter.mjs"
71
+ },
72
+ "./parallelPlugin": {
73
+ "dev": "./src/parallel-plugin.ts",
74
+ "default": "./dist/parallel-plugin.mjs"
75
+ },
76
+ "./parseAst": {
77
+ "dev": "./src/parse-ast-index.ts",
78
+ "default": "./dist/parse-ast-index.mjs"
79
+ },
80
+ "./package.json": "./package.json",
81
+ "./plugins": {
82
+ "dev": "./src/plugins-index.ts",
83
+ "default": "./dist/plugins-index.mjs"
84
+ },
85
+ "./utils": {
86
+ "dev": "./src/utils-index.ts",
87
+ "default": "./dist/utils-index.mjs"
88
+ }
89
+ },
90
+ publishConfig: {
91
+ "exports": {
92
+ ".": "./dist/index.mjs",
93
+ "./config": "./dist/config.mjs",
94
+ "./experimental": "./dist/experimental-index.mjs",
95
+ "./experimental/runtime-types": { "types": "./dist/experimental-runtime-types.d.ts" },
96
+ "./experimental/runtime": {
97
+ "types": "./dist/experimental-runtime.d.ts",
98
+ "default": "./dist/experimental-runtime.mjs"
99
+ },
100
+ "./filter": "./dist/filter-index.mjs",
101
+ "./getLogFilter": "./dist/get-log-filter.mjs",
102
+ "./parallelPlugin": "./dist/parallel-plugin.mjs",
103
+ "./parseAst": "./dist/parse-ast-index.mjs",
104
+ "./package.json": "./package.json",
105
+ "./plugins": "./dist/plugins-index.mjs",
106
+ "./utils": "./dist/utils-index.mjs"
107
+ },
108
+ "access": "public",
109
+ "registry": "https://registry.npmjs.org/"
110
+ },
111
+ scripts: {
112
+ "# Scrips for binding #": "_",
113
+ "artifacts": "napi artifacts --cwd ./src --package-json-path ../package.json -o=../artifacts --npm-dir ../npm",
114
+ "build-binding": "oxnode ./build-binding.ts",
115
+ "build-binding:release": "pnpm build-binding --release",
116
+ "build-binding:profile": "pnpm build-binding --profile profile --features chrome-tracing",
117
+ "build-binding:wasi": "pnpm build-binding --target wasm32-wasip1-threads",
118
+ "build-binding:wasi:release": "pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads",
119
+ "# Scrips for node #": "_",
120
+ "build-node": "node --enable-source-maps --import @oxc-node/core/register -C dev ./build.ts",
121
+ "build-types-check": "tsc -p ./tsconfig.check.json",
122
+ "build-js-glue": "pnpm run --sequential '/^build-(node|types-check)$/'",
123
+ "build-native:debug": "pnpm run --sequential '/^build-(binding|js-glue)$/'",
124
+ "build-native:release": "pnpm run --sequential '/^build-(binding:release|js-glue)$/'",
125
+ "build-native:profile": "pnpm run build-binding:profile && pnpm run build-js-glue",
126
+ "build-native:memory-profile": "pnpm run build-binding:profile --features default_global_allocator && pnpm run build-js-glue",
127
+ "build-wasi:debug": "TARGET='rolldown-wasi' pnpm run --sequential '/^build-(binding|binding:wasi|node)$/'",
128
+ "build-wasi:release": "TARGET='rolldown-wasi' pnpm run --sequential '/^build-(binding|binding:wasi:release|node)$/'",
129
+ "build-browser-pkg:debug": "TARGET='browser' pnpm run --sequential '/^build-(binding:wasi|node)$/'",
130
+ "build-browser-pkg:release": "TARGET='browser' pnpm run --sequential '/^build-(binding:wasi:release|node)$/'",
131
+ "# Scrips for docs #": "_",
132
+ "prepublishOnly": "napi pre-publish -t npm --no-gh-release ${NAPI_DRY_RUN:+--dry-run} ${NAPI_SKIP_OPTIONAL_PUBLISH:+--skip-optional-publish}",
133
+ "publint": "publint ."
134
+ },
135
+ dependencies: {
136
+ "@oxc-project/types": "catalog:",
137
+ "@rolldown/pluginutils": "catalog:"
138
+ },
139
+ devDependencies: {
140
+ "@emnapi/core": "catalog:",
141
+ "@emnapi/runtime": "catalog:",
142
+ "@napi-rs/cli": "catalog:",
143
+ "@napi-rs/wasm-runtime": "catalog:",
144
+ "@oxc-node/cli": "catalog:",
145
+ "cac": "catalog:",
146
+ "consola": "catalog:",
147
+ "emnapi": "catalog:",
148
+ "execa": "catalog:",
149
+ "fresh-import": "catalog:",
150
+ "glob": "catalog:",
151
+ "oxc-parser": "catalog:",
152
+ "pathe": "catalog:",
153
+ "remeda": "catalog:",
154
+ "rolldown": "workspace:*",
155
+ "rolldown-plugin-dts": "catalog:",
156
+ "rollup": "catalog:",
157
+ "signal-exit": "catalog:",
158
+ "source-map": "catalog:",
159
+ "typescript": "catalog:",
160
+ "valibot": "catalog:"
161
+ },
162
+ napi: {
163
+ "binaryName": "rolldown-binding",
164
+ "dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\nexport type BindingResult<T> = { errors: BindingError[], isBindingErrors: boolean } | T\n\n",
165
+ "packageName": "@rolldown/binding",
166
+ "targets": [
167
+ "aarch64-apple-darwin",
168
+ "aarch64-linux-android",
169
+ "aarch64-pc-windows-msvc",
170
+ "aarch64-unknown-linux-gnu",
171
+ "aarch64-unknown-linux-musl",
172
+ "aarch64-unknown-linux-ohos",
173
+ "armv7-linux-androideabi",
174
+ "armv7-unknown-linux-gnueabihf",
175
+ "powerpc64le-unknown-linux-gnu",
176
+ "s390x-unknown-linux-gnu",
177
+ "wasm32-wasip1-threads",
178
+ "x86_64-apple-darwin",
179
+ "x86_64-pc-windows-msvc",
180
+ "x86_64-unknown-freebsd",
181
+ "x86_64-unknown-linux-gnu",
182
+ "x86_64-unknown-linux-musl"
183
+ ],
184
+ "wasm": {
185
+ "initialMemory": 16384,
186
+ "browser": {
187
+ "fs": true,
188
+ "asyncInit": true,
189
+ "errorEvent": true
190
+ }
191
+ }
192
+ },
193
+ engines: { "node": "^20.19.0 || >=22.12.0" }
194
+ };
15
195
  //#endregion
16
196
  //#region src/constants/version.ts
17
197
  /**
@@ -236,7 +416,7 @@ function bindingAssetSource(source) {
236
416
  return { inner: source };
237
417
  }
238
418
  //#endregion
239
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
419
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
240
420
  function __decorate(decorators, target, key, desc) {
241
421
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
242
422
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -433,6 +613,12 @@ function transformToRollupSourceMap(map) {
433
613
  return `data:application/json;charset=utf-8;base64,${Buffer.from(obj.toString(), "utf-8").toString("base64")}`;
434
614
  }
435
615
  };
616
+ Object.defineProperty(obj, "x_google_ignoreList", {
617
+ get: () => obj.ignoreList,
618
+ set: (value) => {
619
+ obj.ignoreList = value;
620
+ }
621
+ });
436
622
  return obj;
437
623
  }
438
624
  function transformToRollupOutputChunk(bindingChunk) {
@@ -1614,7 +1800,7 @@ function bindingifyRenderChunk(args) {
1614
1800
  return bindingifyHook(args.plugin.renderChunk, ({ handler, options }) => ({
1615
1801
  plugin: async (ctx, code, chunk, opts, meta) => {
1616
1802
  if (args.pluginContextData.getRenderChunkMeta() == null) args.pluginContextData.setRenderChunkMeta({ chunks: Object.fromEntries(Object.entries(meta.chunks).map(([key, value]) => [key, transformRenderedChunk(value)])) });
1617
- const renderChunkMeta = args.pluginContextData.getRenderChunkMeta();
1803
+ const renderChunkMeta = { chunks: args.pluginContextData.getRenderChunkMeta().chunks };
1618
1804
  let magicStringInstance;
1619
1805
  if (args.options.experimental?.nativeMagicString) Object.defineProperty(renderChunkMeta, "magicString", {
1620
1806
  get() {
@@ -1781,12 +1967,12 @@ function extractHookUsage(plugin) {
1781
1967
  if (plugin.closeBundle) hookUsage.union(8192);
1782
1968
  if (plugin.watchChange) hookUsage.union(16384);
1783
1969
  if (plugin.closeWatcher) hookUsage.union(32768);
1784
- if (plugin.banner) hookUsage.union(131072);
1785
- if (plugin.footer) hookUsage.union(262144);
1786
- if (plugin.intro) hookUsage.union(524288);
1787
- if (plugin.outro) hookUsage.union(1048576);
1788
- if (plugin.resolveFileUrl) hookUsage.union(2097152);
1789
- if (plugin.hotUpdate) hookUsage.union(4194304);
1970
+ if (plugin.banner) hookUsage.union(65536);
1971
+ if (plugin.footer) hookUsage.union(131072);
1972
+ if (plugin.intro) hookUsage.union(262144);
1973
+ if (plugin.outro) hookUsage.union(524288);
1974
+ if (plugin.resolveFileUrl) hookUsage.union(1048576);
1975
+ if (plugin.hotUpdate) hookUsage.union(2097152);
1790
1976
  return hookUsage;
1791
1977
  }
1792
1978
  //#endregion
@@ -2168,10 +2354,7 @@ function normalizeTransformOptions(inputOptions) {
2168
2354
  //#endregion
2169
2355
  //#region src/utils/default-dev-runtime.ts
2170
2356
  function getDefaultDevRuntime(host = "localhost", port = 3e3) {
2171
- const runtimeEntry = fs.readFileSync(fileURLToPath(import.meta.resolve("#runtime")), "utf8");
2172
- const runtimeHelperImportEnd = runtimeEntry.indexOf("\n");
2173
- if (!runtimeEntry.startsWith("import ") || runtimeHelperImportEnd === -1) throw new Error("Expected the standalone runtime to start with a helper import");
2174
- return `${runtimeEntry.slice(runtimeHelperImportEnd + 1)}\n${fs.readFileSync(fileURLToPath(import.meta.resolve("#default-runtime")), "utf8").replaceAll("$ADDR", `${host}:${port}`)}`;
2357
+ return "// @ts-check\n\nclass Module {\n /**\n * @type {{ exports: any }}\n */\n exportsHolder = { exports: null };\n /**\n * @type {string}\n */\n id;\n\n /**\n * @param {string} id\n */\n constructor(id) {\n this.id = id;\n }\n\n get exports() {\n return this.exportsHolder.exports;\n }\n}\n\n/**\n * Compiler-emitted module-graph delta — topology (static + dynamic edges).\n * `ids[0, localCount)` are the modules this payload carries; `ids[localCount, …)` are foreign edge targets.\n * `edges[i]` / `dynamicEdges[i]` are the static / dynamic-`import()` out-edges of `ids[i]`.\n * `bindings[i][j]` are the export names `ids[i]` imports through `edges[i][j]`. `bindings` holds\n * only some rows; a missing row, or a missing or `null` entry, means the whole namespace.\n * `dynamicEdges` also holds only some rows; a missing row means no dynamic edges.\n * `stamps[i]` is the rebuild stamp of `ids[i]`; a missing row means 0.\n * @typedef {{ ids: string[], localCount: number, edges: number[][], bindings?: Record<number, (string[] | null)[]>, dynamicEdges?: Record<number, number[]>, stamps?: Record<number, number> }} ModuleGraphDelta\n * @typedef {{ createModuleHotContext(moduleId: string): any, onModuleCacheRemoval(moduleId: string): void }} DevRuntimeHooks\n */\n\nexport class MissingFactoryError extends Error {\n /**\n * @param {string} id\n */\n constructor(id) {\n super(`No factory registered for module ${id}`);\n this.id = id;\n }\n}\n\nexport class DevRuntime {\n /**\n * Client ID generated at runtime initialization, used for lazy compilation requests.\n * @type {string}\n */\n clientId;\n\n /**\n * @param {string} clientId\n */\n constructor(clientId) {\n this.clientId = clientId;\n }\n\n /**\n * Static import edges from `registerGraph` — entries persist across `removeModuleCache`\n * and change only by replacement from a newer payload (last write wins).\n * `bindings` is the payload row as sent; `getImportedBindings` resolves a missing entry.\n * @type {Map<string, { edges: string[], bindings: (string[] | null)[] | undefined }>}\n */\n staticImports = new Map();\n /**\n * Reverse index over the static imports.\n * @type {Map<string, Set<string>>}\n */\n importers = new Map();\n /**\n * Dynamic `import()` edges from `registerGraph`, keyed by importer — mirror of\n * `staticImports` for the dynamic reverse index.\n * @type {Map<string, { edges: string[] }>}\n */\n dynamicImports = new Map();\n /**\n * Reverse index over the dynamic imports.\n * @type {Map<string, Set<string>>}\n */\n dynamicImporters = new Map();\n /**\n * The module cache. Membership means \"this module's side effects ran in this tab\" —\n * registration is emitted ahead of every module body, and nothing un-registers on\n * unwind, so a factory that throws mid-body stays registered. A `Map` rather than a\n * plain object: HMR eviction deletes entries, and a `delete` on an object drops V8\n * into dictionary mode, taxing every later lookup on the hottest read path.\n * @type {Map<string, Module>}\n */\n moduleCache = new Map();\n /**\n * Re-runnable factories from HMR patches and lazy chunks. The initial bundle stays\n * scope-hoisted and contributes none.\n * @type {Map<string, (id: string) => void>}\n */\n factories = new Map();\n /**\n * A late payload (a slow lazy chunk after an HMR patch) must not replace newer rows or\n * factories.\n * @type {Map<string, number>}\n */\n rowStamps = new Map();\n /** @type {Map<string, number>} */\n factoryStamps = new Map();\n /**\n * Installed by the dev client at boot. The runtime is a store + executor and makes\n * no HMR decisions; accepting, disposing, and reloading live behind these hooks.\n * @type {DevRuntimeHooks | null}\n */\n hooks = null;\n\n /**\n * @param {ModuleGraphDelta} delta\n */\n registerGraph(delta) {\n for (let i = 0; i < delta.localCount; i++) {\n const id = delta.ids[i];\n if (delta.stamps) {\n const stamp = delta.stamps[i] ?? 0;\n if (stamp < (this.rowStamps.get(id) ?? 0)) continue;\n this.rowStamps.set(id, stamp);\n } else {\n // A full-build chunk has no stamps. It runs its code right away, so its row always\n // replaces the old one.\n this.rowStamps.delete(id);\n }\n const edges = delta.edges[i].map((j) => delta.ids[j]);\n for (const target of this.staticImports.get(id)?.edges ?? []) {\n this.importers.get(target)?.delete(id);\n }\n for (const target of edges) {\n let importerSet = this.importers.get(target);\n if (!importerSet) {\n importerSet = new Set();\n this.importers.set(target, importerSet);\n }\n importerSet.add(id);\n }\n this.staticImports.set(id, { edges, bindings: delta.bindings?.[i] });\n\n // Dynamic `import()` edges are maintained in a parallel reverse index with the same\n // last-write-wins bookkeeping; `getImporters` unions the two.\n const dynamicEdges = (delta.dynamicEdges?.[i] ?? []).map((j) => delta.ids[j]);\n for (const target of this.dynamicImports.get(id)?.edges ?? []) {\n this.dynamicImporters.get(target)?.delete(id);\n }\n for (const target of dynamicEdges) {\n let importerSet = this.dynamicImporters.get(target);\n if (!importerSet) {\n importerSet = new Set();\n this.dynamicImporters.set(target, importerSet);\n }\n importerSet.add(id);\n }\n this.dynamicImports.set(id, { edges: dynamicEdges });\n }\n }\n\n /**\n * @param {string} id\n * @param {(id: string) => void} fn\n * @param {number} [stamp]\n */\n registerFactory(id, fn, stamp = 0) {\n if (stamp < (this.factoryStamps.get(id) ?? 0)) return;\n this.factoryStamps.set(id, stamp);\n this.factories.set(id, fn);\n }\n\n /**\n * @param {string} id\n * @param {{ exports: any }} [exportsHolder]\n */\n registerModule(id, exportsHolder = { exports: {} }) {\n const module = new Module(id);\n module.exportsHolder = exportsHolder;\n this.moduleCache.set(id, module);\n }\n\n /**\n * @param {string} id\n * @returns {string[]}\n */\n getImporters(id) {\n // Static ∪ dynamic importers — the boundary walk treats both kinds the same (parity\n // with Vite `node.importers` / webpack `module.parents`). Deduped so a module that\n // imports `id` both statically and via `import()` appears once.\n const dynamic = this.dynamicImporters.get(id);\n if (!dynamic || dynamic.size === 0) {\n return [...(this.importers.get(id) ?? [])];\n }\n return [...new Set([...(this.importers.get(id) ?? []), ...dynamic])];\n }\n\n /**\n * `\"*\"` means the whole namespace, an empty list a side-effect-only import, `undefined` no edge.\n * @param {string} importer\n * @param {string} id\n * @returns {string[] | undefined}\n */\n getImportedBindings(importer, id) {\n const record = this.staticImports.get(importer);\n const j = record ? record.edges.indexOf(id) : -1;\n const names = j === -1 ? undefined : (record?.bindings?.[j] ?? ['*']);\n if (!this.dynamicImports.get(importer)?.edges.includes(id)) {\n return names;\n }\n if (!names) return ['*'];\n return names.includes('*') ? names : [...names, '*'];\n }\n\n /**\n * @param {string} id\n */\n isExecuted(id) {\n return this.moduleCache.has(id);\n }\n\n /**\n * @param {string} id\n */\n hasFactory(id) {\n return this.factories.has(id);\n }\n\n /**\n * Module-cache delete only — static imports and factories persist. Removal is what\n * re-arms a cache-gated factory for `initModule`.\n * @param {string} id\n */\n removeModuleCache(id) {\n this.moduleCache.delete(id);\n this.hooks?.onModuleCacheRemoval(id);\n }\n\n /**\n * The one re-execution gate: registered → return the live exports; otherwise run the\n * mapped factory (which registers itself first, then runs the body).\n * @param {string} id\n */\n initModule(id) {\n if (this.moduleCache.has(id)) {\n return this.loadExports(id);\n }\n const factory = this.factories.get(id);\n if (!factory) {\n throw new MissingFactoryError(id);\n }\n factory(id);\n return this.loadExports(id);\n }\n\n /**\n * @param {string} id\n */\n loadExports(id) {\n const module = this.moduleCache.get(id);\n if (module) {\n return module.exportsHolder.exports;\n } else {\n console.warn(`Module ${id} not found`);\n return {};\n }\n }\n\n /**\n * @param {string} moduleId\n */\n createModuleHotContext(moduleId) {\n if (this.hooks) {\n return this.hooks.createModuleHotContext(moduleId);\n }\n throw new Error('createModuleHotContext requires installed hooks or an override');\n }\n\n /** @internal */\n // @ts-expect-error The variable will be injected at build time.\n __toESM = __toESM;\n /** @internal */\n // @ts-expect-error The variable will be injected at build time.\n __toCommonJS = __toCommonJS;\n /** @internal */\n // @ts-expect-error The variable will be injected at build time.\n __exportAll = __exportAll;\n /**\n * @param {boolean} [isNodeMode]\n * @returns {(mod: any) => any}\n * @internal\n */\n // @ts-expect-error The variable will be injected at build time.\n __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);\n /** @internal */\n // @ts-expect-error The variable will be injected at build time.\n __reExport = __reExport;\n}\n\n// @ts-check\n\n/** @import { DevRuntime } from './runtime-extra-dev-common.js' */\n\n/** @type {typeof DevRuntime} */\n// @ts-expect-error -- there's no way to declare a variable by JSDoc\nvar BaseDevRuntime = DevRuntime;\n\nclass ModuleHotContext {\n /**\n * @type {{ deps: [string], fn: (moduleExports: Record<string, any>[]) => void }[]}\n */\n acceptCallbacks = [];\n /**\n * @param {string} moduleId\n * @param {InstanceType<BaseDevRuntime>} devRuntime\n */\n constructor(moduleId, devRuntime) {\n this.moduleId = moduleId;\n this.devRuntime = devRuntime;\n }\n\n /**\n * @overload\n * @param {(mod: Record<string, any>) => void} cb\n * @returns {void}\n */\n /**\n * @param {...any} args\n * @returns {void}\n */\n accept(...args) {\n if (args.length === 1) {\n const [cb] = /** @type {[(mod: Record<string, any>) => void]} */ (args);\n const acceptingPath = this.moduleId;\n this.acceptCallbacks.push({\n deps: [acceptingPath],\n fn: cb,\n });\n } else if (args.length === 0) {}\n else {\n throw new Error('Invalid arguments for `import.meta.hot.accept`');\n }\n }\n\n invalidate() {\n socket.send(JSON.stringify({\n type: 'hmr:invalidate',\n moduleId: this.moduleId,\n }));\n }\n}\n\nclass DefaultDevRuntime extends BaseDevRuntime {\n /**\n * @type {Map<string, ModuleHotContext>}\n */\n moduleHotContexts = new Map();\n /**\n * @override\n * @param {string} moduleId\n */\n createModuleHotContext(moduleId) {\n const hotContext = new ModuleHotContext(moduleId, this);\n this.moduleHotContexts.set(moduleId, hotContext);\n return hotContext;\n }\n}\n\n/** @param {string} url */\nfunction loadScript(url) {\n var script = document.createElement('script');\n script.src = url;\n script.type = 'module';\n script.onerror = function() {\n console.error('Failed to load script: ' + url);\n };\n document.body.appendChild(script);\n}\n\nconsole.debug('HMR runtime loaded', '$ADDR');\n// Generate client ID immediately at runtime initialization\n// This ensures the client ID is available before any lazy imports\nconst clientId = crypto.randomUUID();\nconst addr = new URL('ws://$ADDR');\naddr.searchParams.set('clientId', clientId);\n\nconst socket = new WebSocket(addr);\n\n(/** @type {any} */ (globalThis)).__rolldown_runtime__ ??=\n new DefaultDevRuntime(clientId);\n\n/** @param {MessageEvent} event */\nsocket.onmessage = function(event) {\n const data = JSON.parse(event.data);\n console.debug('Received message:', data);\n if (data.type === 'connected') {\n // Server acknowledged the connection\n console.debug('[hmr]: Connection established with server');\n } else if (data.type === 'hmr:update') {\n if (typeof process === 'object') {\n import(data.path);\n console.debug(`[hmr]: Importing HMR patch: ${data.path}`);\n } else {\n console.debug(`[hmr]: Loading HMR patch: ${data.path}`);\n loadScript(data.url);\n }\n } else if (data.type === 'hmr:reload') {\n console.log('[hmr]: Full reload required, reloading page');\n if (typeof location !== 'undefined') {\n location.reload();\n } else {\n console.log('[hmr]: location is undefined, cannot reload page');\n }\n }\n};\n".replaceAll("$ADDR", `${host}:${port}`);
2175
2358
  }
2176
2359
  //#endregion
2177
2360
  //#region src/utils/bindingify-input-options.ts
@@ -2416,4 +2599,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
2416
2599
  };
2417
2600
  }
2418
2601
  //#endregion
2419
- export { LOG_LEVEL_WARN as C, version as D, description as E, LOG_LEVEL_INFO as S, VERSION as T, getParallelPluginInfo as _, measureIfFunction as a, LOG_LEVEL_DEBUG as b, PluginContextData as c, transformRenderedChunk as d, __decorate as f, MinimalPluginContextImpl as g, PlainObjectLike as h, measureHookCost as i, transformModuleInfo as l, lazyProp as m, bindingifyPlugin as n, pluginTimingsRecorderFor as o, transformAssetSource as p, OUTPUT_OPTIONS_OWNER as r, RolldownMagicString as s, bindingifyInputOptions as t, transformToRollupOutput as u, normalizeHook as v, logLevelPriority as w, LOG_LEVEL_ERROR as x, normalizeLog as y };
2602
+ export { LOG_LEVEL_WARN as C, version as D, package_default as E, LOG_LEVEL_INFO as S, VERSION as T, getParallelPluginInfo as _, measureIfFunction as a, LOG_LEVEL_DEBUG as b, PluginContextData as c, transformRenderedChunk as d, __decorate as f, MinimalPluginContextImpl as g, PlainObjectLike as h, measureHookCost as i, transformModuleInfo as l, lazyProp as m, bindingifyPlugin as n, pluginTimingsRecorderFor as o, transformAssetSource as p, OUTPUT_OPTIONS_OWNER as r, RolldownMagicString as s, bindingifyInputOptions as t, transformToRollupOutput as u, normalizeHook as v, logLevelPriority as w, LOG_LEVEL_ERROR as x, normalizeLog as y };
@@ -1,4 +1,4 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-F14uvr6D.mjs";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B7Gsiuz7.mjs";
2
2
  //#region src/builtin-plugin/constructors.ts
3
3
  function viteModulePreloadPolyfillPlugin(config) {
4
4
  return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
@@ -1,5 +1,5 @@
1
- import { A as BindingViteResolvePluginConfig, C as BindingViteDynamicImportVarsPluginConfig, D as BindingViteModulePreloadPolyfillPluginConfig, O as BindingViteReactRefreshWrapperPluginConfig, S as BindingViteBuildImportAnalysisPluginConfig, T as BindingViteJsonPluginConfig, k as BindingViteReporterPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteImportGlobPluginConfig } from "./binding-BTa6BPQe.mjs";
2
- import { I as BuiltinPlugin, Kt as StringOrRegExp } from "./define-config-C7HCoqY8.mjs";
1
+ import { A as BindingViteResolvePluginConfig, C as BindingViteDynamicImportVarsPluginConfig, D as BindingViteModulePreloadPolyfillPluginConfig, O as BindingViteReactRefreshWrapperPluginConfig, S as BindingViteBuildImportAnalysisPluginConfig, T as BindingViteJsonPluginConfig, k as BindingViteReporterPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteImportGlobPluginConfig } from "./binding-tzp6Hc_3.mjs";
2
+ import { I as BuiltinPlugin, qt as StringOrRegExp } from "./define-config-CGhm2DU-.mjs";
3
3
  //#region src/builtin-plugin/constructors.d.ts
4
4
  declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
5
5
  type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConfig, "include" | "exclude"> & {
@@ -1,8 +1,8 @@
1
- import { n as __toESM, t as require_binding } from "./binding-BY0qR5iS.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
2
2
  import { a as logInputHookInOutputPlugin, n as error, s as logMissingCodeSplittingGroupDebugName } from "./logs-D6uA606S.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-F14uvr6D.mjs";
4
- import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-B8JHmN6_.mjs";
5
- import { a as unimplemented } from "./misc-DOSKtd97.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-B7Gsiuz7.mjs";
4
+ import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-DhjlrWZE.mjs";
5
+ import { a as unimplemented, t as arraify } from "./misc-DOSKtd97.mjs";
6
6
  import { Worker } from "node:worker_threads";
7
7
  import path, { sep } from "node:path";
8
8
  import { formatWithOptions, styleText } from "node:util";
@@ -413,6 +413,22 @@ function awaitAsync() {
413
413
  }
414
414
  };
415
415
  }
416
+ /* @__NO_SIDE_EFFECTS__ */
417
+ function check(requirement, message$1) {
418
+ return {
419
+ kind: "validation",
420
+ type: "check",
421
+ reference: check,
422
+ async: false,
423
+ expects: null,
424
+ requirement,
425
+ message: message$1,
426
+ "~run"(dataset, config$1) {
427
+ if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "input", dataset, config$1);
428
+ return dataset;
429
+ }
430
+ };
431
+ }
416
432
  /**
417
433
  * Creates a description metadata action.
418
434
  *
@@ -1559,7 +1575,8 @@ const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PU
1559
1575
  host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1560
1576
  implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1561
1577
  skipCommonRuntimeInjection: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1562
- lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1578
+ lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1579
+ hotUpdate: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1563
1580
  })]);
1564
1581
  const InputOptionsSchema = /* @__PURE__ */ strictObject({
1565
1582
  input: /* @__PURE__ */ optional(InputOptionSchema),
@@ -1606,7 +1623,7 @@ const InputOptionsSchema = /* @__PURE__ */ strictObject({
1606
1623
  transform: /* @__PURE__ */ optional(TransformOptionsSchema),
1607
1624
  watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
1608
1625
  checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
1609
- devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Used to name the build.")) })), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
1626
+ devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((id) => id !== "" && id !== "." && id !== ".." && !/[/\\\0]/.test(id), "Expected one path segment: not empty, not \".\" or \"..\", and without \"/\", \"\\\" or NUL"), /* @__PURE__ */ check((id) => id.toLowerCase().toUpperCase() !== "UNKNOWN-SESSION", "\"unknown-session\" is reserved for devtools events without a session context"))), /* @__PURE__ */ description("Used to name the build.")) })), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
1610
1627
  preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
1611
1628
  /* @__PURE__ */ literal("strict"),
1612
1629
  /* @__PURE__ */ literal("allow-extension"),
@@ -1660,6 +1677,7 @@ const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @_
1660
1677
  /* @__PURE__ */ void_(),
1661
1678
  /* @__PURE__ */ undefined_()
1662
1679
  ])));
1680
+ const InlineCommonChunksExcludeItemSchema = /* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema]);
1663
1681
  const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
1664
1682
  includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1665
1683
  minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
@@ -1681,7 +1699,11 @@ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
1681
1699
  entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1682
1700
  includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1683
1701
  tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
1684
- })))
1702
+ }))),
1703
+ experimentalInlineCommonChunks: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
1704
+ maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1705
+ exclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([InlineCommonChunksExcludeItemSchema, /* @__PURE__ */ array(InlineCommonChunksExcludeItemSchema)]))
1706
+ }))
1685
1707
  });
1686
1708
  const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
1687
1709
  symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
@@ -3026,11 +3048,15 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3026
3048
  }
3027
3049
  let advancedChunksResult;
3028
3050
  if (effectiveChunksOption != null) {
3029
- const { groups, ...restOptions } = effectiveChunksOption;
3051
+ const { groups, experimentalInlineCommonChunks, ...restOptions } = effectiveChunksOption;
3030
3052
  let chunkingContext;
3031
3053
  const getChunkingContext = (bindingContext) => chunkingContext ??= new ChunkingContextImpl(bindingContext, pluginContextData);
3032
3054
  advancedChunksResult = {
3033
3055
  ...restOptions,
3056
+ experimentalInlineCommonChunks: experimentalInlineCommonChunks == null ? void 0 : {
3057
+ maxSize: experimentalInlineCommonChunks.maxSize,
3058
+ exclude: experimentalInlineCommonChunks.exclude == null ? void 0 : arraify(experimentalInlineCommonChunks.exclude).map((matcher) => typeof matcher === "function" ? batchTest(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting.experimentalInlineCommonChunks.exclude", matcher), "output.codeSplitting.experimentalInlineCommonChunks.exclude") : matcher)
3059
+ },
3034
3060
  internalInvalidateModuleInfoCache: () => {
3035
3061
  chunkingContext?.clearModuleInfoCache();
3036
3062
  chunkingContext = void 0;
@@ -3081,12 +3107,12 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3081
3107
  *
3082
3108
  * The result is a `Uint8Array`, which crosses as a buffer instead of one tagged value per id.
3083
3109
  */
3084
- function batchTest(test) {
3110
+ function batchTest(test, optionName = "output.codeSplitting.groups[].test") {
3085
3111
  return (ids) => {
3086
3112
  const results = new Uint8Array(ids.length);
3087
3113
  for (let index = 0; index < ids.length; index++) {
3088
3114
  const result = test(ids[index]);
3089
- if (result != null && typeof result !== "boolean") throw new TypeError(`\`output.codeSplitting.groups[].test\` returned ${typeof result} for module "${ids[index]}", but expected a boolean, null or undefined.`);
3115
+ if (result != null && typeof result !== "boolean") throw new TypeError(`\`${optionName}\` returned ${typeof result} for module "${ids[index]}", but expected a boolean, null or undefined.`);
3090
3116
  results[index] = result === true ? 1 : 0;
3091
3117
  }
3092
3118
  return results;
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-xuHO4mAy.mjs";
2
- import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-BTa6BPQe.mjs";
2
+ import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-tzp6Hc_3.mjs";
3
3
  import { TopLevelFilterExpression } from "@voidzero-dev/vite-plus-core/rolldown/pluginutils";
4
4
  import { Program } from "@oxc-project/types";
5
5
  //#region src/types/misc.d.ts
@@ -145,6 +145,8 @@ interface SourceMap {
145
145
  sourcesContent: string[];
146
146
  version: number;
147
147
  debugId?: string;
148
+ ignoreList?: number[];
149
+ /** @deprecated Use `ignoreList` instead. */
148
150
  x_google_ignoreList?: number[];
149
151
  toString(): string;
150
152
  toUrl(): string;
@@ -1002,6 +1004,10 @@ interface OutputOptions {
1002
1004
  *
1003
1005
  * > [!WARNING]
1004
1006
  * > Enabling this option increases bundle size because wrapped modules need runtime init helpers.
1007
+ *
1008
+ * {@linkcode CodeSplittingOptions.experimentalInlineCommonChunks | experimentalInlineCommonChunks}
1009
+ * with a `maxSize` above `0` turns this option on when it is omitted.
1010
+ *
1005
1011
  * @default false
1006
1012
  */
1007
1013
  strictExecutionOrder?: boolean;
@@ -1242,6 +1248,71 @@ type CodeSplittingGroup = {
1242
1248
  * @category Code Splitting
1243
1249
  */
1244
1250
  type AdvancedChunksGroup = CodeSplittingGroup;
1251
+ /**
1252
+ * Options for `codeSplitting.experimentalInlineCommonChunks`.
1253
+ *
1254
+ * Small common chunks produced by automatic code splitting are replaced by a factory function
1255
+ * that is copied into the chunks reading them, unless every known entry loading path already registers
1256
+ * the factory. A registry in the runtime chunk makes sure the chunk's modules keep one
1257
+ * state, one execution and one set of export identities across all copies, so no entry downloads
1258
+ * code it could not reach with the option off.
1259
+ *
1260
+ * Non-entry chunks rely on loading paths visible to the build. Loading one by its
1261
+ * output URL through an unresolved import or external module can bypass required registrations.
1262
+ * Emit independently loaded modules as entries, using `this.emitFile` with
1263
+ * `preserveSignature: 'strict'` when their exports must be preserved. Alternatively, exclude
1264
+ * their shared dependencies from inlining, including transitive dependencies.
1265
+ * Static cycles through external modules back into generated output, including entries, are
1266
+ * unsupported. Bundle the modules forming such cycles together or exclude their shared dependencies.
1267
+ *
1268
+ * Before enabling it, check the plugins and code shapes that see a chunk's modules as one file:
1269
+ *
1270
+ * - A module of an inlined chunk appears in the `moduleIds` and `modules` of every chunk that
1271
+ * prints a copy, so a plugin that asks which chunk owns a module gets several answers. Vite's
1272
+ * CSS plugin, for example, emits a style module's CSS from every chunk whose `moduleIds` list
1273
+ * it; a Vite build passes `exclude: /\.(css|scss|sass|less|styl|stylus|pcss|postcss|sss)(\?|$)/`
1274
+ * so chunks holding styles stay files.
1275
+ * - A `renderChunk` hook whose rewrite yields different values in different directories makes
1276
+ * the copies differ, and the first chunk to run decides which text every reader sees; exclude
1277
+ * the modules concerned. Vite's asset URLs under a relative `base` resolve through
1278
+ * `import.meta.url` to the same URL from every copy and are not affected.
1279
+ * - The option turns `strictExecutionOrder` on when it is omitted. Strict execution order has an
1280
+ * open issue with top-level await inside static import cycles (rolldown/rolldown#9548), so run
1281
+ * the application under `strictExecutionOrder: true` before adding this option.
1282
+ * - Addons (`banner`, `intro`, `outro` and `footer`), including plugin hooks, apply to emitted
1283
+ * files. An inlined chunk shares the addon bindings of the file that registers its factory
1284
+ * first. Exclude modules that depend on separate file-local bindings or addon initialization order.
1285
+ * - A chunk that prints an inlined chunk names both sets of modules together, so a function or
1286
+ * class in either can get a `$1`-style suffix when the other declares the same name, and the
1287
+ * `.name` of an inlined chunk's function or class depends on which chunk loads first (under
1288
+ * `minify`, the mangled name does too). `output.keepNames` keeps every name.
1289
+ *
1290
+ * @experimental This feature is experimental. Its behavior and option shape may change in any release.
1291
+ *
1292
+ * @category Code Splitting
1293
+ */
1294
+ type ExperimentalInlineCommonChunksOptions = {
1295
+ /**
1296
+ * Common chunks whose pre-render size (the sum of the transformed source sizes of their modules,
1297
+ * in bytes) is strictly smaller than this value are candidates for inlining.
1298
+ * Use `Infinity` to remove the size limit.
1299
+ *
1300
+ * A value greater than `0` requires `output.format: 'es'`, an explicit
1301
+ * `preserveEntrySignatures: false` and code splitting, and it turns on
1302
+ * {@linkcode OutputOptions.strictExecutionOrder | strictExecutionOrder} when that option is
1303
+ * omitted. `output.strictExecutionOrder: false` is an error, `output.preserveModules`,
1304
+ * `experimental.devMode` and `experimental.onDemandWrapping` must be off.
1305
+ *
1306
+ * @default 0
1307
+ */
1308
+ maxSize?: number;
1309
+ /**
1310
+ * A matcher for module ids, or an array of them: a string (matched as a regular expression), a
1311
+ * RegExp, or a function, each applied like {@linkcode CodeSplittingGroup.test | test}. A common
1312
+ * chunk is kept as a file when any of its modules matches any matcher.
1313
+ */
1314
+ exclude?: StringOrRegExp | CodeSplittingTestFunction | Array<StringOrRegExp | CodeSplittingTestFunction>;
1315
+ };
1245
1316
  /**
1246
1317
  * Configuration options for advanced code splitting.
1247
1318
  *
@@ -1276,6 +1347,12 @@ type CodeSplittingOptions = {
1276
1347
  * Groups to be used for code splitting.
1277
1348
  */
1278
1349
  groups?: CodeSplittingGroup[];
1350
+ /**
1351
+ * Replace small automatic common chunks with factory copies in their consumers.
1352
+ *
1353
+ * @experimental This feature is experimental. Its behavior and option shape may change in any release.
1354
+ */
1355
+ experimentalInlineCommonChunks?: ExperimentalInlineCommonChunksOptions;
1279
1356
  };
1280
1357
  /**
1281
1358
  * Alias for {@linkcode CodeSplittingOptions}. Use this type for the `codeSplitting` option.
@@ -1310,7 +1387,7 @@ type BuildOptions = InputOptions & {
1310
1387
  */
1311
1388
  declare function build(options: BuildOptions): Promise<RolldownOutput>;
1312
1389
  /**
1313
- * Build multiple outputs __sequentially__.
1390
+ * Build multiple outputs __in parallel__.
1314
1391
  *
1315
1392
  * @param options The build options.
1316
1393
  * @returns A Promise that resolves to the build outputs for each option.
@@ -2092,9 +2169,10 @@ interface HookFilter {
2092
2169
  */
2093
2170
  moduleType?: ModuleTypeFilter;
2094
2171
  /**
2095
- * A filter based on the module's code.
2172
+ * A filter based on the code passed to the hook.
2096
2173
  *
2097
- * Only available for {@linkcode Plugin.transform | transform} hook.
2174
+ * Only available for {@linkcode Plugin.transform | transform} and
2175
+ * {@linkcode Plugin.renderChunk | renderChunk} hooks.
2098
2176
  */
2099
2177
  code?: GeneralHookFilter;
2100
2178
  }
@@ -2629,6 +2707,7 @@ interface ExistingRawSourceMap {
2629
2707
  sourcesContent?: (string | null | undefined)[] | undefined;
2630
2708
  sourceRoot?: string | undefined;
2631
2709
  version?: number | undefined;
2710
+ ignoreList?: number[] | undefined;
2632
2711
  x_google_ignoreList?: number[] | undefined;
2633
2712
  }
2634
2713
  /** @inline @category Plugin APIs */
@@ -3501,6 +3580,11 @@ type DevModeOptions = boolean | {
3501
3580
  */
3502
3581
  skipCommonRuntimeInjection?: boolean;
3503
3582
  lazy?: boolean;
3583
+ /**
3584
+ * Call the `hotUpdate` plugin hook. The `hotUpdate` option of `dev()` also turns it on.
3585
+ * @default false
3586
+ */
3587
+ hotUpdate?: boolean;
3504
3588
  };
3505
3589
  type OptimizationOptions = {
3506
3590
  /**
@@ -4040,6 +4124,11 @@ interface InputOptions {
4040
4124
  * Consumers can parse the output with `@rolldown/debug` after
4041
4125
  * `await bundle.close()` resolves.
4042
4126
  *
4127
+ * `sessionId` replaces the generated session id. It must be one path segment: not empty, not
4128
+ * `.` or `..`, and without `/`, `\` or NUL. Rolldown does not check that it is unique: give each
4129
+ * bundler that runs at the same time its own `sessionId`, or their devtools output mixes.
4130
+ * The name `unknown-session` is reserved regardless of case.
4131
+ *
4043
4132
  * @experimental
4044
4133
  */
4045
4134
  devtools?: {
@@ -4117,4 +4206,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
4117
4206
  declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
4118
4207
  declare function defineConfig(config: ConfigExport): ConfigExport;
4119
4208
  //#endregion
4120
- export { defineParallelPlugin as $, freeExternalMemory as $t, ResolvedId as A, ChunkFileNamesFunction as At, ExistingRawSourceMap as B, MinifyOptions as Bt, ParallelPluginHooks as C, RolldownBuild as Ct, ResolveFileUrlArgs as D, AdvancedChunksGroup as Dt, PluginMeta as E, AddonFunction as Et, withFilter as F, CommentsOptions as Ft, EmittedAsset as G, PartialNull as Gt, OutputBundle as H, OutputOptions as Ht, BuiltinPlugin as I, GeneratedCodeOptions as It, EmittedPrebuiltChunk as J, OutputChunk as Jt, EmittedChunk as K, StringOrRegExp as Kt, RUNTIME_MODULE_ID as L, GeneratedCodePreset as Lt, RolldownPluginOption as M, CodeSplittingGroup as Mt, SourceDescription as N, CodeSplittingNameFunction as Nt, ResolveIdExtraOptions as O, AdvancedChunksOptions as Ot, TransformResult as P, CodeSplittingOptions as Pt, DefineParallelPluginResult as Q, SourceMap as Qt, VERSION as R, GlobalsFunction as Rt, ObjectHook as S, rolldown as St, Plugin as T, build as Tt, TreeshakingOptions as U, PreRenderedAsset as Ut, SourceMapInput as V, ModuleFormat as Vt, TransformPluginContext as W, MaybePromise as Wt, PluginContext as X, RenderedModule as Xt, GetModuleInfo as Y, RenderedChunk as Yt, PluginContextResolveOptions as Z, RolldownOutput as Zt, HookFilterExtension as _, watch as _t, ChunkOptimizationOptions as a, BufferEncoding as at, ModuleOptions as b, RolldownWatcherWatcherEventMap as bt, InputOption as c, RolldownFsModule as ct, OptimizationOptions as d, NormalizedInputOptions as dt, ModuleInfo as en, MinimalPluginContext as et, WatcherFileWatcherOptions as f, TransformOptions as ft, FunctionPluginHooks as g, RolldownMagicString as gt, CustomPluginOptions as h, WarningHandlerWithDefault as ht, RolldownOptions as i, ModuleTypeFilter as it, RolldownPlugin as j, ChunkingContext as jt, ResolveIdResult as k, BuiltinModuleTag as kt, InputOptions as l, InternalModuleFormat as lt, AsyncPluginHooks as m, LoggingFunction as mt, RolldownOptionsFunction as n, GeneralHookFilter as nt, ExternalOption as o, RolldownDirectoryEntry as ot, WatcherOptions as p, ChecksOptions as pt, EmittedFile as q, OutputAsset as qt, defineConfig as r, HookFilter as rt, ExternalOptionFunction as s, RolldownFileStats as st, ConfigExport as t, SourcemapIgnoreListOption as tn, PluginContextMeta as tt, ModuleTypes as u, NormalizedOutputOptions as ut, ImportKind as v, RolldownWatcher as vt, PartialResolvedId as w, BuildOptions as wt, ModuleType as x, WatchOptions as xt, LoadResult as y, RolldownWatcherEvent as yt, BundleError as z, ManglePropertiesOptions as zt };
4209
+ export { defineParallelPlugin as $, SourceMap as $t, ResolvedId as A, ChunkFileNamesFunction as At, ExistingRawSourceMap as B, ManglePropertiesOptions as Bt, ParallelPluginHooks as C, RolldownBuild as Ct, ResolveFileUrlArgs as D, AdvancedChunksGroup as Dt, PluginMeta as E, AddonFunction as Et, withFilter as F, CommentsOptions as Ft, EmittedAsset as G, MaybePromise as Gt, OutputBundle as H, ModuleFormat as Ht, BuiltinPlugin as I, ExperimentalInlineCommonChunksOptions as It, EmittedPrebuiltChunk as J, OutputAsset as Jt, EmittedChunk as K, PartialNull as Kt, RUNTIME_MODULE_ID as L, GeneratedCodeOptions as Lt, RolldownPluginOption as M, CodeSplittingGroup as Mt, SourceDescription as N, CodeSplittingNameFunction as Nt, ResolveIdExtraOptions as O, AdvancedChunksOptions as Ot, TransformResult as P, CodeSplittingOptions as Pt, DefineParallelPluginResult as Q, RolldownOutput as Qt, VERSION as R, GeneratedCodePreset as Rt, ObjectHook as S, rolldown as St, Plugin as T, build as Tt, TreeshakingOptions as U, OutputOptions as Ut, SourceMapInput as V, MinifyOptions as Vt, TransformPluginContext as W, PreRenderedAsset as Wt, PluginContext as X, RenderedChunk as Xt, GetModuleInfo as Y, OutputChunk as Yt, PluginContextResolveOptions as Z, RenderedModule as Zt, HookFilterExtension as _, watch as _t, ChunkOptimizationOptions as a, BufferEncoding as at, ModuleOptions as b, RolldownWatcherWatcherEventMap as bt, InputOption as c, RolldownFsModule as ct, OptimizationOptions as d, NormalizedInputOptions as dt, freeExternalMemory as en, MinimalPluginContext as et, WatcherFileWatcherOptions as f, TransformOptions as ft, FunctionPluginHooks as g, RolldownMagicString as gt, CustomPluginOptions as h, WarningHandlerWithDefault as ht, RolldownOptions as i, ModuleTypeFilter as it, RolldownPlugin as j, ChunkingContext as jt, ResolveIdResult as k, BuiltinModuleTag as kt, InputOptions as l, InternalModuleFormat as lt, AsyncPluginHooks as m, LoggingFunction as mt, RolldownOptionsFunction as n, SourcemapIgnoreListOption as nn, GeneralHookFilter as nt, ExternalOption as o, RolldownDirectoryEntry as ot, WatcherOptions as p, ChecksOptions as pt, EmittedFile as q, StringOrRegExp as qt, defineConfig as r, HookFilter as rt, ExternalOptionFunction as s, RolldownFileStats as st, ConfigExport as t, ModuleInfo as tn, PluginContextMeta as tt, ModuleTypes as u, NormalizedOutputOptions as ut, ImportKind as v, RolldownWatcher as vt, PartialResolvedId as w, BuildOptions as wt, ModuleType as x, WatchOptions as xt, LoadResult as y, RolldownWatcherEvent as yt, BundleError as z, GlobalsFunction as zt };
@@ -1,4 +1,4 @@
1
- import { t as require_binding } from "./binding-BY0qR5iS.mjs";
1
+ import { t as require_binding } from "./binding-DlR5d34p.mjs";
2
2
  //#region src/types/sourcemap.ts
3
3
  function bindingifySourcemap(map) {
4
4
  if (map == null) return;
@@ -9,6 +9,7 @@ function bindingifySourcemap(map) {
9
9
  sources: map.sources?.map((s) => s ?? void 0),
10
10
  sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
11
11
  names: map.names,
12
+ ignoreList: map.ignoreList,
12
13
  x_google_ignoreList: map.x_google_ignoreList,
13
14
  debugId: "debugId" in map ? map.debugId : void 0
14
15
  } };
@@ -1,9 +1,9 @@
1
- import { t as rolldown } from "./rolldown-Bue0gNT5.mjs";
1
+ import { t as rolldown } from "./rolldown-C8QomUuX.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { readdir } from "node:fs/promises";
5
- import { pathToFileURL } from "node:url";
6
5
  import { cwd } from "node:process";
6
+ import { pathToFileURL } from "node:url";
7
7
  //#region src/utils/load-config.ts
8
8
  async function bundleTsConfig(configFile, isEsm) {
9
9
  const dirnameVarName = "injected_original_dirname";
@@ -1,4 +1,4 @@
1
- import { n as __toESM, t as require_binding } from "./binding-BY0qR5iS.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
2
2
  import { n as error, u as logPluginError } from "./logs-D6uA606S.mjs";
3
3
  //#region src/builtin-plugin/utils.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);