@voidzero-dev/vite-plus-core 0.1.12 → 0.1.13-alpha.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.
@@ -5,7 +5,7 @@ import { C as version, S as description } from "./shared/bindingify-input-option
5
5
  import { t as arraify } from "./shared/misc-DJYbNKZX.mjs";
6
6
  import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-CYoDea9V.mjs";
7
7
  import "./shared/error-CP8smW_P.mjs";
8
- import "./shared/parse-8FR1cSLd.mjs";
8
+ import "./shared/parse-BhVn_3w_.mjs";
9
9
  import { t as rolldown } from "./shared/rolldown-B7hI_r7G.mjs";
10
10
  import { t as loadConfig } from "./shared/load-config-CjCoDD5h.mjs";
11
11
  import path from "node:path";
@@ -3,7 +3,7 @@ import "./shared/normalize-string-or-regex-C5RWbu3O.mjs";
3
3
  import { x as VERSION } from "./shared/bindingify-input-options-D6u7COm1.mjs";
4
4
  import "./shared/rolldown-build-CYoDea9V.mjs";
5
5
  import "./shared/error-CP8smW_P.mjs";
6
- import "./shared/parse-8FR1cSLd.mjs";
6
+ import "./shared/parse-BhVn_3w_.mjs";
7
7
  import "./shared/rolldown-B7hI_r7G.mjs";
8
8
  import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
9
9
  import { t as loadConfig } from "./shared/load-config-CjCoDD5h.mjs";
@@ -3,7 +3,7 @@ import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/norma
3
3
  import { o as transformToRollupOutput } from "./shared/bindingify-input-options-D6u7COm1.mjs";
4
4
  import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-CYoDea9V.mjs";
5
5
  import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CP8smW_P.mjs";
6
- import { n as parseSync$1, t as parse$1 } from "./shared/parse-8FR1cSLd.mjs";
6
+ import { n as parseSync$1, t as parse$1 } from "./shared/parse-BhVn_3w_.mjs";
7
7
  import { a as viteImportGlobPlugin, c as viteModulePreloadPolyfillPlugin, d as viteResolvePlugin, f as viteWasmFallbackPlugin, i as viteDynamicImportVarsPlugin, l as viteReactRefreshWrapperPlugin, n as isolatedDeclarationPlugin, o as viteJsonPlugin, p as viteWebWorkerPostPlugin, r as viteBuildImportAnalysisPlugin, s as viteLoadFallbackPlugin, u as viteReporterPlugin } from "./shared/constructors-Ctal_Rbv.mjs";
8
8
  import { a as minifySync$1, i as minify$1, n as transform$1, r as transformSync$1, t as import_binding$1 } from "./shared/transform-BfdLLNnY.mjs";
9
9
  import { pathToFileURL } from "node:url";
