weapp-tailwindcss 4.8.9 → 4.8.11

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 (46) hide show
  1. package/dist/{chunk-ZTGB2D5W.js → chunk-22ETJBBT.js} +9 -8
  2. package/dist/{chunk-XQKBWIFI.js → chunk-2SG4SGMQ.js} +7 -7
  3. package/dist/{chunk-3BMQ6ZWL.mjs → chunk-3NLDVPXD.mjs} +2 -2
  4. package/dist/{chunk-S2YGU6BU.js → chunk-45BMEACS.js} +42 -20
  5. package/dist/{chunk-Z366CKKB.js → chunk-6LNKARWD.js} +28 -28
  6. package/dist/{chunk-FYYIFZ36.mjs → chunk-BSGZZCLH.mjs} +4 -3
  7. package/dist/{chunk-M4NERJO7.js → chunk-CFFV3OIP.js} +1 -1
  8. package/dist/{chunk-PBUQRF6F.js → chunk-DLSEDDLQ.js} +22 -22
  9. package/dist/{chunk-4KBHUV2C.js → chunk-FAKEMDGU.js} +6 -6
  10. package/dist/{chunk-6OE4Q2BC.mjs → chunk-FGNKGESE.mjs} +4 -4
  11. package/dist/{chunk-6UW6DOPI.js → chunk-FM3FLOYY.js} +5 -5
  12. package/dist/{chunk-IXK4ZWFR.mjs → chunk-HHSKDU3Z.mjs} +28 -6
  13. package/dist/{chunk-5ROWVF7O.mjs → chunk-LAVN5SDT.mjs} +2 -2
  14. package/dist/{chunk-3IP5JCFZ.mjs → chunk-SXBK4NF4.mjs} +1 -1
  15. package/dist/{chunk-H6YMPVI6.mjs → chunk-TWF4BQKE.mjs} +2 -2
  16. package/dist/{chunk-AGWNHP3C.mjs → chunk-W6ASDRWZ.mjs} +1 -1
  17. package/dist/{chunk-J25ZFRYM.js → chunk-YXT3T3LH.js} +2 -2
  18. package/dist/cli.js +140 -58
  19. package/dist/cli.mjs +97 -15
  20. package/dist/core.js +10 -10
  21. package/dist/core.mjs +4 -4
  22. package/dist/css-macro/postcss.js +1 -1
  23. package/dist/css-macro/postcss.mjs +1 -1
  24. package/dist/css-macro.js +1 -1
  25. package/dist/css-macro.mjs +1 -1
  26. package/dist/defaults.js +1 -1
  27. package/dist/defaults.mjs +1 -1
  28. package/dist/gulp.js +6 -6
  29. package/dist/gulp.mjs +5 -5
  30. package/dist/index.js +10 -10
  31. package/dist/index.mjs +8 -8
  32. package/dist/postcss-html-transform.js +1 -1
  33. package/dist/postcss-html-transform.mjs +1 -1
  34. package/dist/presets.js +4 -4
  35. package/dist/presets.mjs +2 -2
  36. package/dist/reset.js +1 -1
  37. package/dist/reset.mjs +1 -1
  38. package/dist/types.js +1 -1
  39. package/dist/types.mjs +1 -1
  40. package/dist/vite.js +7 -7
  41. package/dist/vite.mjs +5 -5
  42. package/dist/webpack.js +8 -8
  43. package/dist/webpack.mjs +6 -6
  44. package/dist/webpack4.js +31 -31
  45. package/dist/webpack4.mjs +5 -5
  46. package/package.json +6 -5
@@ -5,13 +5,13 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkJ25ZFRYMjs = require('./chunk-J25ZFRYM.js');
8
+ var _chunkYXT3T3LHjs = require('./chunk-YXT3T3LH.js');
9
9
 
10
10
 
11
11
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
12
12
 
13
13
 
14
- var _chunk6UW6DOPIjs = require('./chunk-6UW6DOPI.js');
14
+ var _chunkFM3FLOYYjs = require('./chunk-FM3FLOYY.js');
15
15
 
