weapp-tailwindcss 4.8.5 → 4.8.7

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-AB45L5FP.js → chunk-322IEI2K.js} +2 -2
  2. package/dist/{chunk-FVSKLXO5.js → chunk-5F64FE7K.js} +5 -5
  3. package/dist/{chunk-P6ACVBPQ.js → chunk-7BASRP3P.js} +8 -8
  4. package/dist/{chunk-K62QTSOE.mjs → chunk-BMUQ4OAB.mjs} +4 -4
  5. package/dist/{chunk-RJRLVYVJ.js → chunk-ESYZLHZI.js} +4 -4
  6. package/dist/{chunk-UTZLVU3M.js → chunk-GORSBZA2.js} +1 -1
  7. package/dist/{chunk-SFQCTDJA.mjs → chunk-JYHBNTYH.mjs} +1 -1
  8. package/dist/{chunk-WSMJXGQQ.mjs → chunk-KRRIFURM.mjs} +2 -2
  9. package/dist/{chunk-FE63QKGM.mjs → chunk-MIC6E7DV.mjs} +17 -11
  10. package/dist/{chunk-PSYJXCQJ.mjs → chunk-PFUB74BL.mjs} +1 -1
  11. package/dist/{chunk-RA4QKEFU.js → chunk-U4WEDSBF.js} +7 -7
  12. package/dist/{chunk-RXCVTHDO.js → chunk-VONLQCG7.js} +22 -22
  13. package/dist/{chunk-6CS6EPEP.js → chunk-WUJAJ42W.js} +37 -31
  14. package/dist/{chunk-TWBCI2I3.js → chunk-WYXD5IW7.js} +5 -5
  15. package/dist/{chunk-OKBZMEXY.mjs → chunk-YQQ3HDQD.mjs} +2 -2
  16. package/dist/{chunk-67CD2S5L.mjs → chunk-ZB6MFKXJ.mjs} +1 -1
  17. package/dist/cli.js +30 -30
  18. package/dist/cli.mjs +2 -2
  19. package/dist/core.js +10 -10
  20. package/dist/core.mjs +3 -3
  21. package/dist/css-macro/postcss.js +1 -1
  22. package/dist/css-macro/postcss.mjs +1 -1
  23. package/dist/css-macro.js +1 -1
  24. package/dist/css-macro.mjs +1 -1
  25. package/dist/defaults.js +1 -1
  26. package/dist/defaults.mjs +1 -1
  27. package/dist/gulp.js +6 -6
  28. package/dist/gulp.mjs +4 -4
  29. package/dist/index.js +10 -10
  30. package/dist/index.mjs +7 -7
  31. package/dist/postcss-html-transform.js +1 -1
  32. package/dist/postcss-html-transform.mjs +1 -1
  33. package/dist/presets.js +4 -4
  34. package/dist/presets.mjs +1 -1
  35. package/dist/reset.js +1 -1
  36. package/dist/reset.mjs +1 -1
  37. package/dist/types.js +1 -1
  38. package/dist/types.mjs +1 -1
  39. package/dist/vite.js +7 -7
  40. package/dist/vite.mjs +4 -4
  41. package/dist/weapp-tw-runtime-loader.js +8 -2
  42. package/dist/webpack.js +8 -8
  43. package/dist/webpack.mjs +5 -5
  44. package/dist/webpack4.js +37 -31
  45. package/dist/webpack4.mjs +16 -10
  46. package/package.json +7 -7
@@ -1,11 +1,11 @@
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 _chunkUTZLVU3Mjs = require('./chunk-UTZLVU3M.js');
3
+ var _chunkGORSBZA2js = require('./chunk-GORSBZA2.js');
4
4
 
5
5
  // src/utils/resolve-package.ts
6
6
  var _module = require('module');
