weapp-tailwindcss 4.11.1 → 4.12.0-alpha.1

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 (67) hide show
  1. package/README.md +38 -0
  2. package/dist/{chunk-VOCOKTZW.js → chunk-4LBAL3RE.js} +117 -119
  3. package/dist/{chunk-ZUV5AZRB.mjs → chunk-5CF3HTTN.mjs} +1 -1
  4. package/dist/{chunk-OMARW5NC.mjs → chunk-AYJ4HLWZ.mjs} +4 -2
  5. package/dist/{chunk-SV55AOBL.mjs → chunk-C2E5ZLNI.mjs} +12 -7
  6. package/dist/{chunk-6YV5WADN.js → chunk-CAZQZPMY.js} +45 -40
  7. package/dist/{chunk-Q2HTQFI4.js → chunk-CTGWJGKJ.js} +5 -5
  8. package/dist/{chunk-7LKMJZD2.js → chunk-GMKSBLNY.js} +2 -2
  9. package/dist/{chunk-EFBQ4SQR.mjs → chunk-HL3US2OT.mjs} +1 -1
  10. package/dist/{chunk-Y6JUVWRU.js → chunk-IUYO6NQO.js} +10 -6
  11. package/dist/{chunk-WSMWD4MC.mjs → chunk-JRLWGMVZ.mjs} +6 -2
  12. package/dist/{chunk-QK6VNNNL.js → chunk-NIS74SI6.js} +8 -6
  13. package/dist/{chunk-CRDOWYG4.js → chunk-ONLKZIRQ.js} +1 -1
  14. package/dist/{chunk-SSASUP5F.js → chunk-RQWWSU4U.js} +187 -82
  15. package/dist/{chunk-KX2JVTVM.mjs → chunk-V34LWQTS.mjs} +49 -51
  16. package/dist/{chunk-4O2J5ZM6.mjs → chunk-ZABCOAAS.mjs} +195 -90
  17. package/dist/cli.js +121 -81
  18. package/dist/cli.mjs +121 -81
  19. package/dist/core.d.mts +1 -1
  20. package/dist/core.d.ts +1 -1
  21. package/dist/core.js +14 -9
  22. package/dist/core.mjs +10 -5
  23. package/dist/css-macro/postcss.js +1 -1
  24. package/dist/css-macro/postcss.mjs +1 -1
  25. package/dist/css-macro.js +1 -1
  26. package/dist/css-macro.mjs +1 -1
  27. package/dist/defaults.d.mts +1 -1
  28. package/dist/defaults.d.ts +1 -1
  29. package/dist/defaults.js +1 -1
  30. package/dist/defaults.mjs +1 -1
  31. package/dist/gulp.d.mts +1 -1
  32. package/dist/gulp.d.ts +1 -1
  33. package/dist/gulp.js +5 -5
  34. package/dist/gulp.mjs +4 -4
  35. package/dist/{index-CoXntW_P.d.mts → index-BXrmQelt.d.mts} +29 -1
  36. package/dist/{index-CoXntW_P.d.ts → index-BXrmQelt.d.ts} +29 -1
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +9 -9
  40. package/dist/index.mjs +7 -7
  41. package/dist/postcss-html-transform.js +1 -1
  42. package/dist/postcss-html-transform.mjs +1 -1
  43. package/dist/presets.d.mts +8 -1
  44. package/dist/presets.d.ts +8 -1
  45. package/dist/presets.js +7 -6
  46. package/dist/presets.mjs +3 -2
  47. package/dist/reset.d.mts +1 -31
  48. package/dist/reset.d.ts +3 -32
  49. package/dist/reset.js +3 -160
  50. package/dist/reset.mjs +3 -160
  51. package/dist/types.d.mts +2 -2
  52. package/dist/types.d.ts +2 -2
  53. package/dist/types.js +1 -1
  54. package/dist/types.mjs +1 -1
  55. package/dist/vite.d.mts +1 -1
  56. package/dist/vite.d.ts +1 -1
  57. package/dist/vite.js +6 -6
  58. package/dist/vite.mjs +4 -4
  59. package/dist/webpack.d.mts +1 -1
  60. package/dist/webpack.d.ts +1 -1
  61. package/dist/webpack.js +7 -7
  62. package/dist/webpack.mjs +5 -5
  63. package/dist/webpack4.d.mts +1 -1
  64. package/dist/webpack4.d.ts +1 -1
  65. package/dist/webpack4.js +41 -36
  66. package/dist/webpack4.mjs +12 -7
  67. package/package.json +8 -4
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunk7LKMJZD2js = require('./chunk-7LKMJZD2.js');
9
+ var _chunkGMKSBLNYjs = require('./chunk-GMKSBLNY.js');
10
10
 
11
11
 
12
12
  var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
@@ -26,21 +26,23 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
26
26
 
27
27
 
28
28
 
29
- var _chunkSSASUP5Fjs = require('./chunk-SSASUP5F.js');
30
29
 
30
+ var _chunkRQWWSU4Ujs = require('./chunk-RQWWSU4U.js');
31
31
 
32
32
 
33
33
 
34
34
 
35
35
 
36
36
 
37
- var _chunkQK6VNNNLjs = require('./chunk-QK6VNNNL.js');
37
+
38
+
39
+ var _chunkNIS74SI6js = require('./chunk-NIS74SI6.js');
38
40
 
39
41
 
40
42
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
41
43
 
42
44
 
43
- var _chunkCRDOWYG4js = require('./chunk-CRDOWYG4.js');
45
+ var _chunkONLKZIRQjs = require('./chunk-ONLKZIRQ.js');
44
46
 
45
47
  // src/bundlers/vite/index.ts
46
48
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
@@ -90,7 +92,7 @@ function isRuntimeCandidate(candidate, runtimeSet) {
90
92
  if (!runtimeSet || runtimeSet.size === 0) {
91
93
  return false;
92
94
  }
93
- return runtimeSet.has(candidate) || runtimeSet.has(_chunkSSASUP5Fjs.replaceWxml.call(void 0, candidate));
95
+ return runtimeSet.has(candidate) || runtimeSet.has(_chunkRQWWSU4Ujs.replaceWxml.call(void 0, candidate));
94
96
  }