16
16
 
17
17
 
@@ -22,7 +22,7 @@ var _chunk6UW6DOPIjs = require('./chunk-6UW6DOPI.js');
22
22
 
23
23
 
24
24
 
25
- var _chunkZTGB2D5Wjs = require('./chunk-ZTGB2D5W.js');
25
+ var _chunk22ETJBBTjs = require('./chunk-22ETJBBT.js');
26
26
 
27
27
 
28
28
  var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
@@ -54,7 +54,7 @@ function updateStaticAttribute(ms, prop) {
54
54
  const start = prop.value.loc.start.offset + 1;
55
55
  const end = prop.value.loc.end.offset - 1;
56
56
  if (start < end) {
57
- ms.update(start, end, _chunkZTGB2D5Wjs.replaceWxml.call(void 0, prop.value.content));
57
+ ms.update(start, end, _chunk22ETJBBTjs.replaceWxml.call(void 0, prop.value.content));
58
58
  }
59
59
  }
60
60
  function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
@@ -66,7 +66,7 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
66
66
  if (start >= end) {
67
67
  return;
68
68
  }
69
- const generated = _chunkZTGB2D5Wjs.generateCode.call(void 0, prop.exp.content, {
69
+ const generated = _chunk22ETJBBTjs.generateCode.call(void 0, prop.exp.content, {
70
70
  jsHandler,
71
71
  runtimeSet,
72
72
  wrapExpression: true
@@ -95,7 +95,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
95
95
  return;
96
96
  }
97
97
  const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
98
- const matchCustomAttribute = _chunkZTGB2D5Wjs.createAttributeMatcher.call(void 0, customAttributesEntities);
98
+ const matchCustomAttribute = _chunk22ETJBBTjs.createAttributeMatcher.call(void 0, customAttributesEntities);
99
99
  const ms = new (0, _magicstring2.default)(code);
100
100
  const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
101
101
  if (errors.length === 0) {
@@ -326,7 +326,7 @@ function createUniAppXAssetTask(file, originalSource, outDir, options) {
326
326
  runtimeSet,
327
327
  applyLinkedResults: applyLinkedResults2
328
328
  } = options;
329
- const absoluteFile = _chunkJ25ZFRYMjs.toAbsoluteOutputPath.call(void 0, file, outDir);
329
+ const absoluteFile = _chunkYXT3T3LHjs.toAbsoluteOutputPath.call(void 0, file, outDir);
330
330
  const rawSource = originalSource.source.toString();
331
331
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
332
332
  cache,
@@ -361,8 +361,8 @@ function createUniAppXAssetTask(file, originalSource, outDir, options) {
361
361
  }
362
362
 
363
363
  // src/bundlers/vite/index.ts
364
- var debug = _chunkZTGB2D5Wjs.createDebug.call(void 0, );
365
- var weappTailwindcssPackageDir = _chunkJ25ZFRYMjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
364
+ var debug = _chunk22ETJBBTjs.createDebug.call(void 0, );
365
+ var weappTailwindcssPackageDir = _chunkYXT3T3LHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
366
366
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
367
367
  function joinPosixPath(base, subpath) {
368
368
  if (base.endsWith("/")) {
@@ -406,7 +406,7 @@ function isJavaScriptEntry(entry) {
406
406
  function createBundleModuleGraphOptions(outputDir, entries) {
407
407
  return {
408
408
  resolve(specifier, importer) {
409
- return _chunkJ25ZFRYMjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
409
+ return _chunkYXT3T3LHjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
410
410
  },
411
411
  load(id) {
412
412
  const entry = entries.get(id);
@@ -444,7 +444,7 @@ function applyLinkedResults(linked, entries, onLinkedUpdate, onApplied) {
444
444
  }
445
445
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
446
446
  const rewriteCssImportsSpecified = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
447
- const opts = _chunkZTGB2D5Wjs.getCompilerContext.call(void 0, options);
447
+ const opts = _chunk22ETJBBTjs.getCompilerContext.call(void 0, options);
448
448
  const {
449
449
  disabled,
450
450
  customAttributes,
@@ -466,8 +466,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
466
466
  if (disabled) {
467
467
  return;
468
468
  }
469
- const customAttributesEntities = _chunkZTGB2D5Wjs.toCustomAttributesEntities.call(void 0, customAttributes);
470
- const patchRecorderState = _chunk6UW6DOPIjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
469
+ const customAttributesEntities = _chunk22ETJBBTjs.toCustomAttributesEntities.call(void 0, customAttributes);
470
+ const patchRecorderState = _chunkFM3FLOYYjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
471
471
  source: "runtime",
472
472
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
473
473
  });
@@ -481,7 +481,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
481
481
  let runtimeSetPromise;
482
482
  let resolvedConfig;
483
483
  async function refreshRuntimeState(force) {
484
- const refreshed = await _chunkZTGB2D5Wjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
484
+ const refreshed = await _chunk22ETJBBTjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
485
485
  if (refreshed) {
486
486
  runtimeSet = void 0;
487
487
  runtimeSetPromise = void 0;
@@ -494,7 +494,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
494
494
  return runtimeSet;
495
495
  }
496
496
  if (force || !runtimeSetPromise) {
497
- const task2 = _chunkZTGB2D5Wjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
497
+ const task2 = _chunk22ETJBBTjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
498
498
  force: force || !runtimeSet,
499
499
  skipRefresh: force
500
500
  });
@@ -514,12 +514,12 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
514
514
  const shouldRewriteCssImports = opts.rewriteCssImports !== false && (rewriteCssImportsSpecified || (_nullishCoalesce(runtimeState.twPatcher.majorVersion, () => ( 0))) >= 4);
515
515
  const rewritePlugins = !shouldRewriteCssImports ? [] : [
516
516
  {
517
- name: `${_chunkZTGB2D5Wjs.vitePluginName}:rewrite-css-imports`,
517
+ name: `${_chunk22ETJBBTjs.vitePluginName}:rewrite-css-imports`,
518
518
  enforce: "pre",
519
519
  resolveId: {
520
520
  order: "pre",
521
521
  handler(id, importer) {
522
- const replacement = _chunkJ25ZFRYMjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix, {
522
+ const replacement = _chunkYXT3T3LHjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix, {
523
523
  join: joinPosixPath,
524
524
  appType
525
525
  });
@@ -538,7 +538,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
538
538
  if (!isCSSRequest(id)) {
539
539
  return null;
540
540
  }
541
- const rewritten = _chunkJ25ZFRYMjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix, {
541
+ const rewritten = _chunkYXT3T3LHjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix, {
542
542
  join: joinPosixPath,
543
543
  appType
544
544
  });
@@ -568,7 +568,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
568
568
  const plugins = [
569
569
  ...rewritePlugins,
570
570
  {
571
- name: `${_chunkZTGB2D5Wjs.vitePluginName}:post`,
571
+ name: `${_chunk22ETJBBTjs.vitePluginName}:post`,
572
572
  enforce: "post",
573
573
  configResolved(config) {
574
574
  resolvedConfig = config;
@@ -594,7 +594,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
594
594
  for (const [fileName, output] of entries) {
595
595
  const entry = { fileName, output };
596
596
  if (isJavaScriptEntry(entry)) {
597
- const absolute = _chunkJ25ZFRYMjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
597
+ const absolute = _chunkYXT3T3LHjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
598
598
  jsEntries.set(absolute, entry);
599
599
  }
600
600
  }
@@ -661,7 +661,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
661
661
  if (Array.isArray(groupedEntries.js)) {
662
662
  for (const [file, originalSource] of groupedEntries.js) {
663
663
  if (originalSource.type === "chunk") {
664
- const absoluteFile = _chunkJ25ZFRYMjs.toAbsoluteOutputPath.call(void 0, file, outDir);
664
+ const absoluteFile = _chunkYXT3T3LHjs.toAbsoluteOutputPath.call(void 0, file, outDir);
665
665
  const initialRawSource = originalSource.code;
666
666
  jsTaskFactories.push(async () => {
667
667
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
@@ -742,7 +742,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
742
742
  );
743
743
  }
744
744
  }
745
- _chunkJ25ZFRYMjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
745
+ _chunkYXT3T3LHjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
746
746
  await Promise.all(tasks);
747
747
  for (const apply of pendingLinkedUpdates) {
748
748
  apply();
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkJ25ZFRYMjs = require('./chunk-J25ZFRYM.js');
4
+ var _chunkYXT3T3LHjs = require('./chunk-YXT3T3LH.js');
5
5
 
6
6
 
7
- var _chunkZTGB2D5Wjs = require('./chunk-ZTGB2D5W.js');
7
+ var _chunk22ETJBBTjs = require('./chunk-22ETJBBT.js');
8
8
 
9
9
  // src/bundlers/webpack/shared/css-imports.ts
10
10
  var CSS_EXT_RE = /\.(?:css|scss|sass|less|styl|pcss)$/i;
@@ -34,7 +34,7 @@ function rewriteTailwindcssRequestForCss(data, pkgDir, appType) {
34
34
  if (!CSS_EXT_RE.test(normalizedIssuer)) {
35
35
  return;
36
36
  }
37
- const resolved = _chunkJ25ZFRYMjs.resolveTailwindcssImport.call(void 0, request, pkgDir, { appType });
37
+ const resolved = _chunkYXT3T3LHjs.resolveTailwindcssImport.call(void 0, request, pkgDir, { appType });
38
38
  if (!resolved) {
39
39
  return;
40
40
  }
@@ -44,8 +44,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
44
44
  if (!options.enabled) {
45
45
  return;
46
46
  }
47
- compiler.hooks.normalModuleFactory.tap(_chunkZTGB2D5Wjs.pluginName, (factory) => {
48
- factory.hooks.beforeResolve.tap(_chunkZTGB2D5Wjs.pluginName, (data) => {
47
+ compiler.hooks.normalModuleFactory.tap(_chunk22ETJBBTjs.pluginName, (factory) => {
48
+ factory.hooks.beforeResolve.tap(_chunk22ETJBBTjs.pluginName, (data) => {
49
49
  rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
50
50
  });
51
51
  });
@@ -75,7 +75,7 @@ function createPrioritizedFinder(targets) {
75
75
  };
76
76
  }
77
77
  function createLoaderAnchorFinders(appType) {
78
- if (_chunkJ25ZFRYMjs.isMpx.call(void 0, appType)) {
78
+ if (_chunkYXT3T3LHjs.isMpx.call(void 0, appType)) {
79
79
  return {
80
80
  findRewriteAnchor: createPrioritizedFinder(MPX_REWRITE_PRECEDENCE_LOADERS),
81
81
  findClassSetAnchor: createFinder([MPX_STYLE_COMPILER_LOADER])
@@ -4,7 +4,7 @@ import {
4
4
  getCacheKey,
5
5
  hasLoaderEntry,
6
6
  isCssLikeModuleResource
7
- } from "./chunk-AGWNHP3C.mjs";
7
+ } from "./chunk-W6ASDRWZ.mjs";
8
8
  import {
9
9
  ensureMpxTailwindcssAliases,
10
10
  injectMpxCssRewritePreRules,
@@ -21,20 +21,20 @@ import {
21
21
  } from "./chunk-RRHPTTCP.mjs";
22
22
  import {
23
23
  setupPatchRecorder
24
- } from "./chunk-3BMQ6ZWL.mjs";
24
+ } from "./chunk-3NLDVPXD.mjs";
25
25
  import {
26
26
  collectRuntimeClassSet,
27
27
  createDebug,
28
28
  getCompilerContext,
29
29
  pluginName,
30
30
  refreshTailwindRuntimeState
31
- } from "./chunk-FYYIFZ36.mjs";
31
+ } from "./chunk-BSGZZCLH.mjs";
32
32
  import {
33
33
  getGroupedEntries
34
34
  } from "./chunk-ZNKIYZRQ.mjs";
35
35
  import {
36
36
  __dirname
37
- } from "./chunk-3IP5JCFZ.mjs";
37
+ } from "./chunk-SXBK4NF4.mjs";
38
38
 
39
39
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
40
40
  import fs from "fs";
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkZTGB2D5Wjs = require('./chunk-ZTGB2D5W.js');
4
+ var _chunk22ETJBBTjs = require('./chunk-22ETJBBT.js');
5
5
 
6
6
 
7
- var _chunkS2YGU6BUjs = require('./chunk-S2YGU6BU.js');
7
+ var _chunk45BMEACSjs = require('./chunk-45BMEACS.js');
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
11
- const recorder = _chunkZTGB2D5Wjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunk22ETJBBTjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
12
12
  if (_optionalChain([recorder, 'optionalAccess', _ => _.message]) && _optionalChain([options, 'optionalAccess', _2 => _2.logMessage]) !== false) {
13
13
  const prefix = _optionalChain([options, 'optionalAccess', _3 => _3.messagePrefix]) ? `${options.messagePrefix} ` : "";
14
- _chunkS2YGU6BUjs.logger.info("%s%s", prefix, recorder.message);
14
+ _chunk45BMEACSjs.logger.info("%s%s", prefix, recorder.message);
15
15
  }
16
16
  const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _4 => _4.onPatched]) ? async () => {
17
17
  await recorder.onPatched();
18
18
  } : void 0;
19
- const patchPromise = patcher ? _chunkZTGB2D5Wjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunk22ETJBBTjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
@@ -445,7 +445,7 @@ function createTailwindcssPatcher(options) {
445
445
  }
446
446
  const resolvePaths = createDefaultResolvePaths(cache.cwd ?? normalizedBasedir ?? process.cwd());
447
447
  const normalizedUserOptions = normalizeTailwindcssPatcherOptions(tailwindcssPatcherOptions);
448
- const extendLengthUnits = normalizeExtendLengthUnits(supportCustomLengthUnitsPatch);
448
+ const extendLengthUnits = normalizeExtendLengthUnits(supportCustomLengthUnitsPatch ?? true);
449
449
  const baseTailwindOptions = defuOverrideArray2(
450
450
  tailwindcss ?? {},
451
451
  {
@@ -730,12 +730,34 @@ function createPatcherForBase(baseDir, cssEntries, options) {
730
730
  baseDir,
731
731
  cssEntries ?? []
732
732
  );
733
- return createTailwindcssPatcher({
734
- basedir: baseDir,
735
- supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
736
- tailwindcss: mergedTailwindOptions,
737
- tailwindcssPatcherOptions: patchedOptions
733
+ const configuredPackageName = tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwind?.packageName || tailwindcssPatcherOptions?.patch?.tailwindcss?.packageName;
734
+ const configuredVersion = tailwindcss?.version || tailwindcssPatcherOptions?.tailwind?.version || tailwindcssPatcherOptions?.patch?.tailwindcss?.version || mergedTailwindOptions.version;
735
+ const isTailwindcss4Package = (packageName) => Boolean(
736
+ packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4"))
737
+ );
738
+ const isV4 = configuredVersion === 4 || mergedTailwindOptions.version === 4 || isTailwindcss4Package(configuredPackageName ?? mergedTailwindOptions.packageName);
739
+ const tailwindPackageConfigured = Boolean(configuredPackageName);
740
+ const shouldPatchV4PostcssPackage = isV4 && !tailwindPackageConfigured;
741
+ const packageCandidates = /* @__PURE__ */ new Set();
742
+ if (shouldPatchV4PostcssPackage) {
743
+ packageCandidates.add("@tailwindcss/postcss");
744
+ }
745
+ packageCandidates.add(
746
+ mergedTailwindOptions.packageName ?? configuredPackageName ?? "tailwindcss"
747
+ );
748
+ const patchers = Array.from(packageCandidates).map((packageName) => {
749
+ const tailwindOptionsForPackage = {
750
+ ...mergedTailwindOptions,
751
+ packageName
752
+ };
753
+ return createTailwindcssPatcher({
754
+ basedir: baseDir,
755
+ supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
756
+ tailwindcss: tailwindOptionsForPackage,
757
+ tailwindcssPatcherOptions: patchedOptions
758
+ });
738
759
  });
760
+ return patchers.length === 1 ? patchers[0] : createMultiTailwindcssPatcher(patchers);
739
761
  }
740
762
  function createMultiTailwindcssPatcher(patchers) {
741
763
  if (patchers.length <= 1) {
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-RRHPTTCP.mjs";
12
12
  import {
13
13
  setupPatchRecorder
14
- } from "./chunk-3BMQ6ZWL.mjs";
14
+ } from "./chunk-3NLDVPXD.mjs";
15
15
  import {
16
16
  collectRuntimeClassSet,
17
17
  createAttributeMatcher,
@@ -22,7 +22,7 @@ import {
22
22
  replaceWxml,
23
23
  toCustomAttributesEntities,
24
24
  vitePluginName
25
- } from "./chunk-FYYIFZ36.mjs";
25
+ } from "./chunk-BSGZZCLH.mjs";
26
26
  import {
27
27
  getGroupedEntries
28
28
  } from "./chunk-ZNKIYZRQ.mjs";
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.53.1_@types+node@24.10.1__@swc+core@1.15.3_@swc+h_608bab04d60812eb190cd7b30c36eaf7/node_modules/tsup/assets/esm_shims.js
1
+ // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.53.1_@types+node@24.10.2__@swc+core@1.15.3_@swc+h_b5f09ec5c50315727a8dc02bf80354c5/node_modules/tsup/assets/esm_shims.js
2
2
  import path from "path";
3
3
  import { fileURLToPath } from "url";
4
4
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RRHPTTCP.mjs";
4
4
  import {
5
5
  setupPatchRecorder
6
- } from "./chunk-3BMQ6ZWL.mjs";
6
+ } from "./chunk-3NLDVPXD.mjs";
7
7
  import {
8
8
  collectRuntimeClassSet,
9
9
  createDebug,
10
10
  getCompilerContext,
11
11
  refreshTailwindRuntimeState
12
- } from "./chunk-FYYIFZ36.mjs";
12
+ } from "./chunk-BSGZZCLH.mjs";
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  import { Buffer } from "buffer";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-HXYNNE6Q.mjs";
5
5
  import {
6
6
  pluginName
7
- } from "./chunk-FYYIFZ36.mjs";
7
+ } from "./chunk-BSGZZCLH.mjs";
8
8
 
9
9
  // src/bundlers/webpack/shared/css-imports.ts
10
10
  var CSS_EXT_RE = /\.(?:css|scss|sass|less|styl|pcss)$/i;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkM4NERJO7js = require('./chunk-M4NERJO7.js');
3
+ var _chunkCFFV3OIPjs = require('./chunk-CFFV3OIP.js');
4
4
 
5
5
  // src/bundlers/shared/module-graph.ts
6
6
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -60,7 +60,7 @@ function resolveOutputSpecifier(specifier, importer, outDir, hasOutput) {
60
60
  // src/utils/resolve-package.ts
61
61
  var _module = require('module'); var _module2 = _interopRequireDefault(_module);
62
62
 
63
- var require2 = _module.createRequire.call(void 0, _chunkM4NERJO7js.importMetaUrl);
63
+ var require2 = _module.createRequire.call(void 0, _chunkCFFV3OIPjs.importMetaUrl);
64
64
  function resolvePackageDir(name) {
65
65
  const pkgPath = require2.resolve(`${name}/package.json`);
66
66
  return _path2.default.dirname(pkgPath);