7
7
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
8
- var require2 = _module.createRequire.call(void 0, _chunkUTZLVU3Mjs.importMetaUrl);
8
+ var require2 = _module.createRequire.call(void 0, _chunkGORSBZA2js.importMetaUrl);
9
9
  function resolvePackageDir(name) {
10
10
  const pkgPath = require2.resolve(`${name}/package.json`);
11
11
  return _path2.default.dirname(pkgPath);
@@ -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 _chunkP6ACVBPQjs = require('./chunk-P6ACVBPQ.js');
4
+ var _chunk7BASRP3Pjs = require('./chunk-7BASRP3P.js');
5
5
 
6
6
 
7
- var _chunkRJRLVYVJjs = require('./chunk-RJRLVYVJ.js');
7
+ var _chunkESYZLHZIjs = require('./chunk-ESYZLHZI.js');
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
11
- const recorder = _chunkP6ACVBPQjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunk7BASRP3Pjs.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
- _chunkRJRLVYVJjs.logger.info("%s%s", prefix, recorder.message);
14
+ _chunkESYZLHZIjs.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 ? _chunkP6ACVBPQjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunk7BASRP3Pjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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
3
 
4
- var _chunkRJRLVYVJjs = require('./chunk-RJRLVYVJ.js');
4
+ var _chunkESYZLHZIjs = require('./chunk-ESYZLHZI.js');
5
5
 
6
6
 
7
7
  var _chunkZSTF2AENjs = require('./chunk-ZSTF2AEN.js');
@@ -181,7 +181,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
181
181
  // package.json
182
182
  var package_default = {
183
183
  name: "weapp-tailwindcss",
184
- version: "4.8.5",
184
+ version: "4.8.7",
185
185
  description: "\u628A tailwindcss \u539F\u5B50\u5316\u6837\u5F0F\u601D\u60F3\uFF0C\u5E26\u7ED9\u5C0F\u7A0B\u5E8F\u5F00\u53D1\u8005\u4EEC! bring tailwindcss to miniprogram developers!",
186
186
  author: "ice breaker <1324318532@qq.com>",
187
187
  license: "MIT",
@@ -371,8 +371,8 @@ var package_default = {
371
371
  "@babel/traverse": "~7.28.5",
372
372
  "@babel/types": "~7.28.5",
373
373
  "@tailwindcss-mangle/config": "^6.1.0",
374
- "@vue/compiler-dom": "^3.5.24",
375
- "@vue/compiler-sfc": "^3.5.24",
374
+ "@vue/compiler-dom": "catalog:vue3",
375
+ "@vue/compiler-sfc": "catalog:vue3",
376
376
  "@weapp-core/escape": "~5.0.1",
377
377
  "@weapp-core/regex": "~1.0.1",
378
378
  "@weapp-tailwindcss/logger": "workspace:*",
@@ -389,7 +389,7 @@ var package_default = {
389
389
  semver: "~7.7.3",
390
390
  "tailwindcss-patch": "catalog:tailwindcssPatch",
391
391
  "webpack-sources": "3.3.3",
392
- yaml: "^2.8.1"
392
+ yaml: "^2.8.2"
393
393
  }
394
394
  };
395
395
 
@@ -434,7 +434,7 @@ function formatRelativeToBase(targetPath, baseDir) {
434
434
  }
435
435
  function resolveRecordLocation(baseDir) {
436
436
  const normalizedBase = _path2.default.normalize(baseDir);
437
- const packageRoot = _nullishCoalesce(_chunkRJRLVYVJjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
437
+ const packageRoot = _nullishCoalesce(_chunkESYZLHZIjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
438
438
  const packageJsonPath = _path2.default.join(packageRoot, "package.json");
439
439
  const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
440
440
  const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
@@ -2861,7 +2861,7 @@ function createInternalCompilerContext(opts) {
2861
2861
  );
2862
2862
  ctx.escapeMap = ctx.customReplaceDictionary;
2863
2863
  applyLoggerLevel(ctx.logLevel);
2864
- const twPatcher = _chunkRJRLVYVJjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2864
+ const twPatcher = _chunkESYZLHZIjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2865
2865
  logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
2866
2866
  if (_optionalChain([twPatcher, 'access', _106 => _106.packageInfo, 'optionalAccess', _107 => _107.version])) {
2867
2867
  _logger.logger.success(`\u5F53\u524D\u4F7F\u7528 ${_logger.pc.cyanBright("Tailwind CSS")} \u7248\u672C\u4E3A: ${_logger.pc.underline(_logger.pc.bold(_logger.pc.green(twPatcher.packageInfo.version)))}`);
@@ -2891,7 +2891,7 @@ function createInternalCompilerContext(opts) {
2891
2891
  await clearTailwindcssPatcherCache(previousPatcher);
2892
2892
  }
2893
2893
  invalidateRuntimeClassSet(previousPatcher);
2894
- const nextPatcher = _chunkRJRLVYVJjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2894
+ const nextPatcher = _chunkESYZLHZIjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2895
2895
  Object.assign(previousPatcher, nextPatcher);
2896
2896
  ctx.twPatcher = previousPatcher;
2897
2897
  return previousPatcher;
@@ -181,7 +181,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
181
181
  // package.json
182
182
  var package_default = {
183
183
  name: "weapp-tailwindcss",
184
- version: "4.8.5",
184
+ version: "4.8.7",
185
185
  description: "\u628A tailwindcss \u539F\u5B50\u5316\u6837\u5F0F\u601D\u60F3\uFF0C\u5E26\u7ED9\u5C0F\u7A0B\u5E8F\u5F00\u53D1\u8005\u4EEC! bring tailwindcss to miniprogram developers!",
186
186
  author: "ice breaker <1324318532@qq.com>",
187
187
  license: "MIT",
@@ -371,8 +371,8 @@ var package_default = {
371
371
  "@babel/traverse": "~7.28.5",
372
372
  "@babel/types": "~7.28.5",
373
373
  "@tailwindcss-mangle/config": "^6.1.0",
374
- "@vue/compiler-dom": "^3.5.24",
375
- "@vue/compiler-sfc": "^3.5.24",
374
+ "@vue/compiler-dom": "catalog:vue3",
375
+ "@vue/compiler-sfc": "catalog:vue3",
376
376
  "@weapp-core/escape": "~5.0.1",
377
377
  "@weapp-core/regex": "~1.0.1",
378
378
  "@weapp-tailwindcss/logger": "workspace:*",
@@ -389,7 +389,7 @@ var package_default = {
389
389
  semver: "~7.7.3",
390
390
  "tailwindcss-patch": "catalog:tailwindcssPatch",
391
391
  "webpack-sources": "3.3.3",
392
- yaml: "^2.8.1"
392
+ yaml: "^2.8.2"
393
393
  }
394
394
  };
395
395
 
@@ -3,7 +3,7 @@
3
3
  var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
4
4
 
5
5
 
6
- var _chunkUTZLVU3Mjs = require('./chunk-UTZLVU3M.js');
6
+ var _chunkGORSBZA2js = require('./chunk-GORSBZA2.js');
7
7
 
8
8
  // src/context/tailwindcss.ts
9
9
  var _module = require('module');
@@ -130,7 +130,7 @@ function resolveModuleFromPaths(specifier, paths) {
130
130
  return void 0;
131
131
  }
132
132
  try {
133
- const req = _module.createRequire.call(void 0, _chunkUTZLVU3Mjs.importMetaUrl);
133
+ const req = _module.createRequire.call(void 0, _chunkGORSBZA2js.importMetaUrl);
134
134
  return req.resolve(specifier, { paths });
135
135
  } catch (e3) {
136
136
  return void 0;
@@ -230,11 +230,11 @@ function createDefaultResolvePaths(basedir) {
230
230
  const cwd = _process2.default.cwd();
231
231
  appendNodeModules(paths, cwd);
232
232
  try {
233
- const modulePath = _url.fileURLToPath.call(void 0, _chunkUTZLVU3Mjs.importMetaUrl);
233
+ const modulePath = _url.fileURLToPath.call(void 0, _chunkGORSBZA2js.importMetaUrl);
234
234
  const candidate = _fs.existsSync.call(void 0, modulePath) && !_path2.default.extname(modulePath) ? modulePath : _path2.default.dirname(modulePath);
235
235
  paths.add(candidate);
236
236
  } catch (e4) {
237
- paths.add(_chunkUTZLVU3Mjs.importMetaUrl);
237
+ paths.add(_chunkGORSBZA2js.importMetaUrl);
238
238
  }
239
239
  if (paths.size === 0) {
240
240
  fallbackCandidates = fallbackCandidates.filter(Boolean);
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../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_5a981c295142658a01fde01f36b7c0a8/node_modules/tsup/assets/cjs_shims.js
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../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_c0fd57d7feba03b3e4bcfd5e91aeb7d6/node_modules/tsup/assets/cjs_shims.js
2
2
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
3
3
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
4
4
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPatchTargetRecorder,
3
3
  createTailwindPatchPromise
4
- } from "./chunk-K62QTSOE.mjs";
4
+ } from "./chunk-BMUQ4OAB.mjs";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-3XGTIDA6.mjs";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-RRHPTTCP.mjs";
12
12
  import {
13
13
  setupPatchRecorder
14
- } from "./chunk-SFQCTDJA.mjs";
14
+ } from "./chunk-JYHBNTYH.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-K62QTSOE.mjs";
25
+ } from "./chunk-BMUQ4OAB.mjs";
26
26
  import {
27
27
  getGroupedEntries
28
28
  } from "./chunk-ZNKIYZRQ.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  applyTailwindcssCssImportRewrite,
3
3
  getCacheKey
4
- } from "./chunk-PSYJXCQJ.mjs";
4
+ } from "./chunk-PFUB74BL.mjs";
5
5
  import {
6
6
  pushConcurrentTaskFactories,
7
7
  resolveOutputSpecifier,
@@ -13,20 +13,20 @@ import {
13
13
  } from "./chunk-RRHPTTCP.mjs";
14
14
  import {
15
15
  setupPatchRecorder
16
- } from "./chunk-SFQCTDJA.mjs";
16
+ } from "./chunk-JYHBNTYH.mjs";
17
17
  import {
18
18
  collectRuntimeClassSet,
19
19
  createDebug,
20
20
  getCompilerContext,
21
21
  pluginName,
22
22
  refreshTailwindRuntimeState
23
- } from "./chunk-K62QTSOE.mjs";
23
+ } from "./chunk-BMUQ4OAB.mjs";
24
24
  import {
25
25
  getGroupedEntries
26
26
  } from "./chunk-ZNKIYZRQ.mjs";
27
27
  import {
28
28
  __dirname
29
- } from "./chunk-67CD2S5L.mjs";
29
+ } from "./chunk-ZB6MFKXJ.mjs";
30
30
 
31
31
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
32
32
  import fs from "fs";
@@ -104,15 +104,21 @@ var UnifiedWebpackPluginV5 = class {
104
104
  });
105
105
  compiler.hooks.compilation.tap(pluginName, (compilation) => {
106
106
  NormalModule.getCompilationHooks(compilation).loader.tap(pluginName, (_loaderContext, module) => {
107
- if (isExisted) {
108
- const idx = module.loaders.findIndex((x) => x.loader.includes("postcss-loader"));
109
- const runtimeLoaderEntry = createRuntimeLoaderEntry();
110
- if (idx > -1) {
111
- module.loaders.splice(idx + 1, 0, runtimeLoaderEntry);
112
- } else {
113
- module.loaders.push(runtimeLoaderEntry);
107
+ if (!isExisted) {
108
+ return;
109
+ }
110
+ const loaderEntries = module.loaders || [];
111
+ const idx = loaderEntries.findIndex((entry) => {
112
+ if (!entry?.loader) {
113
+ return false;
114
114
  }
115
+ return entry.loader.includes("postcss-loader");
116
+ });
117
+ if (idx === -1) {
118
+ return;
115
119
  }
120
+ const runtimeLoaderEntry = createRuntimeLoaderEntry();
121
+ loaderEntries.splice(idx + 1, 0, runtimeLoaderEntry);
116
122
  });
117
123
  compilation.hooks.processAssets.tapPromise(
118
124
  {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-JW7P34IH.mjs";
4
4
  import {
5
5
  pluginName
6
- } from "./chunk-K62QTSOE.mjs";
6
+ } from "./chunk-BMUQ4OAB.mjs";
7
7
 
8
8
  // src/bundlers/webpack/shared/css-imports.ts
9
9
  var CSS_EXT_RE = /\.(?:css|scss|sass|less|styl|pcss)$/i;
@@ -3,13 +3,13 @@
3
3
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
4
4
 
5
5
 
6
- var _chunkFVSKLXO5js = require('./chunk-FVSKLXO5.js');
6
+ var _chunk5F64FE7Kjs = require('./chunk-5F64FE7K.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkP6ACVBPQjs = require('./chunk-P6ACVBPQ.js');
12
+ var _chunk7BASRP3Pjs = require('./chunk-7BASRP3P.js');
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  var _buffer = require('buffer');
@@ -17,12 +17,12 @@ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
17
17
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
18
18
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
19
19
  var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
20
- var debug = _chunkP6ACVBPQjs.createDebug.call(void 0, );
20
+ var debug = _chunk7BASRP3Pjs.createDebug.call(void 0, );
21
21
  var Transform = _stream2.default.Transform;
22
22
  function createPlugins(options = {}) {
23
- const opts = _chunkP6ACVBPQjs.getCompilerContext.call(void 0, options);
23
+ const opts = _chunk7BASRP3Pjs.getCompilerContext.call(void 0, options);
24
24
  const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
25
- const patchRecorderState = _chunkFVSKLXO5js.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
25
+ const patchRecorderState = _chunk5F64FE7Kjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
26
26
  source: "runtime",
27
27
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
28
28
  });
@@ -36,7 +36,7 @@ function createPlugins(options = {}) {
36
36
  const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".tsx", ".jsx"];
37
37
  let runtimeSetInitialized = false;
38
38
  async function refreshRuntimeState(force) {
39
- await _chunkP6ACVBPQjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
39
+ await _chunk7BASRP3Pjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
40
40
  }
41
41
  async function refreshRuntimeSet(force = false) {
42
42
  await refreshRuntimeState(force);
@@ -44,7 +44,7 @@ function createPlugins(options = {}) {
44
44
  if (!force && runtimeSetInitialized && runtimeSet.size > 0) {
45
45
  return runtimeSet;
46
46
  }
47
- runtimeSet = await _chunkP6ACVBPQjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
47
+ runtimeSet = await _chunk7BASRP3Pjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
48
48
  runtimeSetInitialized = true;
49
49
  return runtimeSet;
50
50
  }
@@ -5,13 +5,13 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkAB45L5FPjs = require('./chunk-AB45L5FP.js');
8
+ var _chunk322IEI2Kjs = require('./chunk-322IEI2K.js');
9
9
 
10
10
 
11
11
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
12
12
 
13
13
 
14
- var _chunkFVSKLXO5js = require('./chunk-FVSKLXO5.js');
14
+ var _chunk5F64FE7Kjs = require('./chunk-5F64FE7K.js');
15
15
 
16
16
 
17
17
 
@@ -22,7 +22,7 @@ var _chunkFVSKLXO5js = require('./chunk-FVSKLXO5.js');
22
22
 
23
23
 
24
24
 
25
- var _chunkP6ACVBPQjs = require('./chunk-P6ACVBPQ.js');
25
+ var _chunk7BASRP3Pjs = require('./chunk-7BASRP3P.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, _chunkP6ACVBPQjs.replaceWxml.call(void 0, prop.value.content));
57
+ ms.update(start, end, _chunk7BASRP3Pjs.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 = _chunkP6ACVBPQjs.generateCode.call(void 0, prop.exp.content, {
69
+ const generated = _chunk7BASRP3Pjs.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 = _chunkP6ACVBPQjs.createAttributeMatcher.call(void 0, customAttributesEntities);
98
+ const matchCustomAttribute = _chunk7BASRP3Pjs.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) {
@@ -218,8 +218,8 @@ async function formatPostcssSourceMap(rawMap, file) {
218
218
  }
219
219
 
220
220
  // src/bundlers/vite/index.ts
221
- var debug = _chunkP6ACVBPQjs.createDebug.call(void 0, );
222
- var weappTailwindcssPackageDir = _chunkAB45L5FPjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
221
+ var debug = _chunk7BASRP3Pjs.createDebug.call(void 0, );
222
+ var weappTailwindcssPackageDir = _chunk322IEI2Kjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
223
223
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
224
224
  function joinPosixPath(base, subpath) {
225
225
  if (base.endsWith("/")) {
@@ -263,7 +263,7 @@ function isJavaScriptEntry(entry) {
263
263
  function createBundleModuleGraphOptions(outputDir, entries) {
264
264
  return {
265
265
  resolve(specifier, importer) {
266
- return _chunkAB45L5FPjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
266
+ return _chunk322IEI2Kjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
267
267
  },
268
268
  load(id) {
269
269
  const entry = entries.get(id);
@@ -301,7 +301,7 @@ function applyLinkedResults(linked, entries, onLinkedUpdate, onApplied) {
301
301
  }
302
302
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
303
303
  const rewriteCssImportsSpecified = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
304
- const opts = _chunkP6ACVBPQjs.getCompilerContext.call(void 0, options);
304
+ const opts = _chunk7BASRP3Pjs.getCompilerContext.call(void 0, options);
305
305
  const {
306
306
  disabled,
307
307
  customAttributes,
@@ -323,8 +323,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
323
323
  if (disabled) {
324
324
  return;
325
325
  }
326
- const customAttributesEntities = _chunkP6ACVBPQjs.toCustomAttributesEntities.call(void 0, customAttributes);
327
- const patchRecorderState = _chunkFVSKLXO5js.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
326
+ const customAttributesEntities = _chunk7BASRP3Pjs.toCustomAttributesEntities.call(void 0, customAttributes);
327
+ const patchRecorderState = _chunk5F64FE7Kjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
328
328
  source: "runtime",
329
329
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
330
330
  });
@@ -338,7 +338,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
338
338
  let runtimeSetPromise;
339
339
  let resolvedConfig;
340
340
  async function refreshRuntimeState(force) {
341
- const refreshed = await _chunkP6ACVBPQjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
341
+ const refreshed = await _chunk7BASRP3Pjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
342
342
  if (refreshed) {
343
343
  runtimeSet = void 0;
344
344
  runtimeSetPromise = void 0;
@@ -351,7 +351,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
351
351
  return runtimeSet;
352
352
  }
353
353
  if (force || !runtimeSetPromise) {
354
- const task2 = _chunkP6ACVBPQjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
354
+ const task2 = _chunk7BASRP3Pjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
355
355
  force: force || !runtimeSet,
356
356
  skipRefresh: force
357
357
  });
@@ -371,12 +371,12 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
371
371
  const shouldRewriteCssImports = opts.rewriteCssImports !== false && (rewriteCssImportsSpecified || (_nullishCoalesce(runtimeState.twPatcher.majorVersion, () => ( 0))) >= 4);
372
372
  const rewritePlugins = !shouldRewriteCssImports ? [] : [
373
373
  {
374
- name: `${_chunkP6ACVBPQjs.vitePluginName}:rewrite-css-imports`,
374
+ name: `${_chunk7BASRP3Pjs.vitePluginName}:rewrite-css-imports`,
375
375
  enforce: "pre",
376
376
  resolveId: {
377
377
  order: "pre",
378
378
  handler(id, importer) {
379
- const replacement = _chunkAB45L5FPjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix, { join: joinPosixPath });
379
+ const replacement = _chunk322IEI2Kjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix, { join: joinPosixPath });
380
380
  if (!replacement) {
381
381
  return null;
382
382
  }
@@ -392,7 +392,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
392
392
  if (!isCSSRequest(id)) {
393
393
  return null;
394
394
  }
395
- const rewritten = _chunkAB45L5FPjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix, { join: joinPosixPath });
395
+ const rewritten = _chunk322IEI2Kjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix, { join: joinPosixPath });
396
396
  if (!rewritten) {
397
397
  return null;
398
398
  }
@@ -407,7 +407,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
407
407
  const plugins = [
408
408
  ...rewritePlugins,
409
409
  {
410
- name: `${_chunkP6ACVBPQjs.vitePluginName}:post`,
410
+ name: `${_chunk7BASRP3Pjs.vitePluginName}:post`,
411
411
  enforce: "post",
412
412
  configResolved(config) {
413
413
  resolvedConfig = config;
@@ -433,7 +433,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
433
433
  for (const [fileName, output] of entries) {
434
434
  const entry = { fileName, output };
435
435
  if (isJavaScriptEntry(entry)) {
436
- const absolute = _chunkAB45L5FPjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
436
+ const absolute = _chunk322IEI2Kjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
437
437
  jsEntries.set(absolute, entry);
438
438
  }
439
439
  }
@@ -497,7 +497,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
497
497
  if (Array.isArray(groupedEntries.js)) {
498
498
  for (const [file, originalSource] of groupedEntries.js) {
499
499
  if (originalSource.type === "chunk") {
500
- const absoluteFile = _chunkAB45L5FPjs.toAbsoluteOutputPath.call(void 0, file, outDir);
500
+ const absoluteFile = _chunk322IEI2Kjs.toAbsoluteOutputPath.call(void 0, file, outDir);
501
501
  const initialRawSource = originalSource.code;
502
502
  jsTaskFactories.push(async () => {
503
503
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
@@ -523,7 +523,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
523
523
  });
524
524
  });
525
525
  } else if (uniAppX && originalSource.type === "asset") {
526
- const absoluteFile = _chunkAB45L5FPjs.toAbsoluteOutputPath.call(void 0, file, outDir);
526
+ const absoluteFile = _chunk322IEI2Kjs.toAbsoluteOutputPath.call(void 0, file, outDir);
527
527
  const rawSource = originalSource.source.toString();
528
528
  jsTaskFactories.push(async () => {
529
529
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
@@ -594,7 +594,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
594
594
  );
595
595
  }
596
596
  }
597
- _chunkAB45L5FPjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
597
+ _chunk322IEI2Kjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
598
598
  await Promise.all(tasks);
599
599
  for (const apply of pendingLinkedUpdates) {
600
600
  apply();