95
97
  function shouldEnableComponentLocalStyle(id) {
96
98
  return COMPONENT_RE.test(id);
@@ -110,7 +112,7 @@ var UniAppXComponentLocalStyleCollector = class {
110
112
  const alias = createAlias(this.fileId, utility, this.aliasByUtility.size);
111
113
  this.aliasByUtility.set(utility, alias);
112
114
  this.aliasByLookup.set(utility, alias);
113
- this.aliasByLookup.set(_chunkSSASUP5Fjs.replaceWxml.call(void 0, utility), alias);
115
+ this.aliasByLookup.set(_chunkRQWWSU4Ujs.replaceWxml.call(void 0, utility), alias);
114
116
  return alias;
115
117
  }
116
118
  rewriteLiteral(literal, shouldInclude) {
@@ -133,15 +135,15 @@ var UniAppXComponentLocalStyleCollector = class {
133
135
  collectRuntimeClasses(rawSource, options = {}) {
134
136
  const wrapped = options.wrapExpression ? `${EXPRESSION_WRAPPER_PREFIX}${rawSource}${EXPRESSION_WRAPPER_SUFFIX}` : rawSource;
135
137
  try {
136
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, wrapped, {
138
+ const ast = _chunkRQWWSU4Ujs.babelParse.call(void 0, wrapped, {
137
139
  plugins: ["typescript"],
138
140
  sourceType: options.wrapExpression ? "module" : "unambiguous"
139
141
  });
140
- const analysis = _chunkSSASUP5Fjs.analyzeSource.call(void 0, ast, {}, void 0, false);
142
+ const analysis = _chunkRQWWSU4Ujs.analyzeSource.call(void 0, ast, {}, void 0, false);
141
143
  for (const path7 of analysis.targetPaths) {
142
144
  const { literal, allowDoubleQuotes } = extractLiteralValue(path7);
143
145
  const candidates = _extractors.splitCode.call(void 0, literal, allowDoubleQuotes);
144
- const classContext = options.wrapExpression || _chunkSSASUP5Fjs.isClassContextLiteralPath.call(void 0, path7);
146
+ const classContext = options.wrapExpression || _chunkRQWWSU4Ujs.isClassContextLiteralPath.call(void 0, path7);
145
147
  for (const candidate of candidates) {
146
148
  if (!candidate || !classContext && !isRuntimeCandidate(candidate, this.runtimeSet)) {
147
149
  continue;
@@ -160,15 +162,15 @@ var UniAppXComponentLocalStyleCollector = class {
160
162
  }
161
163
  const wrapped = options.wrapExpression ? `${EXPRESSION_WRAPPER_PREFIX}${rawSource}${EXPRESSION_WRAPPER_SUFFIX}` : rawSource;
162
164
  try {
163
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, wrapped, {
165
+ const ast = _chunkRQWWSU4Ujs.babelParse.call(void 0, wrapped, {
164
166
  plugins: ["typescript"],
165
167
  sourceType: options.wrapExpression ? "module" : "unambiguous"
166
168
  });
167
- const analysis = _chunkSSASUP5Fjs.analyzeSource.call(void 0, ast, {}, void 0, false);
169
+ const analysis = _chunkRQWWSU4Ujs.analyzeSource.call(void 0, ast, {}, void 0, false);
168
170
  if (analysis.targetPaths.length === 0) {
169
171
  return rawSource;
170
172
  }
171
- const updater = new (0, _chunkSSASUP5Fjs.JsTokenUpdater)();
173
+ const updater = new (0, _chunkRQWWSU4Ujs.JsTokenUpdater)();
172
174
  for (const path7 of analysis.targetPaths) {
173
175
  const { literal, allowDoubleQuotes, offset } = extractLiteralValue(path7);
174
176
  const candidates = _extractors.splitCode.call(void 0, literal, allowDoubleQuotes);
@@ -242,28 +244,28 @@ function traverse2(node, visitor) {
242
244
  }
243
245
  }
244
246
  }
245
- function updateStaticAttribute(ms, prop) {
247
+ function updateStaticAttribute(ms, prop, content = _optionalChain([prop, 'access', _ => _.value, 'optionalAccess', _2 => _2.content])) {
246
248
  if (!prop.value) {
247
249
  return;
248
250
  }
249
251
  const start = prop.value.loc.start.offset + 1;
250
252
  const end = prop.value.loc.end.offset - 1;
251
253
  if (start < end) {
252
- ms.update(start, end, _chunkSSASUP5Fjs.replaceWxml.call(void 0, prop.value.content));
254
+ ms.update(start, end, _chunkRQWWSU4Ujs.replaceWxml.call(void 0, _nullishCoalesce(content, () => ( ""))));
253
255
  }
254
256
  }
255
- function updateStaticAttributeWithLocalStyle(ms, prop, collector) {
257
+ function updateStaticAttributeWithLocalStyle(ms, prop, collector, content = _optionalChain([prop, 'access', _3 => _3.value, 'optionalAccess', _4 => _4.content])) {
256
258
  if (!prop.value) {
257
259
  return;
258
260
  }
259
261
  const start = prop.value.loc.start.offset + 1;
260
262
  const end = prop.value.loc.end.offset - 1;
261
263
  if (start < end) {
262
- ms.update(start, end, collector.collectAndRewriteStaticClass(prop.value.content));
264
+ ms.update(start, end, collector.collectAndRewriteStaticClass(_nullishCoalesce(content, () => ( ""))));
263
265
  }
264
266
  }
265
- function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
266
- if (_optionalChain([prop, 'access', _ => _.exp, 'optionalAccess', _2 => _2.type]) !== _compilerdom.NodeTypes.SIMPLE_EXPRESSION) {
267
+ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet, expression = _optionalChain([prop, 'access', _5 => _5.exp, 'optionalAccess', _6 => _6.content])) {
268
+ if (_optionalChain([prop, 'access', _7 => _7.exp, 'optionalAccess', _8 => _8.type]) !== _compilerdom.NodeTypes.SIMPLE_EXPRESSION || expression === void 0) {
267
269
  return;
268
270
  }
269
271
  const start = prop.exp.loc.start.offset;
@@ -271,15 +273,15 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
271
273
  if (start >= end) {
272
274
  return;
273
275
  }
274
- const generated = _chunkSSASUP5Fjs.generateCode.call(void 0, prop.exp.content, {
276
+ const generated = _chunkRQWWSU4Ujs.generateCode.call(void 0, expression, {
275
277
  jsHandler,
276
278
  runtimeSet,
277
279
  wrapExpression: true
278
280
  });
279
281
  ms.update(start, end, generated);
280
282
  }
281
- function updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, collector, runtimeSet) {
282
- if (_optionalChain([prop, 'access', _3 => _3.exp, 'optionalAccess', _4 => _4.type]) !== _compilerdom.NodeTypes.SIMPLE_EXPRESSION) {
283
+ function updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, collector, runtimeSet, expression = _optionalChain([prop, 'access', _9 => _9.exp, 'optionalAccess', _10 => _10.content])) {
284
+ if (_optionalChain([prop, 'access', _11 => _11.exp, 'optionalAccess', _12 => _12.type]) !== _compilerdom.NodeTypes.SIMPLE_EXPRESSION || expression === void 0) {
283
285
  return;
284
286
  }
285
287
  const start = prop.exp.loc.start.offset;
@@ -287,10 +289,10 @@ function updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, collector,
287
289
  if (start >= end) {
288
290
  return;
289
291
  }
290
- collector.collectRuntimeClasses(prop.exp.content, {
292
+ collector.collectRuntimeClasses(expression, {
291
293
  wrapExpression: true
292
294
  });
293
- const generated = _chunkSSASUP5Fjs.generateCode.call(void 0, prop.exp.content, {
295
+ const generated = _chunkRQWWSU4Ujs.generateCode.call(void 0, expression, {
294
296
  jsHandler,
295
297
  runtimeSet,
296
298
  wrapExpression: true
@@ -300,7 +302,7 @@ function updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, collector,
300
302
  function shouldHandleAttribute(tag, attrName, disabledDefaultTemplateHandler, matchCustomAttribute) {
301
303
  const lowerName = attrName.toLowerCase();
302
304
  const shouldHandleDefault = !disabledDefaultTemplateHandler && lowerName === "class";
303
- const shouldHandleCustom = _nullishCoalesce(_optionalChain([matchCustomAttribute, 'optionalCall', _5 => _5(tag, attrName)]), () => ( false));
305
+ const shouldHandleCustom = _nullishCoalesce(_optionalChain([matchCustomAttribute, 'optionalCall', _13 => _13(tag, attrName)]), () => ( false));
304
306
  return {
305
307
  shouldHandleDefault,
306
308
  shouldHandleCustom,
@@ -320,12 +322,12 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
320
322
  return;
321
323
  }
322
324
  const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
323
- const matchCustomAttribute = _chunkSSASUP5Fjs.createAttributeMatcher.call(void 0, customAttributesEntities);
325
+ const matchCustomAttribute = _chunkRQWWSU4Ujs.createAttributeMatcher.call(void 0, customAttributesEntities);
324
326
  const ms = new (0, _magicstring2.default)(code);
325
327
  const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
326
328
  const localStyleCollector = options.enableComponentLocalStyle && shouldEnableComponentLocalStyle(id) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet) : void 0;
327
329
  if (errors.length === 0) {
328
- if (_optionalChain([descriptor, 'access', _6 => _6.template, 'optionalAccess', _7 => _7.ast])) {
330
+ if (_optionalChain([descriptor, 'access', _14 => _14.template, 'optionalAccess', _15 => _15.ast])) {
329
331
  traverse2(descriptor.template.ast, (node) => {
330
332
  if (node.type !== _compilerdom.NodeTypes.ELEMENT) {
331
333
  return;
@@ -350,7 +352,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
350
352
  if (shouldHandleDefault) {
351
353
  continue;
352
354
  }
353
- } else if (prop.type === _compilerdom.NodeTypes.DIRECTIVE && prop.name === "bind" && _optionalChain([prop, 'access', _8 => _8.arg, 'optionalAccess', _9 => _9.type]) === _compilerdom.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic) {
355
+ } else if (prop.type === _compilerdom.NodeTypes.DIRECTIVE && prop.name === "bind" && _optionalChain([prop, 'access', _16 => _16.arg, 'optionalAccess', _17 => _17.type]) === _compilerdom.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic) {
354
356
  const attrName = prop.arg.content;
355
357
  const { shouldHandle } = shouldHandleAttribute(
356
358
  tag,
@@ -362,7 +364,13 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
362
364
  continue;
363
365
  }
364
366
  if (attrName.toLowerCase() === "class" && localStyleCollector) {
365
- updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, localStyleCollector, runtimeSet);
367
+ updateDirectiveExpressionWithLocalStyle(
368
+ ms,
369
+ prop,
370
+ jsHandler,
371
+ localStyleCollector,
372
+ runtimeSet
373
+ );
366
374
  } else {
367
375
  updateDirectiveExpression(ms, prop, jsHandler, runtimeSet);
368
376
  }
@@ -371,7 +379,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
371
379
  });
372
380
  }
373
381
  if (descriptor.script) {
374
- _optionalChain([localStyleCollector, 'optionalAccess', _10 => _10.collectRuntimeClasses, 'call', _11 => _11(descriptor.script.content)]);
382
+ _optionalChain([localStyleCollector, 'optionalAccess', _18 => _18.collectRuntimeClasses, 'call', _19 => _19(descriptor.script.content)]);
375
383
  const { code: code2 } = jsHandler(descriptor.script.content, _nullishCoalesce(runtimeSet, () => ( /* @__PURE__ */ new Set())), defaultCreateJsHandlerOptions);
376
384
  ms.update(
377
385
  descriptor.script.loc.start.offset,
@@ -380,7 +388,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
380
388
  );
381
389
  }
382
390
  if (descriptor.scriptSetup) {
383
- _optionalChain([localStyleCollector, 'optionalAccess', _12 => _12.collectRuntimeClasses, 'call', _13 => _13(descriptor.scriptSetup.content)]);
391
+ _optionalChain([localStyleCollector, 'optionalAccess', _20 => _20.collectRuntimeClasses, 'call', _21 => _21(descriptor.scriptSetup.content)]);
384
392
  const { code: code2 } = jsHandler(descriptor.scriptSetup.content, _nullishCoalesce(runtimeSet, () => ( /* @__PURE__ */ new Set())), defaultCreateJsHandlerOptions);
385
393
  ms.update(
386
394
  descriptor.scriptSetup.loc.start.offset,
@@ -388,7 +396,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
388
396
  localStyleCollector ? localStyleCollector.rewriteTransformedCode(code2) : code2
389
397
  );
390
398
  }
391
- if (_optionalChain([localStyleCollector, 'optionalAccess', _14 => _14.hasStyles, 'call', _15 => _15()])) {
399
+ if (_optionalChain([localStyleCollector, 'optionalAccess', _22 => _22.hasStyles, 'call', _23 => _23()])) {
392
400
  ms.append(`
393
401
  ${localStyleCollector.toStyleBlock()}`);
394
402
  }
@@ -487,7 +495,7 @@ function resolveUniAppXStyleIsolationEnabled(root) {
487
495
  try {
488
496
  const raw = _fs2.default.readFileSync(manifestPath, "utf8");
489
497
  const manifest = _commentjson.parse.call(void 0, raw);
490
- enabled = `${_nullishCoalesce(_optionalChain([manifest, 'access', _16 => _16["uni-app-x"], 'optionalAccess', _17 => _17.styleIsolationVersion]), () => ( ""))}` === "2";
498
+ enabled = `${_nullishCoalesce(_optionalChain([manifest, 'access', _24 => _24["uni-app-x"], 'optionalAccess', _25 => _25.styleIsolationVersion]), () => ( ""))}` === "2";
491
499
  } catch (e3) {
492
500
  enabled = false;
493
501
  }
@@ -502,7 +510,7 @@ var PREPROCESSOR_EXT_RE = /\.(?:scss|sass|less|styl|stylus)(?:\?|$)/i;
502
510
  var UVUE_NVUE_QUERY_RE = /\.(?:uvue|nvue)(?:\?.*)?$/;
503
511
  var UVUE_NVUE_RE2 = /\.(?:uvue|nvue)$/;
504
512
  function isPreprocessorRequest(id, lang) {
505
- const normalizedLang = _optionalChain([lang, 'optionalAccess', _18 => _18.toLowerCase, 'call', _19 => _19()]);
513
+ const normalizedLang = _optionalChain([lang, 'optionalAccess', _26 => _26.toLowerCase, 'call', _27 => _27()]);
506
514
  if (normalizedLang && preprocessorLangs.has(normalizedLang)) {
507
515
  return true;
508
516
  }
@@ -512,6 +520,9 @@ function isPreprocessorRequest(id, lang) {
512
520
  }
513
521
  return PREPROCESSOR_EXT_RE.test(id);
514
522
  }
523
+ function resolveUniAppXCssTarget(id) {
524
+ return UVUE_NVUE_RE2.test(_shared.cleanUrl.call(void 0, id)) ? "uvue" : void 0;
525
+ }
515
526
  function createUniAppXPlugins(options) {
516
527
  const {
517
528
  appType,
@@ -526,7 +537,7 @@ function createUniAppXPlugins(options) {
526
537
  getResolvedConfig,
527
538
  uniAppX
528
539
  } = options;
529
- const resolvedUniAppXOptions = _chunkQK6VNNNLjs.resolveUniAppXOptions.call(void 0, uniAppX);
540
+ const resolvedUniAppXOptions = _chunkNIS74SI6js.resolveUniAppXOptions.call(void 0, uniAppX);
530
541
  const isIosPlatform = _nullishCoalesce(providedIosPlatform, () => ( _chunkDYLQ6UOIjs.resolveUniUtsPlatform.call(void 0, ).isAppIos));
531
542
  const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
532
543
  let componentLocalStyleEnabled;
@@ -542,7 +553,7 @@ function createUniAppXPlugins(options) {
542
553
  if (componentLocalStyleEnabled !== void 0) {
543
554
  return componentLocalStyleEnabled;
544
555
  }
545
- const root = _optionalChain([getResolvedConfig, 'call', _20 => _20(), 'optionalAccess', _21 => _21.root]);
556
+ const root = _optionalChain([getResolvedConfig, 'call', _28 => _28(), 'optionalAccess', _29 => _29.root]);
546
557
  componentLocalStyleEnabled = resolveUniAppXStyleIsolationEnabled(root);
547
558
  return componentLocalStyleEnabled;
548
559
  }
@@ -554,6 +565,8 @@ function createUniAppXPlugins(options) {
554
565
  if (!styleHandlerOptions) {
555
566
  styleHandlerOptions = {
556
567
  isMainChunk: mainCssChunkMatcher(id, appType),
568
+ uniAppXCssTarget: resolveUniAppXCssTarget(id),
569
+ uniAppXUnsupported: resolvedUniAppXOptions.uvueUnsupported,
557
570
  postcssOptions: {
558
571
  options: {
559
572
  from: id,
@@ -570,6 +583,10 @@ function createUniAppXPlugins(options) {
570
583
  cssHandlerOptionsCache.set(cacheKey, styleHandlerOptions);
571
584
  }
572
585
  const postcssResult = await styleHandler(code, styleHandlerOptions);
586
+ const warnings = typeof postcssResult.warnings === "function" ? postcssResult.warnings() : [];
587
+ for (const warning of warnings) {
588
+ _chunkNIS74SI6js.logger.warn(warning.toString());
589
+ }
573
590
  const rawPostcssMap = postcssResult.map.toJSON();
574
591
  const postcssMap = await formatPostcssSourceMap(
575
592
  rawPostcssMap,
@@ -613,9 +630,9 @@ function createUniAppXPlugins(options) {
613
630
  return;
614
631
  }
615
632
  const resolvedConfig = getResolvedConfig();
616
- const isServeCommand = _optionalChain([resolvedConfig, 'optionalAccess', _22 => _22.command]) === "serve";
617
- const isWatchBuild = _optionalChain([resolvedConfig, 'optionalAccess', _23 => _23.command]) === "build" && !!_optionalChain([resolvedConfig, 'access', _24 => _24.build, 'optionalAccess', _25 => _25.watch]);
618
- const isNonWatchBuild = _optionalChain([resolvedConfig, 'optionalAccess', _26 => _26.command]) === "build" && !_optionalChain([resolvedConfig, 'access', _27 => _27.build, 'optionalAccess', _28 => _28.watch]);
633
+ const isServeCommand = _optionalChain([resolvedConfig, 'optionalAccess', _30 => _30.command]) === "serve";
634
+ const isWatchBuild = _optionalChain([resolvedConfig, 'optionalAccess', _31 => _31.command]) === "build" && !!_optionalChain([resolvedConfig, 'access', _32 => _32.build, 'optionalAccess', _33 => _33.watch]);
635
+ const isNonWatchBuild = _optionalChain([resolvedConfig, 'optionalAccess', _34 => _34.command]) === "build" && !_optionalChain([resolvedConfig, 'access', _35 => _35.build, 'optionalAccess', _36 => _36.watch]);
619
636
  const shouldForceRefresh = isServeCommand || isWatchBuild || isNonWatchBuild;
620
637
  const currentRuntimeSet = shouldForceRefresh ? await ensureRuntimeClassSet(true) : await ensureRuntimeClassSet();
621
638
  const extraOptions = customAttributesEntities.length > 0 || disabledDefaultTemplateHandler ? {
@@ -635,7 +652,7 @@ function createUniAppXPlugins(options) {
635
652
  },
636
653
  async handleHotUpdate(ctx) {
637
654
  const resolvedConfig = getResolvedConfig();
638
- if (_optionalChain([resolvedConfig, 'optionalAccess', _29 => _29.command]) !== "serve") {
655
+ if (_optionalChain([resolvedConfig, 'optionalAccess', _37 => _37.command]) !== "serve") {
639
656
  return;
640
657
  }
641
658
  if (!UVUE_NVUE_RE2.test(ctx.file)) {
@@ -645,7 +662,7 @@ function createUniAppXPlugins(options) {
645
662
  },
646
663
  async watchChange(id) {
647
664
  const resolvedConfig = getResolvedConfig();
648
- if (_optionalChain([resolvedConfig, 'optionalAccess', _30 => _30.command]) !== "build" || !_optionalChain([resolvedConfig, 'access', _31 => _31.build, 'optionalAccess', _32 => _32.watch])) {
665
+ if (_optionalChain([resolvedConfig, 'optionalAccess', _38 => _38.command]) !== "build" || !_optionalChain([resolvedConfig, 'access', _39 => _39.build, 'optionalAccess', _40 => _40.watch])) {
649
666
  return;
650
667
  }
651
668
  if (!UVUE_NVUE_QUERY_RE.test(id)) {
@@ -671,7 +688,7 @@ function createUniAppXAssetTask(file, originalSource, outDir, options) {
671
688
  runtimeSet,
672
689
  applyLinkedResults: applyLinkedResults2
673
690
  } = options;
674
- const absoluteFile = _chunk7LKMJZD2js.toAbsoluteOutputPath.call(void 0, file, outDir);
691
+ const absoluteFile = _chunkGMKSBLNYjs.toAbsoluteOutputPath.call(void 0, file, outDir);
675
692
  const rawSource = originalSource.source.toString();
676
693
  const rawHashSource = options.hashSalt ? `${rawSource}
677
694
  /*${options.hashSalt}*/` : rawSource;
@@ -745,7 +762,7 @@ function isJavaScriptEntry(entry) {
745
762
  function createBundleModuleGraphOptions(outputDir, entries) {
746
763
  return {
747
764
  resolve(specifier, importer) {
748
- return _chunk7LKMJZD2js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
765
+ return _chunkGMKSBLNYjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
749
766
  },
750
767
  load(id) {
751
768
  const entry = entries.get(id);
@@ -777,7 +794,7 @@ function applyLinkedResults(linked, entries, onLinkedUpdate, onApplied) {
777
794
  } else {
778
795
  entry.output.source = code;
779
796
  }
780
- _optionalChain([onApplied, 'optionalCall', _33 => _33(entry, code)]);
797
+ _optionalChain([onApplied, 'optionalCall', _41 => _41(entry, code)]);
781
798
  onLinkedUpdate(entry.fileName, previous, code);
782
799
  }
783
800
  }
@@ -819,14 +836,14 @@ function createHtmlRuntimeAffectingSignature(source) {
819
836
  }
820
837
  function createJsRuntimeAffectingSignature(source) {
821
838
  try {
822
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, source, {
839
+ const ast = _chunkRQWWSU4Ujs.babelParse.call(void 0, source, {
823
840
  cache: true,
824
841
  cacheKey: "vite-runtime-affecting:unambiguous",
825
842
  plugins: ["jsx", "typescript"],
826
843
  sourceType: "unambiguous"
827
844
  });
828
845
  const parts = [];
829
- _chunkSSASUP5Fjs.traverse.call(void 0, ast, {
846
+ _chunkRQWWSU4Ujs.traverse.call(void 0, ast, {
830
847
  noScope: true,
831
848
  StringLiteral(path7) {
832
849
  parts.push(`s:${path7.node.value}`);
@@ -844,7 +861,7 @@ function createJsRuntimeAffectingSignature(source) {
844
861
  const comments = ast.comments;
845
862
  if (Array.isArray(comments)) {
846
863
  for (const comment of comments) {
847
- if (typeof _optionalChain([comment, 'optionalAccess', _34 => _34.value]) === "string" && comment.value.length > 0) {
864
+ if (typeof _optionalChain([comment, 'optionalAccess', _42 => _42.value]) === "string" && comment.value.length > 0) {
848
865
  parts.push(`c:${comment.value}`);
849
866
  }
850
867
  }
@@ -918,7 +935,7 @@ function collectJsEntries(fileName, output, outDir, store) {
918
935
  if (!isJavaScriptEntry(entry)) {
919
936
  return;
920
937
  }
921
- const absolute = _chunk7LKMJZD2js.toAbsoluteOutputPath.call(void 0, fileName, outDir);
938
+ const absolute = _chunkGMKSBLNYjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
922
939
  store.set(absolute, entry);
923
940
  }
924
941
  function markProcessFile(type, file, processFiles) {
@@ -1032,28 +1049,6 @@ function updateBundleBuildState(state, snapshot, linkedByEntry, options = {}) {
1032
1049
  state.dependentsByLinkedFile = invertLinkedByEntry(state.linkedByEntry);
1033
1050
  }
1034
1051
 
1035
- // src/bundlers/vite/js-precheck.ts
1036
- var FAST_JS_TRANSFORM_HINT_RE = /className\b|class\s*=|classList\.|\b(?:twMerge|clsx|classnames|cn|cva)\b|\[["'`]class["'`]\]|text-\[|bg-\[|\b(?:[whpm]|px|py|mx|my|rounded|flex|grid|gap)-/;
1037
- var DEPENDENCY_HINT_RE = /\bimport\s*[("'`{*]|\brequire\s*\(|\bexport\s+\*\s+from\s+["'`]|\bexport\s*\{[^}]*\}\s*from\s+["'`]/;
1038
- function shouldSkipViteJsTransform(rawSource, options) {
1039
- if (!rawSource) {
1040
- return true;
1041
- }
1042
- if (_optionalChain([options, 'optionalAccess', _35 => _35.alwaysEscape])) {
1043
- return false;
1044
- }
1045
- if (_optionalChain([options, 'optionalAccess', _36 => _36.moduleSpecifierReplacements]) && Object.keys(options.moduleSpecifierReplacements).length > 0) {
1046
- return false;
1047
- }
1048
- if (_optionalChain([options, 'optionalAccess', _37 => _37.wrapExpression])) {
1049
- return false;
1050
- }
1051
- if (DEPENDENCY_HINT_RE.test(rawSource)) {
1052
- return false;
1053
- }
1054
- return !FAST_JS_TRANSFORM_HINT_RE.test(rawSource);
1055
- }
1056
-
1057
1052
  // src/bundlers/vite/generate-bundle.ts
1058
1053
  function formatDebugFileList(files, limit = 8) {
1059
1054
  if (files.size === 0) {
@@ -1223,10 +1218,10 @@ function createGenerateBundleHook(context) {
1223
1218
  const debugCssDiff = _process2.default.env.WEAPP_TW_VITE_DEBUG_CSS_DIFF === "1";
1224
1219
  const resolvedConfig = getResolvedConfig();
1225
1220
  const bundleFiles = Object.keys(bundle);
1226
- const buildCommand = _optionalChain([resolvedConfig, 'optionalAccess', _38 => _38.command]) === "build";
1221
+ const buildCommand = _optionalChain([resolvedConfig, 'optionalAccess', _43 => _43.command]) === "build";
1227
1222
  const useIncrementalMode = !buildCommand || hasOmittedKnownBundleFiles(bundleFiles, state.sourceHashByFile.keys());
1228
- const rootDir = _optionalChain([resolvedConfig, 'optionalAccess', _39 => _39.root]) ? _path2.default.resolve(resolvedConfig.root) : _process2.default.cwd();
1229
- const outDir = _optionalChain([resolvedConfig, 'optionalAccess', _40 => _40.build, 'optionalAccess', _41 => _41.outDir]) ? _path2.default.resolve(rootDir, resolvedConfig.build.outDir) : rootDir;
1223
+ const rootDir = _optionalChain([resolvedConfig, 'optionalAccess', _44 => _44.root]) ? _path2.default.resolve(resolvedConfig.root) : _process2.default.cwd();
1224
+ const outDir = _optionalChain([resolvedConfig, 'optionalAccess', _45 => _45.build, 'optionalAccess', _46 => _46.outDir]) ? _path2.default.resolve(rootDir, resolvedConfig.build.outDir) : rootDir;
1230
1225
  const snapshot = buildBundleSnapshot(bundle, opts, outDir, state, disableDirtyOptimization || !useIncrementalMode);
1231
1226
  const useBundleRuntimeClassSet = useIncrementalMode || runtimeState.twPatcher.majorVersion === 4;
1232
1227
  const forceRuntimeRefreshBySource = useIncrementalMode && hasRuntimeAffectingSourceChanges(snapshot.runtimeAffectingChangedByType);
@@ -1281,7 +1276,7 @@ function createGenerateBundleHook(context) {
1281
1276
  );
1282
1277
  }
1283
1278
  debug3("get runtimeSet, class count: %d", runtime.size);
1284
- const runtimeSignature = _nullishCoalesce(_chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher), () => ( "runtime:missing"));
1279
+ const runtimeSignature = _nullishCoalesce(_chunkNIS74SI6js.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher), () => ( "runtime:missing"));
1285
1280
  const handleLinkedUpdate = (fileName, previous, next) => {
1286
1281
  onUpdate(fileName, previous, next);
1287
1282
  debug3("js linked handle: %s", fileName);
@@ -1305,7 +1300,7 @@ function createGenerateBundleHook(context) {
1305
1300
  tailwindcssMajorVersion: runtimeState.twPatcher.majorVersion,
1306
1301
  moduleGraph: moduleGraphOptions,
1307
1302
  babelParserOptions: {
1308
- ..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _42 => _42.babelParserOptions]), () => ( {})),
1303
+ ..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _47 => _47.babelParserOptions]), () => ( {})),
1309
1304
  sourceFilename: absoluteFilename
1310
1305
  }
1311
1306
  });
@@ -1469,7 +1464,7 @@ function createGenerateBundleHook(context) {
1469
1464
  debug3("js cache replay miss, fallback transform: %s", file);
1470
1465
  }
1471
1466
  const handlerOptions = createHandlerOptions(absoluteFile);
1472
- if (!disableJsPrecheck && shouldSkipViteJsTransform(rawSource, handlerOptions)) {
1467
+ if (!disableJsPrecheck && _chunkRQWWSU4Ujs.shouldSkipJsTransform.call(void 0, rawSource, handlerOptions)) {
1473
1468
  metrics.js.elapsed += measureElapsed(start);
1474
1469
  metrics.js.transformed++;
1475
1470
  return {
@@ -1555,7 +1550,7 @@ function createGenerateBundleHook(context) {
1555
1550
  sourceType: "unambiguous"
1556
1551
  }
1557
1552
  });
1558
- if (!disableJsPrecheck && shouldSkipViteJsTransform(currentSource, precheckOptions)) {
1553
+ if (!disableJsPrecheck && _chunkRQWWSU4Ujs.shouldSkipJsTransform.call(void 0, currentSource, precheckOptions)) {
1559
1554
  metrics.js.elapsed += measureElapsed(start);
1560
1555
  metrics.js.transformed++;
1561
1556
  return;
@@ -1566,7 +1561,7 @@ function createGenerateBundleHook(context) {
1566
1561
  });
1567
1562
  }
1568
1563
  }
1569
- _chunk7LKMJZD2js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
1564
+ _chunkGMKSBLNYjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
1570
1565
  await Promise.all(tasks);
1571
1566
  for (const apply of pendingLinkedUpdates) {
1572
1567
  apply();
@@ -1608,8 +1603,8 @@ var _module = require('module');
1608
1603
 
1609
1604
 
1610
1605
  var _tailwindcsspatch = require('tailwindcss-patch');
1611
- var debug = _chunkSSASUP5Fjs.createDebug.call(void 0, "[vite:runtime-set] ");
1612
- var require2 = _module.createRequire.call(void 0, _chunkCRDOWYG4js.importMetaUrl);
1606
+ var debug = _chunkRQWWSU4Ujs.createDebug.call(void 0, "[vite:runtime-set] ");
1607
+ var require2 = _module.createRequire.call(void 0, _chunkONLKZIRQjs.importMetaUrl);
1613
1608
  var EXTENSION_DOT_PREFIX_RE = /^\./;
1614
1609
  var VALIDATION_FILE_NAME = "runtime-candidates.html";
1615
1610
  var tailwindNodeModulePromise;
@@ -1626,23 +1621,23 @@ function isPostcssPluginImportTarget(value) {
1626
1621
  return value === "@tailwindcss/postcss" || value === "@tailwindcss/postcss7-compat" || value.includes("/postcss");
1627
1622
  }
1628
1623
  function resolveTailwindCssImportTarget(patcher) {
1629
- const tailwindOptions = _chunkQK6VNNNLjs.resolveTailwindcssOptions.call(void 0, patcher.options);
1630
- const cssEntries = _optionalChain([tailwindOptions, 'optionalAccess', _43 => _43.v4, 'optionalAccess', _44 => _44.cssEntries, 'optionalAccess', _45 => _45.filter, 'call', _46 => _46((item) => typeof item === "string" && item.length > 0)]);
1624
+ const tailwindOptions = _chunkNIS74SI6js.resolveTailwindcssOptions.call(void 0, patcher.options);
1625
+ const cssEntries = _optionalChain([tailwindOptions, 'optionalAccess', _48 => _48.v4, 'optionalAccess', _49 => _49.cssEntries, 'optionalAccess', _50 => _50.filter, 'call', _51 => _51((item) => typeof item === "string" && item.length > 0)]);
1631
1626
  if (cssEntries && cssEntries.length > 0) {
1632
1627
  return createCssImportSource(cssEntries);
1633
1628
  }
1634
- const configuredPackageName = _optionalChain([tailwindOptions, 'optionalAccess', _47 => _47.packageName]);
1629
+ const configuredPackageName = _optionalChain([tailwindOptions, 'optionalAccess', _52 => _52.packageName]);
1635
1630
  if (typeof configuredPackageName === "string" && configuredPackageName.length > 0 && !isPostcssPluginImportTarget(configuredPackageName)) {
1636
1631
  return createCssImportSource([configuredPackageName]);
1637
1632
  }
1638
- const packageName = _optionalChain([patcher, 'access', _48 => _48.packageInfo, 'optionalAccess', _49 => _49.name]);
1633
+ const packageName = _optionalChain([patcher, 'access', _53 => _53.packageInfo, 'optionalAccess', _54 => _54.name]);
1639
1634
  if (typeof packageName === "string" && packageName.length > 0 && !isPostcssPluginImportTarget(packageName)) {
1640
1635
  return createCssImportSource([packageName]);
1641
1636
  }
1642
1637
  return createCssImportSource(["tailwindcss"]);
1643
1638
  }
1644
1639
  function getProjectRoot(patcher) {
1645
- return _nullishCoalesce(_optionalChain([patcher, 'access', _50 => _50.options, 'optionalAccess', _51 => _51.projectRoot]), () => ( _process2.default.cwd()));
1640
+ return _nullishCoalesce(_optionalChain([patcher, 'access', _55 => _55.options, 'optionalAccess', _56 => _56.projectRoot]), () => ( _process2.default.cwd()));
1646
1641
  }
1647
1642
  async function importTailwindNodeModule() {
1648
1643
  if (!tailwindNodeModulePromise) {
@@ -1669,16 +1664,16 @@ function resolveMaybeAbsolute(base, value) {
1669
1664
  }
1670
1665
  async function resolveTailwindCssSource(patcher) {
1671
1666
  const projectRoot = getProjectRoot(patcher);
1672
- const tailwindOptions = _chunkQK6VNNNLjs.resolveTailwindcssOptions.call(void 0, patcher.options);
1673
- const configuredBase = resolveMaybeAbsolute(projectRoot, _optionalChain([tailwindOptions, 'optionalAccess', _52 => _52.v4, 'optionalAccess', _53 => _53.base]));
1674
- const configDir = _optionalChain([tailwindOptions, 'optionalAccess', _54 => _54.config]) ? _path2.default.dirname(tailwindOptions.config) : void 0;
1667
+ const tailwindOptions = _chunkNIS74SI6js.resolveTailwindcssOptions.call(void 0, patcher.options);
1668
+ const configuredBase = resolveMaybeAbsolute(projectRoot, _optionalChain([tailwindOptions, 'optionalAccess', _57 => _57.v4, 'optionalAccess', _58 => _58.base]));
1669
+ const configDir = _optionalChain([tailwindOptions, 'optionalAccess', _59 => _59.config]) ? _path2.default.dirname(tailwindOptions.config) : void 0;
1675
1670
  const sharedFallbacks = [
1676
1671
  configuredBase,
1677
1672
  projectRoot,
1678
- _optionalChain([tailwindOptions, 'optionalAccess', _55 => _55.cwd]),
1673
+ _optionalChain([tailwindOptions, 'optionalAccess', _60 => _60.cwd]),
1679
1674
  configDir
1680
1675
  ].filter((item) => typeof item === "string" && item.length > 0);
1681
- if (_optionalChain([tailwindOptions, 'optionalAccess', _56 => _56.v4, 'optionalAccess', _57 => _57.css])) {
1676
+ if (_optionalChain([tailwindOptions, 'optionalAccess', _61 => _61.v4, 'optionalAccess', _62 => _62.css])) {
1682
1677
  return {
1683
1678
  projectRoot,
1684
1679
  base: _nullishCoalesce(configuredBase, () => ( projectRoot)),
@@ -1686,7 +1681,7 @@ async function resolveTailwindCssSource(patcher) {
1686
1681
  css: tailwindOptions.v4.css
1687
1682
  };
1688
1683
  }
1689
- const cssEntries = _nullishCoalesce(_optionalChain([tailwindOptions, 'optionalAccess', _58 => _58.v4, 'optionalAccess', _59 => _59.cssEntries, 'optionalAccess', _60 => _60.filter, 'call', _61 => _61((item) => typeof item === "string" && item.length > 0)]), () => ( []));
1684
+ const cssEntries = _nullishCoalesce(_optionalChain([tailwindOptions, 'optionalAccess', _63 => _63.v4, 'optionalAccess', _64 => _64.cssEntries, 'optionalAccess', _65 => _65.filter, 'call', _66 => _66((item) => typeof item === "string" && item.length > 0)]), () => ( []));
1690
1685
  if (cssEntries.length > 0) {
1691
1686
  const resolvedEntries = cssEntries.map((entry) => _nullishCoalesce(resolveMaybeAbsolute(projectRoot, entry), () => ( entry)));
1692
1687
  const cssChunks = [];
@@ -1867,7 +1862,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
1867
1862
  const matches = await extractRawCandidates(entry.source, resolveEntryExtension(entry));
1868
1863
  const candidates = /* @__PURE__ */ new Set();
1869
1864
  for (const match of matches) {
1870
- const candidate = _optionalChain([match, 'optionalAccess', _62 => _62.rawCandidate]);
1865
+ const candidate = _optionalChain([match, 'optionalAccess', _67 => _67.rawCandidate]);
1871
1866
  if (typeof candidate === "string" && candidate.length > 0) {
1872
1867
  candidates.add(candidate);
1873
1868
  }
@@ -1875,7 +1870,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
1875
1870
  return candidates;
1876
1871
  }
1877
1872
  async function sync(patcher, snapshot) {
1878
- const nextSignature = _nullishCoalesce(_chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, patcher), () => ( "runtime:missing"));
1873
+ const nextSignature = _nullishCoalesce(_chunkNIS74SI6js.getRuntimeClassSetSignature.call(void 0, patcher), () => ( "runtime:missing"));
1879
1874
  const runtimeEntries = createRuntimeEntries(snapshot);
1880
1875
  const runtimeEntriesByFile = new Map(runtimeEntries.map((entry) => [entry.file, entry]));
1881
1876
  const currentRuntimeFiles = new Set(runtimeEntriesByFile.keys());
@@ -2073,15 +2068,15 @@ function createRewriteCssImportsPlugins(options) {
2073
2068
  return [];
2074
2069
  }
2075
2070
  const { appType, getAppType, weappTailwindcssDirPosix: weappTailwindcssDirPosix2 } = options;
2076
- const resolveAppType = () => _nullishCoalesce(_optionalChain([getAppType, 'optionalCall', _63 => _63()]), () => ( appType));
2071
+ const resolveAppType = () => _nullishCoalesce(_optionalChain([getAppType, 'optionalCall', _68 => _68()]), () => ( appType));
2077
2072
  return [
2078
2073
  {
2079
- name: `${_chunkSSASUP5Fjs.vitePluginName}:rewrite-css-imports`,
2074
+ name: `${_chunkRQWWSU4Ujs.vitePluginName}:rewrite-css-imports`,
2080
2075
  enforce: "pre",
2081
2076
  resolveId: {
2082
2077
  order: "pre",
2083
2078
  handler(id, importer) {
2084
- const replacement = _chunk7LKMJZD2js.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix2, {
2079
+ const replacement = _chunkGMKSBLNYjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix2, {
2085
2080
  join: joinPosixPath,
2086
2081
  appType: resolveAppType()
2087
2082
  });
@@ -2100,7 +2095,7 @@ function createRewriteCssImportsPlugins(options) {
2100
2095
  if (!isCSSRequest(id)) {
2101
2096
  return null;
2102
2097
  }
2103
- const rewritten = _chunk7LKMJZD2js.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix2, {
2098
+ const rewritten = _chunkGMKSBLNYjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix2, {
2104
2099
  join: joinPosixPath,
2105
2100
  appType: resolveAppType()
2106
2101
  });
@@ -2118,8 +2113,8 @@ function createRewriteCssImportsPlugins(options) {
2118
2113
  }
2119
2114
 
2120
2115
  // src/bundlers/vite/index.ts
2121
- var debug2 = _chunkSSASUP5Fjs.createDebug.call(void 0, );
2122
- var weappTailwindcssPackageDir = _chunk7LKMJZD2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
2116
+ var debug2 = _chunkRQWWSU4Ujs.createDebug.call(void 0, );
2117
+ var weappTailwindcssPackageDir = _chunkGMKSBLNYjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
2123
2118
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
2124
2119
  var PACKAGE_JSON_FILE2 = "package.json";
2125
2120
  function resolveImplicitTailwindcssBasedirFromViteRoot(root) {
@@ -2137,11 +2132,11 @@ function resolveImplicitTailwindcssBasedirFromViteRoot(root) {
2137
2132
  }
2138
2133
  current = parent;
2139
2134
  }
2140
- const tailwindConfigPath = _chunkQK6VNNNLjs.findTailwindConfig.call(void 0, searchRoots);
2135
+ const tailwindConfigPath = _chunkNIS74SI6js.findTailwindConfig.call(void 0, searchRoots);
2141
2136
  if (tailwindConfigPath) {
2142
2137
  return _path2.default.dirname(tailwindConfigPath);
2143
2138
  }
2144
- const packageRoot = _chunkQK6VNNNLjs.findNearestPackageRoot.call(void 0, resolvedRoot);
2139
+ const packageRoot = _chunkNIS74SI6js.findNearestPackageRoot.call(void 0, resolvedRoot);
2145
2140
  if (packageRoot && _fs.existsSync.call(void 0, _path2.default.join(packageRoot, PACKAGE_JSON_FILE2))) {
2146
2141
  return packageRoot;
2147
2142
  }
@@ -2151,7 +2146,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2151
2146
  const hasExplicitAppType = typeof options.appType === "string" && options.appType.trim().length > 0;
2152
2147
  const rewriteCssImportsSpecified = Object.hasOwn(options, "rewriteCssImports");
2153
2148
  const hasExplicitTailwindcssBasedir = typeof options.tailwindcssBasedir === "string" && options.tailwindcssBasedir.trim().length > 0;
2154
- const opts = _chunkSSASUP5Fjs.getCompilerContext.call(void 0, options);
2149
+ const opts = _chunkRQWWSU4Ujs.getCompilerContext.call(void 0, options);
2155
2150
  const {
2156
2151
  disabled,
2157
2152
  customAttributes,
@@ -2164,8 +2159,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2164
2159
  uniAppX,
2165
2160
  disabledDefaultTemplateHandler
2166
2161
  } = opts;
2167
- const uniAppXEnabled = _chunkQK6VNNNLjs.isUniAppXEnabled.call(void 0, uniAppX);
2168
- const disabledOptions = _chunk7LKMJZD2js.resolveDisabledOptions.call(void 0, disabled);
2162
+ const uniAppXEnabled = _chunkNIS74SI6js.isUniAppXEnabled.call(void 0, uniAppX);
2163
+ const disabledOptions = _chunkGMKSBLNYjs.resolveDisabledOptions.call(void 0, disabled);
2169
2164
  const tailwindcssMajorVersion = _nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0));
2170
2165
  const shouldRewriteCssImports = opts.rewriteCssImports !== false && !disabledOptions.rewriteCssImports && (rewriteCssImportsSpecified || tailwindcssMajorVersion >= 4);
2171
2166
  const rewritePlugins = createRewriteCssImportsPlugins({
@@ -2176,8 +2171,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2176
2171
  if (disabledOptions.plugin) {
2177
2172
  return rewritePlugins.length ? rewritePlugins : void 0;
2178
2173
  }
2179
- const customAttributesEntities = _chunkSSASUP5Fjs.toCustomAttributesEntities.call(void 0, customAttributes);
2180
- const patchRecorderState = _chunkSSASUP5Fjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
2174
+ const customAttributesEntities = _chunkRQWWSU4Ujs.toCustomAttributesEntities.call(void 0, customAttributes);
2175
+ const patchRecorderState = _chunkRQWWSU4Ujs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
2181
2176
  source: "runtime",
2182
2177
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
2183
2178
  });
@@ -2194,8 +2189,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2194
2189
  let runtimeRefreshOptionsKey;
2195
2190
  const bundleRuntimeClassSetManager = createBundleRuntimeClassSetManager();
2196
2191
  function resolveRuntimeRefreshOptions() {
2197
- const configPath = _optionalChain([_chunkQK6VNNNLjs.resolveTailwindcssOptions.call(void 0, runtimeState.twPatcher.options), 'optionalAccess', _64 => _64.config]);
2198
- const signature = _chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
2192
+ const configPath = _optionalChain([_chunkNIS74SI6js.resolveTailwindcssOptions.call(void 0, runtimeState.twPatcher.options), 'optionalAccess', _69 => _69.config]);
2193
+ const signature = _chunkNIS74SI6js.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
2199
2194
  const optionsKey = JSON.stringify({
2200
2195
  appType: opts.appType,
2201
2196
  uniAppX: uniAppXEnabled,
@@ -2216,7 +2211,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2216
2211
  async function refreshRuntimeState(force) {
2217
2212
  const invalidation = resolveRuntimeRefreshOptions();
2218
2213
  const shouldRefresh = force || invalidation.changed;
2219
- const refreshed = await _chunkSSASUP5Fjs.refreshTailwindRuntimeState.call(void 0, runtimeState, {
2214
+ const refreshed = await _chunkRQWWSU4Ujs.refreshTailwindRuntimeState.call(void 0, runtimeState, {
2220
2215
  force: shouldRefresh,
2221
2216
  clearCache: force || invalidation.changed
2222
2217
  });
@@ -2237,7 +2232,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2237
2232
  }
2238
2233
  if (forceRuntimeRefresh || !runtimeSetPromise) {
2239
2234
  const invalidation = resolveRuntimeRefreshOptions();
2240
- const task2 = _chunkSSASUP5Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2235
+ const task2 = _chunkRQWWSU4Ujs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2241
2236
  force: forceRuntimeRefresh || invalidation.changed,
2242
2237
  skipRefresh: forceRuntimeRefresh,
2243
2238
  clearCache: forceRuntimeRefresh || invalidation.changed
@@ -2279,7 +2274,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2279
2274
  if (!forceRuntimeRefresh && !invalidation.changed && !forceCollectBySource && runtimeSet) {
2280
2275
  return runtimeSet;
2281
2276
  }
2282
- const task = _chunkSSASUP5Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2277
+ const task = _chunkRQWWSU4Ujs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2283
2278
  force: forceRuntimeRefresh || invalidation.changed || forceCollectBySource,
2284
2279
  skipRefresh: forceRuntimeRefresh,
2285
2280
  clearCache: forceRuntimeRefresh || invalidation.changed
@@ -2314,7 +2309,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2314
2309
  const plugins = [
2315
2310
  ...rewritePlugins,
2316
2311
  {
2317
- name: `${_chunkSSASUP5Fjs.vitePluginName}:post`,
2312
+ name: `${_chunkRQWWSU4Ujs.vitePluginName}:post`,
2318
2313
  enforce: "post",
2319
2314
  async configResolved(config) {
2320
2315
  resolvedConfig = config;
@@ -2362,14 +2357,17 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2362
2357
  }
2363
2358
  }
2364
2359
  },
2365
- generateBundle: createGenerateBundleHook({
2366
- opts,
2367
- runtimeState,
2368
- ensureRuntimeClassSet,
2369
- ensureBundleRuntimeClassSet,
2370
- debug: debug2,
2371
- getResolvedConfig
2372
- })
2360
+ generateBundle: {
2361
+ order: "post",
2362
+ handler: createGenerateBundleHook({
2363
+ opts,
2364
+ runtimeState,
2365
+ ensureRuntimeClassSet,
2366
+ ensureBundleRuntimeClassSet,
2367
+ debug: debug2,
2368
+ getResolvedConfig
2369
+ })
2370
+ }
2373
2371
  }
2374
2372
  ];
2375
2373
  if (uniAppXPlugins) {