@@ -4,7 +4,7 @@ import "./shared/normalize-string-or-regex-C5RWbu3O.mjs";
4
4
  import { a as BindingMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-D6u7COm1.mjs";
5
5
  import "./shared/rolldown-build-CYoDea9V.mjs";
6
6
  import "./shared/error-CP8smW_P.mjs";
7
- import "./shared/parse-8FR1cSLd.mjs";
7
+ import "./shared/parse-BhVn_3w_.mjs";
8
8
  import { t as rolldown } from "./shared/rolldown-B7hI_r7G.mjs";
9
9
  import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
10
10
  import { isMainThread } from "node:worker_threads";
@@ -2,7 +2,7 @@ import { n as __toESM, t as require_binding } from "./shared/binding-C5G6_6ql.mj
2
2
  import "./shared/normalize-string-or-regex-C5RWbu3O.mjs";
3
3
  import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-D6u7COm1.mjs";
4
4
  import "./shared/error-CP8smW_P.mjs";
5
- import "./shared/parse-8FR1cSLd.mjs";
5
+ import "./shared/parse-BhVn_3w_.mjs";
6
6
  import { parentPort, workerData } from "node:worker_threads";
7
7
  //#region src/parallel-plugin-worker.ts
8
8
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
@@ -1,6 +1,6 @@
1
1
  import "./shared/binding-C5G6_6ql.mjs";
2
2
  import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-D80CXhvg.mjs";
3
- import { n as parseSync, t as parse } from "./shared/parse-8FR1cSLd.mjs";
3
+ import { n as parseSync, t as parse } from "./shared/parse-BhVn_3w_.mjs";
4
4
  //#region src/parse-ast-index.ts
5
5
  function wrap(result, filename, sourceText) {
6
6
  if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
@@ -1,5 +1,5 @@
1
1
  import { n as __toESM, t as require_binding } from "./binding-C5G6_6ql.mjs";
2
- //#region ../../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/wrap.js
2
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.120.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  function wrap(result) {
4
4
  let program, module, comments, errors;
5
5
  return {
@@ -3,7 +3,7 @@ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as t
3
3
  import * as ESTree from "@oxc-project/types";
4
4
  import { Program } from "@oxc-project/types";
5
5
 
6
- //#region ../../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
6
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.120.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
7
7
  interface VisitorObject$1 {
8
8
  DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
9
9
  "DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
@@ -1,8 +1,8 @@
1
1
  import "./shared/binding-C5G6_6ql.mjs";
2
2
  import "./shared/error-CP8smW_P.mjs";
3
- import { n as parseSync, t as parse } from "./shared/parse-8FR1cSLd.mjs";
3
+ import { n as parseSync, t as parse } from "./shared/parse-BhVn_3w_.mjs";
4
4
  import { a as minifySync, i as minify, n as transform, r as transformSync, t as import_binding } from "./shared/transform-BfdLLNnY.mjs";
5
- //#region ../../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
5
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.120.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
6
6
  function walkNode(node, visitors) {
7
7
  if (node == null) return;
8
8
  if (Array.isArray(node)) {
@@ -2012,7 +2012,7 @@ function walkTSUnionType(node, visitors) {
2012
2012
  exit !== null && exit(node);
2013
2013
  }
2014
2014
  //#endregion
2015
- //#region ../../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2015
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.120.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2016
2016
  /** Mapping from node type name to node type ID */
2017
2017
  const NODE_TYPE_IDS_MAP = new Map([
2018
2018
  ["DebuggerStatement", 0],
@@ -2182,7 +2182,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2182
2182
  ["TSUnionType", 164]
2183
2183
  ]);
2184
2184
  //#endregion
2185
- //#region ../../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/visit/visitor.js
2185
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.120.0/node_modules/oxc-parser/src-js/visit/visitor.js
2186
2186
  let compiledVisitor;
2187
2187
  function createCompiledVisitor() {
2188
2188
  compiledVisitor = [];
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
2
- import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as z, o as generateColor, p as green, r as version, s as getNameLabel, t as R, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-BR1iuPKy.js";
2
+ import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as z, o as generateColor, p as green, r as version, s as getNameLabel, t as R, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-JovZVvCY.js";
3
3
  import { t as createDebug } from "./node-B3Gdtau1.js";
4
4
  import { i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-UU7z2A9Z.js";
5
5
  import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
@@ -21,7 +21,7 @@ import fs$1, { existsSync, readFileSync, writeFileSync } from "node:fs";
21
21
  import { Buffer } from "node:buffer";
22
22
  import { brotliCompress, gzip } from "node:zlib";
23
23
  import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
24
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
24
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
25
25
  function fsExists(path) {
26
26
  return access(path).then(() => true, () => false);
27
27
  }
@@ -64,7 +64,7 @@ function stripExtname(filePath) {
64
64
  return filePath.slice(0, -ext.length);
65
65
  }
66
66
  //#endregion
67
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/format-DPVBd8E4.mjs
67
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/format-DPVBd8E4.mjs
68
68
  const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
69
69
  function getShimsInject(format, platform) {
70
70
  if (format === "es" && platform === "node") return {
@@ -3076,7 +3076,7 @@ function createConfigCoreLoader(options) {
3076
3076
  };
3077
3077
  }
3078
3078
  //#endregion
3079
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/options-CoPog4o1.mjs
3079
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/options-DoRzOC0d.mjs
3080
3080
  const __cjs_require$1 = createRequire(import.meta.url);
3081
3081
  const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
3082
3082
  const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
@@ -3295,6 +3295,7 @@ async function writeExports(options, chunks, inlinedDeps) {
3295
3295
  }
3296
3296
  const original = readFileSync(pkg.packageJsonPath, "utf8");
3297
3297
  let contents = JSON.stringify(updatedPkg, null, detectIndentation(original));
3298
+ if (original.includes("\r\n")) contents = contents.replaceAll("\n", "\r\n");
3298
3299
  if (original.endsWith("\n")) contents += "\n";
3299
3300
  if (contents !== original) writeFileSync(pkg.packageJsonPath, contents, "utf8");
3300
3301
  }
@@ -3832,7 +3833,7 @@ function filterConfig(filter, configCwd, name) {
3832
3833
  return toArray(filter).some((value) => name && name === value || cwd === value);
3833
3834
  }
3834
3835
  //#endregion
3835
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/watch-CS1xCZMR.mjs
3836
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/watch-CS1xCZMR.mjs
3836
3837
  async function copy(options) {
3837
3838
  if (!options.copy) return;
3838
3839
  const resolved = await resolveCopyEntries(options);
@@ -4041,7 +4042,7 @@ function WatchPlugin(configFiles, { config, chunks }) {
4041
4042
  };
4042
4043
  }
4043
4044
  //#endregion
4044
- //#region ../../node_modules/.pnpm/hookable@6.0.1/node_modules/hookable/dist/index.mjs
4045
+ //#region ../../node_modules/.pnpm/hookable@6.1.0/node_modules/hookable/dist/index.mjs
4045
4046
  function flatHooks(configHooks, hooks = {}, parentName) {
4046
4047
  for (const key in configHooks) {
4047
4048
  const subHook = configHooks[key];
@@ -4143,6 +4144,9 @@ var Hookable = class {
4143
4144
  if (hooks.length === 0) this._hooks[name] = void 0;
4144
4145
  }
4145
4146
  }
4147
+ clearHook(name) {
4148
+ this._hooks[name] = void 0;
4149
+ }
4146
4150
  deprecateHook(name, deprecated) {
4147
4151
  this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
4148
4152
  const _hooks = this._hooks[name] || [];
@@ -4209,7 +4213,7 @@ var Hookable = class {
4209
4213
  }
4210
4214
  };
4211
4215
  //#endregion
4212
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/build-Dh89hfzV.mjs
4216
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/build-CoLhkNXE.mjs
4213
4217
  const __cjs_require = createRequire(import.meta.url);
4214
4218
  const satisfies = __cjs_require("./npm_entry_semver_functions_satisfies.cjs");
4215
4219
  const coerce = __cjs_require("./npm_entry_semver_functions_coerce.cjs");
@@ -4502,7 +4506,7 @@ async function bundleDone(bundleByPkg, bundle) {
4502
4506
  async function packTarball(packageJsonPath) {
4503
4507
  const pkgDir = path.dirname(packageJsonPath);
4504
4508
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
4505
- const { detect } = await import("./detect-DN3DXXYt-hqP1wKSG.js");
4509
+ const { detect } = await import("./detect-DN3DXXYt-BiiMP_XL.js");
4506
4510
  try {
4507
4511
  const detected = await detect({ cwd: pkgDir });
4508
4512
  if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
@@ -1,5 +1,5 @@
1
- import "./main-BR1iuPKy.js";
1
+ import "./main-JovZVvCY.js";
2
2
  import "./node-B3Gdtau1.js";
3
- import { t as build$1 } from "./build-Dh89hfzV-CSN02Okj.js";
3
+ import { t as build$1 } from "./build-CoLhkNXE-DtR1EaBG.js";
4
4
  import "./filename-UU7z2A9Z.js";
5
5
  export { build$1 as build };
@@ -1,6 +1,6 @@
1
- import { C as resolveComma, E as toArray } from "./main-BR1iuPKy.js";
1
+ import { C as resolveComma, E as toArray } from "./main-JovZVvCY.js";
2
2
  import { n as enable, r as namespaces, t as createDebug } from "./node-B3Gdtau1.js";
3
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/debug-C4FmgzkJ.mjs
3
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/debug-C4FmgzkJ.mjs
4
4
  const debugLog = createDebug("tsdown:debug");
5
5
  function enableDebug(debug) {
6
6
  if (!debug) return;
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs/promises";
4
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/detect-DN3DXXYt.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/detect-DN3DXXYt.mjs
5
5
  const AGENTS = [
6
6
  "npm",
7
7
  "yarn",
@@ -2,7 +2,7 @@ import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
2
2
  import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
3
3
  import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
4
4
 
5
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/logger-DtCm1ySP.d.mts
5
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/logger-DtCm1ySP.d.mts
6
6
  //#region src/utils/types.d.ts
7
7
  type Overwrite<T, U> = Omit<T, keyof U> & U;
8
8
  type Awaitable<T> = T | Promise<T>;
@@ -29,7 +29,7 @@ interface Logger {
29
29
  }
30
30
  declare const globalLogger: Logger; //#endregion
31
31
  //#endregion
32
- //#region ../../node_modules/.pnpm/hookable@6.0.1/node_modules/hookable/dist/index.d.mts
32
+ //#region ../../node_modules/.pnpm/hookable@6.1.0/node_modules/hookable/dist/index.d.mts
33
33
  //#region src/types.d.ts
34
34
  type HookCallback = (...arguments_: any) => Promise<void> | void;
35
35
  type HookKeys<T> = keyof T & string;
@@ -66,6 +66,7 @@ declare class Hookable<HooksT extends Record<string, any> = Record<string, HookC
66
66
  }): () => void;
67
67
  hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
68
68
  removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
69
+ clearHook<NameT extends HookNameT>(name: NameT): void;
69
70
  deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
70
71
  deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
71
72
  addHooks(configHooks: NestedHooks<HooksT>): () => void;
@@ -8473,9 +8474,41 @@ interface GlobDependency {
8473
8474
  glob: string;
8474
8475
  }
8475
8476
  //#endregion
8476
- //#region ../../node_modules/.pnpm/@tsdown+css@0.21.3_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.8__postcss@8.5.8_sass-e_51db9ed59721905a0258cdc790ed7d6f/node_modules/@tsdown/css/dist/index.d.mts
8477
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.21.4_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.8__postcss-modules@6.0._abf34fadfb7b8325a031a05f696fa363/node_modules/@tsdown/css/dist/index.d.mts
8477
8478
  //#region src/options.d.ts
8478
8479
  type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
8480
+ interface CSSModulesOptions {
8481
+ /**
8482
+ * Controls the scoping behavior.
8483
+ * @default 'local'
8484
+ */
8485
+ scopeBehaviour?: "global" | "local";
8486
+ /**
8487
+ * File paths matching these patterns will use global scoping.
8488
+ */
8489
+ globalModulePaths?: RegExp[];
8490
+ /**
8491
+ * Pattern or function to generate scoped class names.
8492
+ * When using `transformer: 'lightningcss'`, only string patterns are supported.
8493
+ */
8494
+ generateScopedName?: string | ((name: string, filename: string, css: string) => string);
8495
+ /**
8496
+ * Prefix added to hashes when generating scoped names.
8497
+ */
8498
+ hashPrefix?: string;
8499
+ /**
8500
+ * Transform convention for exported class names.
8501
+ */
8502
+ localsConvention?: "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly";
8503
+ /**
8504
+ * Whether to include global class names in the export.
8505
+ */
8506
+ exportGlobals?: boolean;
8507
+ /**
8508
+ * Callback to receive the generated class name mappings.
8509
+ */
8510
+ getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
8511
+ }
8479
8512
  interface CssOptions {
8480
8513
  /**
8481
8514
  * Enable/disable CSS code splitting.
@@ -8535,6 +8568,14 @@ interface CssOptions {
8535
8568
  */
8536
8569
  inject?: boolean;
8537
8570
  /**
8571
+ * CSS modules configuration.
8572
+ * When not `false`, `.module.css` files (and preprocessor variants) are
8573
+ * treated as CSS modules with scoped class names.
8574
+ *
8575
+ * @see https://github.com/css-modules/css-modules
8576
+ */
8577
+ modules?: CSSModulesOptions | false;
8578
+ /**
8538
8579
  * CSS transformer to use. Controls how CSS is processed:
8539
8580
  *
8540
8581
  * - `'lightningcss'` (default): `@import` handled by Lightning CSS
@@ -9516,7 +9557,7 @@ interface TsgoOptions {
9516
9557
  path?: string;
9517
9558
  }
9518
9559
  //#endregion
9519
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.0_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
9560
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.2_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
9520
9561
  //#region src/node/cli-commands.d.ts
9521
9562
  interface StartOptions {
9522
9563
  root?: string;
@@ -9526,7 +9567,7 @@ interface StartOptions {
9526
9567
  open?: boolean;
9527
9568
  }
9528
9569
  //#endregion
9529
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.3_tsdown@0.21.3/node_modules/@tsdown/exe/dist/index.d.mts
9570
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.4_tsdown@0.21.4/node_modules/@tsdown/exe/dist/index.d.mts
9530
9571
  //#region src/platform.d.ts
9531
9572
  type ExePlatform = "win" | "darwin" | "linux";
9532
9573
  type ExeArch = "x64" | "arm64";
@@ -9667,7 +9708,7 @@ interface Options$1 {
9667
9708
  depKinds?: Array<DepKind>;
9668
9709
  }
9669
9710
  //#endregion
9670
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/types-D2Jnze_i.d.mts
9711
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/types-D2Jnze_i.d.mts
9671
9712
  //#region src/features/copy.d.ts
9672
9713
  interface CopyEntry {
9673
9714
  /**
@@ -10791,7 +10832,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
10791
10832
  exe: false | ExeOptions;
10792
10833
  }>; //#endregion
10793
10834
  //#endregion
10794
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/config-D9p_BCF3.d.mts
10835
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/config-D9p_BCF3.d.mts
10795
10836
  //#region src/config/options.d.ts
10796
10837
  /**
10797
10838
  * Resolve user config into resolved configs
@@ -10811,7 +10852,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
10811
10852
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
10812
10853
  declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
10813
10854
  //#endregion
10814
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/index.d.mts
10855
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/index.d.mts
10815
10856
  //#region src/build.d.ts
10816
10857
  /**
10817
10858
  * Build with tsdown.
@@ -1,10 +1,10 @@
1
- import { c as globalLogger } from "./main-BR1iuPKy.js";
1
+ import { c as globalLogger } from "./main-JovZVvCY.js";
2
2
  import "./node-B3Gdtau1.js";
3
- import { t as enableDebug } from "./debug-C4FmgzkJ-58KiZwv5.js";
4
- import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-Dh89hfzV-CSN02Okj.js";
3
+ import { t as enableDebug } from "./debug-C4FmgzkJ-Co4tnxmE.js";
4
+ import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-CoLhkNXE-DtR1EaBG.js";
5
5
  import "./filename-UU7z2A9Z.js";
6
6
  import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
7
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/config.mjs
7
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/config.mjs
8
8
  function defineConfig(options) {
9
9
  return options;
10
10
  }
@@ -172,7 +172,7 @@ const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible,
172
172
  module.exports = w, w.default = w;
173
173
  })))(), 1)).default;
174
174
  //#endregion
175
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/logger-BU0v7CAk.mjs
175
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/logger-BU0v7CAk.mjs
176
176
  const LogLevels = {
177
177
  silent: 0,
178
178
  error: 1,
@@ -296,8 +296,8 @@ function hue2rgb(p, q, t) {
296
296
  return p;
297
297
  }
298
298
  //#endregion
299
- //#region ../../node_modules/.pnpm/tsdown@0.21.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.3_@tsdown+exe@0.21.3_@type_38be87ebcd54001dc11621ca3e3d3fad/node_modules/tsdown/dist/package-CaVX988O.mjs
300
- var version = "0.21.3";
299
+ //#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_17eb19013b58e1a32121480e0690eafa/node_modules/tsdown/dist/package-BV2VRL7Z.mjs
300
+ var version = "0.21.4";
301
301
  //#endregion
302
302
  //#region ../../node_modules/.pnpm/tinyexec@1.0.4/node_modules/tinyexec/dist/main.mjs
303
303
  var l = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { c as globalLogger, f as dim, g as yellow, r as version, t as R } from "./main-BR1iuPKy.js";
2
+ import { c as globalLogger, f as dim, g as yellow, r as version, t as R } from "./main-JovZVvCY.js";
3
3
  import "./node-B3Gdtau1.js";
4
- import { t as enableDebug } from "./debug-C4FmgzkJ-58KiZwv5.js";
4
+ import { t as enableDebug } from "./debug-C4FmgzkJ-Co4tnxmE.js";
5
5
  import module, { createRequire } from "node:module";
6
6
  import process$1 from "node:process";
7
7
  import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
@@ -631,7 +631,7 @@ cli.command("[...files]", "Bundle files", {
631
631
  }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
632
632
  globalLogger.level = flags.logLevel || "info";
633
633
  globalLogger.info(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
634
- const { build } = await import("./build-CGB4R_gC-Dyc6Tj-y.js");
634
+ const { build } = await import("./build-dhDyu66J-DxSssGzc.js");
635
635
  if (input.length > 0) flags.entry = input;
636
636
  await build(flags);
637
637
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vite-plus-core",
3
- "version": "0.1.12",
3
+ "version": "0.1.13-alpha.0",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -100,8 +100,8 @@
100
100
  "./types/internal/*": null
101
101
  },
102
102
  "dependencies": {
103
- "@oxc-project/runtime": "=0.115.0",
104
- "@oxc-project/types": "=0.115.0",
103
+ "@oxc-project/runtime": "=0.120.0",
104
+ "@oxc-project/types": "=0.120.0",
105
105
  "lightningcss": "^1.30.2",
106
106
  "postcss": "^8.5.6"
107
107
  },
@@ -112,12 +112,12 @@
112
112
  "@babel/types": "^7.28.5",
113
113
  "@oxc-node/cli": "^0.0.35",
114
114
  "@oxc-node/core": "^0.0.35",
115
- "@vitejs/devtools": "^0.1.0",
115
+ "@vitejs/devtools": "^0.1.2",
116
116
  "es-module-lexer": "^1.7.0",
117
117
  "hookable": "^6.0.1",
118
118
  "magic-string": "^0.30.21",
119
- "oxc-parser": "=0.115.0",
120
- "oxfmt": "=0.40.0",
119
+ "oxc-parser": "=0.120.0",
120
+ "oxfmt": "=0.41.0",
121
121
  "picocolors": "^1.1.1",
122
122
  "picomatch": "^4.0.3",
123
123
  "pkg-types": "^2.3.0",
@@ -127,14 +127,14 @@
127
127
  "semver": "^7.7.3",
128
128
  "tinyglobby": "^0.2.15",
129
129
  "tree-kill": "^1.2.2",
130
- "tsdown": "^0.21.3",
130
+ "tsdown": "^0.21.4",
131
131
  "rolldown": "1.0.0-rc.9",
132
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.12"
132
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.13-alpha.0"
133
133
  },
134
134
  "peerDependencies": {
135
135
  "@arethetypeswrong/core": "^0.18.1",
136
- "@tsdown/css": "0.21.3",
137
- "@tsdown/exe": "0.21.3",
136
+ "@tsdown/css": "0.21.4",
137
+ "@tsdown/exe": "0.21.4",
138
138
  "@types/node": "^20.19.0 || >=22.12.0",
139
139
  "@vitejs/devtools": "^0.0.0-alpha.31",
140
140
  "esbuild": "^0.27.0",
@@ -216,7 +216,7 @@
216
216
  "bundledVersions": {
217
217
  "vite": "8.0.0",
218
218
  "rolldown": "1.0.0-rc.9",
219
- "tsdown": "0.21.3"
219
+ "tsdown": "0.21.4"
220
220
  },
221
221
  "scripts": {
222
222
  "build": "oxnode -C dev ./build.ts"