weapp-tailwindcss 4.9.3 → 4.9.4

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.
@@ -192,7 +192,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
192
192
  // package.json
193
193
  var package_default = {
194
194
  name: "weapp-tailwindcss",
195
- version: "4.9.3",
195
+ version: "4.9.4",
196
196
  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!",
197
197
  author: "ice breaker <1324318532@qq.com>",
198
198
  license: "MIT",
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RRHPTTCP.mjs";
4
4
  import {
5
5
  setupPatchRecorder
6
- } from "./chunk-ZL22KEHH.mjs";
6
+ } from "./chunk-QAEALIIZ.mjs";
7
7
  import {
8
8
  collectRuntimeClassSet,
9
9
  createDebug,
10
10
  getCompilerContext,
11
11
  refreshTailwindRuntimeState
12
- } from "./chunk-IW3B6ZJD.mjs";
12
+ } from "./chunk-3IXWQT3G.mjs";
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  import { Buffer } from "buffer";
@@ -9,7 +9,7 @@ import {
9
9
  isMpx,
10
10
  patchMpxLoaderResolve,
11
11
  setupMpxTailwindcssRedirect
12
- } from "./chunk-WH65CIYG.mjs";
12
+ } from "./chunk-XI2H73CF.mjs";
13
13
  import {
14
14
  pushConcurrentTaskFactories,
15
15
  resolveDisabledOptions,
@@ -22,14 +22,14 @@ import {
22
22
  } from "./chunk-RRHPTTCP.mjs";
23
23
  import {
24
24
  setupPatchRecorder
25
- } from "./chunk-ZL22KEHH.mjs";
25
+ } from "./chunk-QAEALIIZ.mjs";
26
26
  import {
27
27
  collectRuntimeClassSet,
28
28
  createDebug,
29
29
  getCompilerContext,
30
30
  pluginName,
31
31
  refreshTailwindRuntimeState
32
- } from "./chunk-IW3B6ZJD.mjs";
32
+ } from "./chunk-3IXWQT3G.mjs";
33
33
  import {
34
34
  getGroupedEntries
35
35
  } from "./chunk-OOHJLO5M.mjs";
@@ -12,7 +12,7 @@ var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
12
12
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
13
13
 
14
14
 
15
- var _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
15
+ var _chunkZQ7ET56Gjs = require('./chunk-ZQ7ET56G.js');
16
16
 
17
17
 
18
18
 
@@ -23,7 +23,7 @@ var _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
23
23
 
24
24
 
25
25
 
26
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
26
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
27
27
 
28
28
 
29
29
 
@@ -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, _chunkVOD2WUH6js.replaceWxml.call(void 0, prop.value.content));
57
+ ms.update(start, end, _chunkMVOIVNKLjs.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 = _chunkVOD2WUH6js.generateCode.call(void 0, prop.exp.content, {
69
+ const generated = _chunkMVOIVNKLjs.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 = _chunkVOD2WUH6js.createAttributeMatcher.call(void 0, customAttributesEntities);
98
+ const matchCustomAttribute = _chunkMVOIVNKLjs.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) {
@@ -677,7 +677,7 @@ function createRewriteCssImportsPlugins(options) {
677
677
  const { appType, weappTailwindcssDirPosix: weappTailwindcssDirPosix2 } = options;
678
678
  return [
679
679
  {
680
- name: `${_chunkVOD2WUH6js.vitePluginName}:rewrite-css-imports`,
680
+ name: `${_chunkMVOIVNKLjs.vitePluginName}:rewrite-css-imports`,
681
681
  enforce: "pre",
682
682
  resolveId: {
683
683
  order: "pre",
@@ -719,12 +719,12 @@ function createRewriteCssImportsPlugins(options) {
719
719
  }
720
720
 
721
721
  // src/bundlers/vite/index.ts
722
- var debug = _chunkVOD2WUH6js.createDebug.call(void 0, );
722
+ var debug = _chunkMVOIVNKLjs.createDebug.call(void 0, );
723
723
  var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
724
724
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
725
725
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
726
726
  const rewriteCssImportsSpecified = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
727
- const opts = _chunkVOD2WUH6js.getCompilerContext.call(void 0, options);
727
+ const opts = _chunkMVOIVNKLjs.getCompilerContext.call(void 0, options);
728
728
  const {
729
729
  disabled,
730
730
  customAttributes,
@@ -749,8 +749,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
749
749
  if (disabledOptions.plugin) {
750
750
  return rewritePlugins.length ? rewritePlugins : void 0;
751
751
  }
752
- const customAttributesEntities = _chunkVOD2WUH6js.toCustomAttributesEntities.call(void 0, customAttributes);
753
- const patchRecorderState = _chunkA2BRI46Mjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
752
+ const customAttributesEntities = _chunkMVOIVNKLjs.toCustomAttributesEntities.call(void 0, customAttributes);
753
+ const patchRecorderState = _chunkZQ7ET56Gjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
754
754
  source: "runtime",
755
755
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
756
756
  });
@@ -764,7 +764,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
764
764
  let runtimeSetPromise;
765
765
  let resolvedConfig;
766
766
  async function refreshRuntimeState(force) {
767
- const refreshed = await _chunkVOD2WUH6js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
767
+ const refreshed = await _chunkMVOIVNKLjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
768
768
  if (refreshed) {
769
769
  runtimeSet = void 0;
770
770
  runtimeSetPromise = void 0;
@@ -777,7 +777,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
777
777
  return runtimeSet;
778
778
  }
779
779
  if (force || !runtimeSetPromise) {
780
- const task2 = _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
780
+ const task2 = _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
781
781
  force: force || !runtimeSet,
782
782
  skipRefresh: force
783
783
  });
@@ -812,7 +812,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
812
812
  const plugins = [
813
813
  ...rewritePlugins,
814
814
  {
815
- name: `${_chunkVOD2WUH6js.vitePluginName}:post`,
815
+ name: `${_chunkMVOIVNKLjs.vitePluginName}:post`,
816
816
  enforce: "post",
817
817
  configResolved(config) {
818
818
  resolvedConfig = config;
@@ -3,13 +3,13 @@
3
3
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
4
4
 
5
5
 
6
- var _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
6
+ var _chunkZQ7ET56Gjs = require('./chunk-ZQ7ET56G.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
12
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.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 = _chunkVOD2WUH6js.createDebug.call(void 0, );
20
+ var debug = _chunkMVOIVNKLjs.createDebug.call(void 0, );
21
21
  var Transform = _stream2.default.Transform;
22
22
  function createPlugins(options = {}) {
23
- const opts = _chunkVOD2WUH6js.getCompilerContext.call(void 0, options);
23
+ const opts = _chunkMVOIVNKLjs.getCompilerContext.call(void 0, options);
24
24
  const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
25
- const patchRecorderState = _chunkA2BRI46Mjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
25
+ const patchRecorderState = _chunkZQ7ET56Gjs.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 _chunkVOD2WUH6js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
39
+ await _chunkMVOIVNKLjs.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 _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
47
+ runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
48
48
  runtimeSetInitialized = true;
49
49
  return runtimeSet;
50
50
  }
@@ -3,7 +3,7 @@
3
3
  var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
4
4
 
5
5
 
6
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
6
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -154,8 +154,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
154
154
  if (!options.enabled) {
155
155
  return;
156
156
  }
157
- compiler.hooks.normalModuleFactory.tap(_chunkVOD2WUH6js.pluginName, (factory) => {
158
- factory.hooks.beforeResolve.tap(_chunkVOD2WUH6js.pluginName, (data) => {
157
+ compiler.hooks.normalModuleFactory.tap(_chunkMVOIVNKLjs.pluginName, (factory) => {
158
+ factory.hooks.beforeResolve.tap(_chunkMVOIVNKLjs.pluginName, (data) => {
159
159
  rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
160
160
  });
161
161
  });
@@ -192,7 +192,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
192
192
  // package.json
193
193
  var package_default = {
194
194
  name: "weapp-tailwindcss",
195
- version: "4.9.3",
195
+ version: "4.9.4",
196
196
  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!",
197
197
  author: "ice breaker <1324318532@qq.com>",
198
198
  license: "MIT",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPatchTargetRecorder,
3
3
  createTailwindPatchPromise
4
- } from "./chunk-IW3B6ZJD.mjs";
4
+ } from "./chunk-3IXWQT3G.mjs";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-7D27E7TU.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-RRHPTTCP.mjs";
13
13
  import {
14
14
  setupPatchRecorder
15
- } from "./chunk-ZL22KEHH.mjs";
15
+ } from "./chunk-QAEALIIZ.mjs";
16
16
  import {
17
17
  collectRuntimeClassSet,
18
18
  createAttributeMatcher,
@@ -23,7 +23,7 @@ import {
23
23
  replaceWxml,
24
24
  toCustomAttributesEntities,
25
25
  vitePluginName
26
- } from "./chunk-IW3B6ZJD.mjs";
26
+ } from "./chunk-3IXWQT3G.mjs";
27
27
  import {
28
28
  getGroupedEntries,
29
29
  resolveUniUtsPlatform
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-F2CKKG6Q.mjs";
4
4
  import {
5
5
  pluginName
6
- } from "./chunk-IW3B6ZJD.mjs";
6
+ } from "./chunk-3IXWQT3G.mjs";
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  import path2 from "path";
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk3UOPODB3js = require('./chunk-3UOPODB3.js');
12
+ var _chunkKHBSYJ76js = require('./chunk-KHBSYJ76.js');
13
13
 
14
14
 
15
15
 
@@ -22,14 +22,14 @@ var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
22
22
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
23
23
 
24
24
 
25
- var _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
25
+ var _chunkZQ7ET56Gjs = require('./chunk-ZQ7ET56G.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
32
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
33
33
 
34
34
 
35
35
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
@@ -51,10 +51,10 @@ function setupWebpackV5ProcessAssetsHook(options) {
51
51
  } = options;
52
52
  const { Compilation, sources } = compiler.webpack;
53
53
  const { ConcatSource } = sources;
54
- compiler.hooks.compilation.tap(_chunkVOD2WUH6js.pluginName, (compilation) => {
54
+ compiler.hooks.compilation.tap(_chunkMVOIVNKLjs.pluginName, (compilation) => {
55
55
  compilation.hooks.processAssets.tapPromise(
56
56
  {
57
- name: _chunkVOD2WUH6js.pluginName,
57
+ name: _chunkMVOIVNKLjs.pluginName,
58
58
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
59
59
  },
60
60
  async (assets) => {
@@ -123,7 +123,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
123
123
  const groupedEntries = _chunkDYLQ6UOIjs.getGroupedEntries.call(void 0, entries, compilerOptions);
124
124
  await refreshRuntimeState(true);
125
125
  await runtimeState.patchPromise;
126
- const runtimeSet = await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
126
+ const runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
127
127
  debug2("get runtimeSet, class count: %d", runtimeSet.size);
128
128
  const tasks = [];
129
129
  if (Array.isArray(groupedEntries.html)) {
@@ -160,7 +160,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
160
160
  const jsTaskFactories = [];
161
161
  if (Array.isArray(groupedEntries.js)) {
162
162
  for (const [file] of groupedEntries.js) {
163
- const cacheKey = _chunk3UOPODB3js.getCacheKey.call(void 0, file);
163
+ const cacheKey = _chunkKHBSYJ76js.getCacheKey.call(void 0, file);
164
164
  const asset = compilation.getAsset(file);
165
165
  if (!asset) {
166
166
  continue;
@@ -265,9 +265,9 @@ function setupWebpackV5Loaders(options) {
265
265
  getClassSetInLoader,
266
266
  debug: debug2
267
267
  } = options;
268
- const isMpxApp = _chunk3UOPODB3js.isMpx.call(void 0, appType);
268
+ const isMpxApp = _chunkKHBSYJ76js.isMpx.call(void 0, appType);
269
269
  if (shouldRewriteCssImports && isMpxApp) {
270
- _chunk3UOPODB3js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
270
+ _chunkKHBSYJ76js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
271
271
  }
272
272
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
273
273
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -280,12 +280,12 @@ function setupWebpackV5Loaders(options) {
280
280
  const classSetLoaderOptions = {
281
281
  getClassSet: getClassSetInLoader
282
282
  };
283
- const { findRewriteAnchor, findClassSetAnchor } = _chunk3UOPODB3js.createLoaderAnchorFinders.call(void 0, appType);
283
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkKHBSYJ76js.createLoaderAnchorFinders.call(void 0, appType);
284
284
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
285
285
  rewriteCssImports: runtimeLoaderRewriteOptions
286
286
  } : void 0;
287
287
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
288
- _chunk3UOPODB3js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
288
+ _chunkKHBSYJ76js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
289
289
  }
290
290
  const createRuntimeClassSetLoaderEntry = () => ({
291
291
  loader: runtimeClassSetLoader,
@@ -305,17 +305,17 @@ function setupWebpackV5Loaders(options) {
305
305
  };
306
306
  };
307
307
  const { NormalModule } = compiler.webpack;
308
- compiler.hooks.compilation.tap(_chunkVOD2WUH6js.pluginName, (compilation) => {
309
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunkVOD2WUH6js.pluginName, (_loaderContext, module) => {
308
+ compiler.hooks.compilation.tap(_chunkMVOIVNKLjs.pluginName, (compilation) => {
309
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkMVOIVNKLjs.pluginName, (_loaderContext, module) => {
310
310
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
311
311
  if (!hasRuntimeLoader) {
312
312
  return;
313
313
  }
314
- _chunk3UOPODB3js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
314
+ _chunkKHBSYJ76js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
315
315
  const loaderEntries = module.loaders || [];
316
316
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
317
317
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
318
- const isCssModule = _chunk3UOPODB3js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
318
+ const isCssModule = _chunkKHBSYJ76js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
319
319
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
320
320
  debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
321
321
  }
@@ -347,7 +347,7 @@ function setupWebpackV5Loaders(options) {
347
347
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
348
348
  }
349
349
  }
350
- if (runtimeClassSetLoaderExists && !_chunk3UOPODB3js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
350
+ if (runtimeClassSetLoaderExists && !_chunkKHBSYJ76js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
351
351
  const classSetLoaderEntry = createRuntimeClassSetLoaderEntry();
352
352
  const anchorIndex = findClassSetAnchor(loaderEntries);
353
353
  if (anchorIndex === -1) {
@@ -362,11 +362,11 @@ function setupWebpackV5Loaders(options) {
362
362
  }
363
363
 
364
364
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
365
- var debug = _chunkVOD2WUH6js.createDebug.call(void 0, );
365
+ var debug = _chunkMVOIVNKLjs.createDebug.call(void 0, );
366
366
  var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
367
367
  var UnifiedWebpackPluginV5 = class {
368
368
  constructor(options = {}) {
369
- this.options = _chunkVOD2WUH6js.getCompilerContext.call(void 0, options);
369
+ this.options = _chunkMVOIVNKLjs.getCompilerContext.call(void 0, options);
370
370
  this.appType = this.options.appType;
371
371
  }
372
372
  apply(compiler) {
@@ -382,19 +382,19 @@ var UnifiedWebpackPluginV5 = class {
382
382
  const disabledOptions = _chunkVPHA77FHjs.resolveDisabledOptions.call(void 0, disabled);
383
383
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
384
384
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
385
- const isMpxApp = _chunk3UOPODB3js.isMpx.call(void 0, this.appType);
385
+ const isMpxApp = _chunkKHBSYJ76js.isMpx.call(void 0, this.appType);
386
386
  if (shouldRewriteCssImports) {
387
- _chunk3UOPODB3js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
387
+ _chunkKHBSYJ76js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
388
388
  pkgDir: weappTailwindcssPackageDir,
389
389
  enabled: true,
390
390
  appType: this.appType
391
391
  });
392
- _chunk3UOPODB3js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
392
+ _chunkKHBSYJ76js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
393
393
  }
394
394
  if (disabledOptions.plugin) {
395
395
  return;
396
396
  }
397
- const patchRecorderState = _chunkA2BRI46Mjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
397
+ const patchRecorderState = _chunkZQ7ET56Gjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
398
398
  source: "runtime",
399
399
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
400
400
  });
@@ -405,12 +405,12 @@ var UnifiedWebpackPluginV5 = class {
405
405
  onPatchCompleted: patchRecorderState.onPatchCompleted
406
406
  };
407
407
  const refreshRuntimeState = async (force) => {
408
- await _chunkVOD2WUH6js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
408
+ await _chunkMVOIVNKLjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
409
409
  };
410
410
  async function getClassSetInLoader() {
411
411
  await refreshRuntimeState(true);
412
412
  await runtimeState.patchPromise;
413
- await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
413
+ await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
414
414
  }
415
415
  onLoad();
416
416
  setupWebpackV5Loaders({
@@ -1,14 +1,14 @@
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 _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
4
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
5
5
 
6
6
 
7
7
  var _chunk4RUFPPI6js = require('./chunk-4RUFPPI6.js');
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
11
- const recorder = _chunkVOD2WUH6js.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunkMVOIVNKLjs.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
14
  _chunk4RUFPPI6js.logger.info("%s%s", prefix, recorder.message);
@@ -16,7 +16,7 @@ function setupPatchRecorder(patcher, baseDir, options) {
16
16
  const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _4 => _4.onPatched]) ? async () => {
17
17
  await recorder.onPatched();
18
18
  } : void 0;
19
- const patchPromise = patcher ? _chunkVOD2WUH6js.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunkMVOIVNKLjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
6
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
7
7
 
8
8
 
9
9
 
@@ -404,9 +404,9 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
404
404
  try {
405
405
  const patcher = createWorkspacePatcher(dir);
406
406
  if (options.clearCache) {
407
- await _chunkVOD2WUH6js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
407
+ await _chunkMVOIVNKLjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
408
408
  }
409
- const recorder = _chunkVOD2WUH6js.createPatchTargetRecorder.call(void 0, dir, patcher, {
409
+ const recorder = _chunkMVOIVNKLjs.createPatchTargetRecorder.call(void 0, dir, patcher, {
410
410
  source: "cli",
411
411
  cwd: dir,
412
412
  recordTarget: options.recordTarget !== false,
@@ -415,7 +415,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
415
415
  if (_optionalChain([recorder, 'optionalAccess', _12 => _12.message])) {
416
416
  _chunk4RUFPPI6js.logger.info("[workspace] %s %s", displayName, recorder.message);
417
417
  }
418
- _chunkVOD2WUH6js.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
418
+ _chunkMVOIVNKLjs.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
419
419
  await patcher.patch();
420
420
  if (_optionalChain([recorder, 'optionalAccess', _13 => _13.onPatched])) {
421
421
  await recorder.onPatched();
@@ -546,9 +546,9 @@ var mountOptions = {
546
546
  }
547
547
  const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
548
548
  if (shouldClearCache) {
549
- await _chunkVOD2WUH6js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
549
+ await _chunkMVOIVNKLjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
550
550
  }
551
- const recorder = _chunkVOD2WUH6js.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
551
+ const recorder = _chunkMVOIVNKLjs.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
552
552
  source: "cli",
553
553
  cwd: ctx.cwd,
554
554
  recordTarget: shouldRecordTarget,
@@ -557,7 +557,7 @@ var mountOptions = {
557
557
  if (_optionalChain([recorder, 'optionalAccess', _15 => _15.message])) {
558
558
  _chunk4RUFPPI6js.logger.info(recorder.message);
559
559
  }
560
- _chunkVOD2WUH6js.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
560
+ _chunkMVOIVNKLjs.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
561
561
  await patcher.patch();
562
562
  if (_optionalChain([recorder, 'optionalAccess', _16 => _16.onPatched])) {
563
563
  const recordPath = await recorder.onPatched();
@@ -705,9 +705,9 @@ async function generateVscodeIntellisenseEntry(options) {
705
705
 
706
706
  // src/cli.ts
707
707
  _process2.default.title = "node (weapp-tailwindcss)";
708
- if (_semver2.default.lt(_process2.default.versions.node, _chunkVOD2WUH6js.WEAPP_TW_REQUIRED_NODE_VERSION)) {
708
+ if (_semver2.default.lt(_process2.default.versions.node, _chunkMVOIVNKLjs.WEAPP_TW_REQUIRED_NODE_VERSION)) {
709
709
  _chunk4RUFPPI6js.logger.warn(
710
- `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkVOD2WUH6js.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
710
+ `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkMVOIVNKLjs.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
711
711
  );
712
712
  }
713
713
  var cli = _tailwindcsspatch.createTailwindcssPatchCli.call(void 0, {
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  clearTailwindcssPatcherCache,
4
4
  createPatchTargetRecorder,
5
5
  logTailwindcssTarget
6
- } from "./chunk-IW3B6ZJD.mjs";
6
+ } from "./chunk-3IXWQT3G.mjs";
7
7
  import {
8
8
  findWorkspaceRoot,
9
9
  logger
package/dist/core.js CHANGED
@@ -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 _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
3
+ var _chunkZQ7ET56Gjs = require('./chunk-ZQ7ET56G.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
8
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
9
9
  require('./chunk-4RUFPPI6.js');
10
10
  require('./chunk-FYYBY3VK.js');
11
11
  require('./chunk-DYLQ6UOI.js');
@@ -15,9 +15,9 @@ require('./chunk-Y6F6NBA7.js');
15
15
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
16
16
  var _shared = require('@weapp-tailwindcss/shared');
17
17
  function createContext(options = {}) {
18
- const opts = _chunkVOD2WUH6js.getCompilerContext.call(void 0, options);
18
+ const opts = _chunkMVOIVNKLjs.getCompilerContext.call(void 0, options);
19
19
  const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
20
- const patchRecorderState = _chunkA2BRI46Mjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
20
+ const patchRecorderState = _chunkZQ7ET56Gjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
21
21
  source: "runtime",
22
22
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
23
23
  });
@@ -29,7 +29,7 @@ function createContext(options = {}) {
29
29
  onPatchCompleted: patchRecorderState.onPatchCompleted
30
30
  };
31
31
  async function refreshRuntimeState(force) {
32
- await _chunkVOD2WUH6js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
32
+ await _chunkMVOIVNKLjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
33
33
  }
34
34
  async function transformWxss(rawCss, options2) {
35
35
  await runtimeState.patchPromise;
@@ -38,7 +38,7 @@ function createContext(options = {}) {
38
38
  }));
39
39
  await refreshRuntimeState(true);
40
40
  await runtimeState.patchPromise;
41
- runtimeSet = await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
41
+ runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
42
42
  return result;
43
43
  }
44
44
  async function transformJs(rawJs, options2 = {}) {
@@ -48,7 +48,7 @@ function createContext(options = {}) {
48
48
  } else {
49
49
  await refreshRuntimeState(true);
50
50
  await runtimeState.patchPromise;
51
- runtimeSet = await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
51
+ runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
52
52
  }
53
53
  return await jsHandler(rawJs, runtimeSet, options2);
54
54
  }
@@ -57,7 +57,7 @@ function createContext(options = {}) {
57
57
  if (!_optionalChain([options2, 'optionalAccess', _2 => _2.runtimeSet]) && runtimeSet.size === 0) {
58
58
  await refreshRuntimeState(true);
59
59
  await runtimeState.patchPromise;
60
- runtimeSet = await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
60
+ runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
61
61
  }
62
62
  return templateHandler(rawWxml, _shared.defuOverrideArray.call(void 0, options2, {
63
63
  runtimeSet
package/dist/core.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  setupPatchRecorder
3
- } from "./chunk-ZL22KEHH.mjs";
3
+ } from "./chunk-QAEALIIZ.mjs";
4
4
  import {
5
5
  collectRuntimeClassSet,
6
6
  getCompilerContext,
7
7
  refreshTailwindRuntimeState
8
- } from "./chunk-IW3B6ZJD.mjs";
8
+ } from "./chunk-3IXWQT3G.mjs";
9
9
  import "./chunk-7D27E7TU.mjs";
10
10
  import "./chunk-HWF5U4CI.mjs";
11
11
  import "./chunk-OOHJLO5M.mjs";
package/dist/gulp.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkI3IRT5VHjs = require('./chunk-I3IRT5VH.js');
3
+ var _chunkEZWWOZAHjs = require('./chunk-EZWWOZAH.js');
4
4
  require('./chunk-LTJQUORK.js');
5
- require('./chunk-A2BRI46M.js');
6
- require('./chunk-VOD2WUH6.js');
5
+ require('./chunk-ZQ7ET56G.js');
6
+ require('./chunk-MVOIVNKL.js');
7
7
  require('./chunk-4RUFPPI6.js');
8
8
  require('./chunk-FYYBY3VK.js');
9
9
  require('./chunk-DYLQ6UOI.js');
10
10
  require('./chunk-Y6F6NBA7.js');
11
11
 
12
12
 
13
- exports.createPlugins = _chunkI3IRT5VHjs.createPlugins;
13
+ exports.createPlugins = _chunkEZWWOZAHjs.createPlugins;
package/dist/gulp.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createPlugins
3
- } from "./chunk-4HESZS5A.mjs";
3
+ } from "./chunk-6HOLMRXS.mjs";
4
4
  import "./chunk-RRHPTTCP.mjs";
5
- import "./chunk-ZL22KEHH.mjs";
6
- import "./chunk-IW3B6ZJD.mjs";
5
+ import "./chunk-QAEALIIZ.mjs";
6
+ import "./chunk-3IXWQT3G.mjs";
7
7
  import "./chunk-7D27E7TU.mjs";
8
8
  import "./chunk-HWF5U4CI.mjs";
9
9
  import "./chunk-OOHJLO5M.mjs";
package/dist/index.js CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkIMOEZLDRjs = require('./chunk-IMOEZLDR.js');
6
- require('./chunk-3UOPODB3.js');
5
+ var _chunkZ3A2XYULjs = require('./chunk-Z3A2XYUL.js');
6
+ require('./chunk-KHBSYJ76.js');
7
7
 
8
8
 
9
- var _chunkI3IRT5VHjs = require('./chunk-I3IRT5VH.js');
9
+ var _chunkEZWWOZAHjs = require('./chunk-EZWWOZAH.js');
10
10
 
11
11
 
12
- var _chunkKXZ4MP4Ljs = require('./chunk-KXZ4MP4L.js');
12
+ var _chunkDKX737YIjs = require('./chunk-DKX737YI.js');
13
13
  require('./chunk-VPHA77FH.js');
14
14
  require('./chunk-LTJQUORK.js');
15
- require('./chunk-A2BRI46M.js');
16
- require('./chunk-VOD2WUH6.js');
15
+ require('./chunk-ZQ7ET56G.js');
16
+ require('./chunk-MVOIVNKL.js');
17
17
  require('./chunk-4RUFPPI6.js');
18
18
  require('./chunk-FYYBY3VK.js');
19
19
  require('./chunk-DYLQ6UOI.js');
@@ -23,4 +23,4 @@ require('./chunk-Y6F6NBA7.js');
23
23
 
24
24
 
25
25
 
26
- exports.UnifiedViteWeappTailwindcssPlugin = _chunkKXZ4MP4Ljs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkIMOEZLDRjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkI3IRT5VHjs.createPlugins; exports.weappTailwindcssPackageDir = _chunkIMOEZLDRjs.weappTailwindcssPackageDir;
26
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkDKX737YIjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkZ3A2XYULjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkEZWWOZAHjs.createPlugins; exports.weappTailwindcssPackageDir = _chunkZ3A2XYULjs.weappTailwindcssPackageDir;
package/dist/index.mjs CHANGED
@@ -2,18 +2,18 @@ import "./chunk-YAN7TO2B.mjs";
2
2
  import {
3
3
  UnifiedWebpackPluginV5,
4
4
  weappTailwindcssPackageDir
5
- } from "./chunk-PU5CC4ZI.mjs";
6
- import "./chunk-WH65CIYG.mjs";
5
+ } from "./chunk-AJDZJQNR.mjs";
6
+ import "./chunk-XI2H73CF.mjs";
7
7
  import {
8
8
  createPlugins
9
- } from "./chunk-4HESZS5A.mjs";
9
+ } from "./chunk-6HOLMRXS.mjs";
10
10
  import {
11
11
  UnifiedViteWeappTailwindcssPlugin
12
- } from "./chunk-Z2D5NSG5.mjs";
12
+ } from "./chunk-WCM6ODS4.mjs";
13
13
  import "./chunk-F2CKKG6Q.mjs";
14
14
  import "./chunk-RRHPTTCP.mjs";
15
- import "./chunk-ZL22KEHH.mjs";
16
- import "./chunk-IW3B6ZJD.mjs";
15
+ import "./chunk-QAEALIIZ.mjs";
16
+ import "./chunk-3IXWQT3G.mjs";
17
17
  import "./chunk-7D27E7TU.mjs";
18
18
  import "./chunk-HWF5U4CI.mjs";
19
19
  import "./chunk-OOHJLO5M.mjs";
package/dist/vite.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkKXZ4MP4Ljs = require('./chunk-KXZ4MP4L.js');
3
+ var _chunkDKX737YIjs = require('./chunk-DKX737YI.js');
4
4
  require('./chunk-VPHA77FH.js');
5
5
  require('./chunk-LTJQUORK.js');
6
- require('./chunk-A2BRI46M.js');
7
- require('./chunk-VOD2WUH6.js');
6
+ require('./chunk-ZQ7ET56G.js');
7
+ require('./chunk-MVOIVNKL.js');
8
8
  require('./chunk-4RUFPPI6.js');
9
9
  require('./chunk-FYYBY3VK.js');
10
10
  require('./chunk-DYLQ6UOI.js');
11
11
  require('./chunk-Y6F6NBA7.js');
12
12
 
13
13
 
14
- exports.UnifiedViteWeappTailwindcssPlugin = _chunkKXZ4MP4Ljs.UnifiedViteWeappTailwindcssPlugin;
14
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkDKX737YIjs.UnifiedViteWeappTailwindcssPlugin;
package/dist/vite.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  UnifiedViteWeappTailwindcssPlugin
3
- } from "./chunk-Z2D5NSG5.mjs";
3
+ } from "./chunk-WCM6ODS4.mjs";
4
4
  import "./chunk-F2CKKG6Q.mjs";
5
5
  import "./chunk-RRHPTTCP.mjs";
6
- import "./chunk-ZL22KEHH.mjs";
7
- import "./chunk-IW3B6ZJD.mjs";
6
+ import "./chunk-QAEALIIZ.mjs";
7
+ import "./chunk-3IXWQT3G.mjs";
8
8
  import "./chunk-7D27E7TU.mjs";
9
9
  import "./chunk-HWF5U4CI.mjs";
10
10
  import "./chunk-OOHJLO5M.mjs";
package/dist/webpack.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkIMOEZLDRjs = require('./chunk-IMOEZLDR.js');
5
- require('./chunk-3UOPODB3.js');
4
+ var _chunkZ3A2XYULjs = require('./chunk-Z3A2XYUL.js');
5
+ require('./chunk-KHBSYJ76.js');
6
6
  require('./chunk-VPHA77FH.js');
7
7
  require('./chunk-LTJQUORK.js');
8
- require('./chunk-A2BRI46M.js');
9
- require('./chunk-VOD2WUH6.js');
8
+ require('./chunk-ZQ7ET56G.js');
9
+ require('./chunk-MVOIVNKL.js');
10
10
  require('./chunk-4RUFPPI6.js');
11
11
  require('./chunk-FYYBY3VK.js');
12
12
  require('./chunk-DYLQ6UOI.js');
@@ -14,4 +14,4 @@ require('./chunk-Y6F6NBA7.js');
14
14
 
15
15
 
16
16
 
17
- exports.UnifiedWebpackPluginV5 = _chunkIMOEZLDRjs.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunkIMOEZLDRjs.weappTailwindcssPackageDir;
17
+ exports.UnifiedWebpackPluginV5 = _chunkZ3A2XYULjs.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunkZ3A2XYULjs.weappTailwindcssPackageDir;
package/dist/webpack.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  UnifiedWebpackPluginV5,
3
3
  weappTailwindcssPackageDir
4
- } from "./chunk-PU5CC4ZI.mjs";
5
- import "./chunk-WH65CIYG.mjs";
4
+ } from "./chunk-AJDZJQNR.mjs";
5
+ import "./chunk-XI2H73CF.mjs";
6
6
  import "./chunk-F2CKKG6Q.mjs";
7
7
  import "./chunk-RRHPTTCP.mjs";
8
- import "./chunk-ZL22KEHH.mjs";
9
- import "./chunk-IW3B6ZJD.mjs";
8
+ import "./chunk-QAEALIIZ.mjs";
9
+ import "./chunk-3IXWQT3G.mjs";
10
10
  import "./chunk-7D27E7TU.mjs";
11
11
  import "./chunk-HWF5U4CI.mjs";
12
12
  import "./chunk-OOHJLO5M.mjs";
package/dist/webpack4.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk3UOPODB3js = require('./chunk-3UOPODB3.js');
12
+ var _chunkKHBSYJ76js = require('./chunk-KHBSYJ76.js');
13
13
 
14
14
 
15
15
 
@@ -22,14 +22,14 @@ var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
22
22
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
23
23
 
24
24
 
25
- var _chunkA2BRI46Mjs = require('./chunk-A2BRI46M.js');
25
+ var _chunkZQ7ET56Gjs = require('./chunk-ZQ7ET56G.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
32
+ var _chunkMVOIVNKLjs = require('./chunk-MVOIVNKL.js');
33
33
  require('./chunk-4RUFPPI6.js');
34
34
  require('./chunk-FYYBY3VK.js');
35
35
 
@@ -53,7 +53,7 @@ function setupWebpackV4EmitHook(options) {
53
53
  refreshRuntimeState,
54
54
  debug: debug2
55
55
  } = options;
56
- compiler.hooks.emit.tapPromise(_chunkVOD2WUH6js.pluginName, async (compilation) => {
56
+ compiler.hooks.emit.tapPromise(_chunkMVOIVNKLjs.pluginName, async (compilation) => {
57
57
  await runtimeState.patchPromise;
58
58
  compilerOptions.onStart();
59
59
  debug2("start");
@@ -119,7 +119,7 @@ function setupWebpackV4EmitHook(options) {
119
119
  const groupedEntries = _chunkDYLQ6UOIjs.getGroupedEntries.call(void 0, entries, compilerOptions);
120
120
  await refreshRuntimeState(true);
121
121
  await runtimeState.patchPromise;
122
- const runtimeSet = await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
122
+ const runtimeSet = await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
123
123
  debug2("get runtimeSet, class count: %d", runtimeSet.size);
124
124
  const tasks = [];
125
125
  if (Array.isArray(groupedEntries.html)) {
@@ -156,7 +156,7 @@ function setupWebpackV4EmitHook(options) {
156
156
  const jsTaskFactories = [];
157
157
  if (Array.isArray(groupedEntries.js)) {
158
158
  for (const [file] of groupedEntries.js) {
159
- const cacheKey = _chunk3UOPODB3js.getCacheKey.call(void 0, file);
159
+ const cacheKey = _chunkKHBSYJ76js.getCacheKey.call(void 0, file);
160
160
  const assetSource = compilation.assets[file];
161
161
  if (!assetSource) {
162
162
  continue;
@@ -259,9 +259,9 @@ function setupWebpackV4Loaders(options) {
259
259
  getClassSetInLoader,
260
260
  debug: debug2
261
261
  } = options;
262
- const isMpxApp = _chunk3UOPODB3js.isMpx.call(void 0, appType);
262
+ const isMpxApp = _chunkKHBSYJ76js.isMpx.call(void 0, appType);
263
263
  if (shouldRewriteCssImports && isMpxApp) {
264
- _chunk3UOPODB3js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
264
+ _chunkKHBSYJ76js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
265
265
  }
266
266
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
267
267
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -274,12 +274,12 @@ function setupWebpackV4Loaders(options) {
274
274
  const classSetLoaderOptions = {
275
275
  getClassSet: getClassSetInLoader
276
276
  };
277
- const { findRewriteAnchor, findClassSetAnchor } = _chunk3UOPODB3js.createLoaderAnchorFinders.call(void 0, appType);
277
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkKHBSYJ76js.createLoaderAnchorFinders.call(void 0, appType);
278
278
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
279
279
  rewriteCssImports: runtimeLoaderRewriteOptions
280
280
  } : void 0;
281
281
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
282
- _chunk3UOPODB3js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
282
+ _chunkKHBSYJ76js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
283
283
  }
284
284
  const createRuntimeClassSetLoaderEntry = () => ({
285
285
  loader: runtimeClassSetLoader,
@@ -298,19 +298,19 @@ function setupWebpackV4Loaders(options) {
298
298
  type: null
299
299
  };
300
300
  };
301
- compiler.hooks.compilation.tap(_chunkVOD2WUH6js.pluginName, (compilation) => {
302
- compilation.hooks.normalModuleLoader.tap(_chunkVOD2WUH6js.pluginName, (_loaderContext, module) => {
301
+ compiler.hooks.compilation.tap(_chunkMVOIVNKLjs.pluginName, (compilation) => {
302
+ compilation.hooks.normalModuleLoader.tap(_chunkMVOIVNKLjs.pluginName, (_loaderContext, module) => {
303
303
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
304
304
  if (!hasRuntimeLoader) {
305
305
  return;
306
306
  }
307
- if (shouldRewriteCssImports && _chunk3UOPODB3js.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
308
- _chunk3UOPODB3js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
307
+ if (shouldRewriteCssImports && _chunkKHBSYJ76js.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
308
+ _chunkKHBSYJ76js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
309
309
  }
310
310
  const loaderEntries = module.loaders || [];
311
311
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
312
312
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
313
- const isCssModule = _chunk3UOPODB3js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
313
+ const isCssModule = _chunkKHBSYJ76js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
314
314
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
315
315
  debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
316
316
  }
@@ -344,7 +344,7 @@ function setupWebpackV4Loaders(options) {
344
344
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
345
345
  }
346
346
  }
347
- if (runtimeClassSetLoaderExists && !_chunk3UOPODB3js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
347
+ if (runtimeClassSetLoaderExists && !_chunkKHBSYJ76js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
348
348
  const anchorIndex = findClassSetAnchor(loaderEntries);
349
349
  if (anchorIndex === -1) {
350
350
  anchorlessInsert(createRuntimeClassSetLoaderEntry(), "before");
@@ -358,11 +358,11 @@ function setupWebpackV4Loaders(options) {
358
358
  }
359
359
 
360
360
  // src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
361
- var debug = _chunkVOD2WUH6js.createDebug.call(void 0, );
361
+ var debug = _chunkMVOIVNKLjs.createDebug.call(void 0, );
362
362
  var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
363
363
  var UnifiedWebpackPluginV4 = class {
364
364
  constructor(options = {}) {
365
- this.options = _chunkVOD2WUH6js.getCompilerContext.call(void 0, options);
365
+ this.options = _chunkMVOIVNKLjs.getCompilerContext.call(void 0, options);
366
366
  this.appType = this.options.appType;
367
367
  }
368
368
  apply(compiler) {
@@ -378,19 +378,19 @@ var UnifiedWebpackPluginV4 = class {
378
378
  const disabledOptions = _chunkVPHA77FHjs.resolveDisabledOptions.call(void 0, disabled);
379
379
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
380
380
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
381
- const isMpxApp = _chunk3UOPODB3js.isMpx.call(void 0, this.appType);
381
+ const isMpxApp = _chunkKHBSYJ76js.isMpx.call(void 0, this.appType);
382
382
  if (shouldRewriteCssImports) {
383
- _chunk3UOPODB3js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
383
+ _chunkKHBSYJ76js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
384
384
  pkgDir: weappTailwindcssPackageDir,
385
385
  enabled: true,
386
386
  appType: this.appType
387
387
  });
388
- _chunk3UOPODB3js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
388
+ _chunkKHBSYJ76js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
389
389
  }
390
390
  if (disabledOptions.plugin) {
391
391
  return;
392
392
  }
393
- const patchRecorderState = _chunkA2BRI46Mjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
393
+ const patchRecorderState = _chunkZQ7ET56Gjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
394
394
  source: "runtime",
395
395
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
396
396
  });
@@ -401,12 +401,12 @@ var UnifiedWebpackPluginV4 = class {
401
401
  onPatchCompleted: patchRecorderState.onPatchCompleted
402
402
  };
403
403
  const refreshRuntimeState = async (force) => {
404
- await _chunkVOD2WUH6js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
404
+ await _chunkMVOIVNKLjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
405
405
  };
406
406
  async function getClassSetInLoader() {
407
407
  await refreshRuntimeState(true);
408
408
  await runtimeState.patchPromise;
409
- await _chunkVOD2WUH6js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
409
+ await _chunkMVOIVNKLjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
410
410
  }
411
411
  onLoad();
412
412
  setupWebpackV4Loaders({
package/dist/webpack4.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  isMpx,
10
10
  patchMpxLoaderResolve,
11
11
  setupMpxTailwindcssRedirect
12
- } from "./chunk-WH65CIYG.mjs";
12
+ } from "./chunk-XI2H73CF.mjs";
13
13
  import {
14
14
  pushConcurrentTaskFactories,
15
15
  resolveDisabledOptions,
@@ -22,14 +22,14 @@ import {
22
22
  } from "./chunk-RRHPTTCP.mjs";
23
23
  import {
24
24
  setupPatchRecorder
25
- } from "./chunk-ZL22KEHH.mjs";
25
+ } from "./chunk-QAEALIIZ.mjs";
26
26
  import {
27
27
  collectRuntimeClassSet,
28
28
  createDebug,
29
29
  getCompilerContext,
30
30
  pluginName,
31
31
  refreshTailwindRuntimeState
32
- } from "./chunk-IW3B6ZJD.mjs";
32
+ } from "./chunk-3IXWQT3G.mjs";
33
33
  import "./chunk-7D27E7TU.mjs";
34
34
  import "./chunk-HWF5U4CI.mjs";
35
35
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "4.9.3",
3
+ "version": "4.9.4",
4
4
  "description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -185,8 +185,8 @@
185
185
  "webpack-sources": "3.3.3",
186
186
  "yaml": "^2.8.2",
187
187
  "@weapp-tailwindcss/logger": "1.1.0",
188
- "@weapp-tailwindcss/postcss": "2.1.1",
189
- "@weapp-tailwindcss/shared": "1.1.2"
188
+ "@weapp-tailwindcss/shared": "1.1.2",
189
+ "@weapp-tailwindcss/postcss": "2.1.2"
190
190
  },
191
191
  "scripts": {
192
192
  "dev": "tsup --watch --sourcemap",