weapp-tailwindcss 4.10.0 → 4.10.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 (47) hide show
  1. package/dist/{chunk-TNAPEHNW.mjs → chunk-3BKE5AJQ.mjs} +3 -3
  2. package/dist/{chunk-F6VHIO5B.mjs → chunk-4QCL7FBX.mjs} +1 -1
  3. package/dist/{chunk-VTIOEDOK.js → chunk-7K3R5LV6.js} +3 -49
  4. package/dist/{chunk-ZP6TLVZX.mjs → chunk-7ZI6WVIU.mjs} +2 -2
  5. package/dist/{chunk-VZX2RV6M.js → chunk-EE4DYM4E.js} +19 -36
  6. package/dist/{chunk-D67CTJV5.mjs → chunk-ESIT2XWD.mjs} +2 -19
  7. package/dist/{chunk-6QU7CMAG.mjs → chunk-GKT5AE7D.mjs} +1 -1
  8. package/dist/{chunk-JA6PNN27.js → chunk-K7CTHHN2.js} +27 -27
  9. package/dist/{chunk-PDP4OIKN.js → chunk-P65O2L27.js} +3 -3
  10. package/dist/{chunk-HFXMZGPW.js → chunk-RB7YN5XZ.js} +3 -3
  11. package/dist/{chunk-Q5IGGG5W.mjs → chunk-RXM5ERRJ.mjs} +3 -49
  12. package/dist/{chunk-DA2K4ZIE.js → chunk-W3EZEDKD.js} +7 -7
  13. package/dist/cli.js +9 -9
  14. package/dist/cli.mjs +1 -1
  15. package/dist/core.d.mts +1 -1
  16. package/dist/core.d.ts +1 -1
  17. package/dist/core.js +9 -17
  18. package/dist/core.mjs +4 -12
  19. package/dist/defaults.d.mts +1 -1
  20. package/dist/defaults.d.ts +1 -1
  21. package/dist/gulp.d.mts +1 -1
  22. package/dist/gulp.d.ts +1 -1
  23. package/dist/gulp.js +4 -4
  24. package/dist/gulp.mjs +3 -3
  25. package/dist/{index-B6U7MoOM.d.ts → index-BESv5MWf.d.mts} +2 -6
  26. package/dist/{index-B6U7MoOM.d.mts → index-BESv5MWf.d.ts} +2 -6
  27. package/dist/index.d.mts +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +7 -7
  30. package/dist/index.mjs +6 -6
  31. package/dist/presets.d.mts +1 -1
  32. package/dist/presets.d.ts +1 -1
  33. package/dist/types.d.mts +5 -4
  34. package/dist/types.d.ts +5 -4
  35. package/dist/vite.d.mts +1 -1
  36. package/dist/vite.d.ts +1 -1
  37. package/dist/vite.js +4 -4
  38. package/dist/vite.mjs +3 -3
  39. package/dist/webpack.d.mts +1 -1
  40. package/dist/webpack.d.ts +1 -1
  41. package/dist/webpack.js +5 -5
  42. package/dist/webpack.mjs +4 -4
  43. package/dist/webpack4.d.mts +1 -1
  44. package/dist/webpack4.d.ts +1 -1
  45. package/dist/webpack4.js +26 -26
  46. package/dist/webpack4.mjs +3 -3
  47. package/package.json +1 -1
package/dist/vite.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  UnifiedViteWeappTailwindcssPlugin
3
- } from "./chunk-D67CTJV5.mjs";
3
+ } from "./chunk-ESIT2XWD.mjs";
4
4
  import "./chunk-F2CKKG6Q.mjs";
5
5
  import "./chunk-RRHPTTCP.mjs";
6
- import "./chunk-F6VHIO5B.mjs";
7
- import "./chunk-Q5IGGG5W.mjs";
6
+ import "./chunk-4QCL7FBX.mjs";
7
+ import "./chunk-RXM5ERRJ.mjs";
8
8
  import "./chunk-QOTLDKI4.mjs";
9
9
  import "./chunk-3WUHHFLF.mjs";
10
10
  import "./chunk-OOHJLO5M.mjs";
@@ -1,6 +1,6 @@
1
1
  import { Compiler } from 'webpack';
2
2
  import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.mjs';
3
- import { A as AppType, U as UserDefinedOptions } from './index-B6U7MoOM.mjs';
3
+ import { A as AppType, U as UserDefinedOptions } from './index-BESv5MWf.mjs';
4
4
  import '@babel/parser';
5
5
  import '@weapp-tailwindcss/postcss';
6
6
  import 'magic-string';
package/dist/webpack.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Compiler } from 'webpack';
2
2
  import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.js';
3
- import { A as AppType, U as UserDefinedOptions } from './index-B6U7MoOM.js';
3
+ import { A as AppType, U as UserDefinedOptions } from './index-BESv5MWf.js';
4
4
  import '@babel/parser';
5
5
  import '@weapp-tailwindcss/postcss';
6
6
  import 'magic-string';
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 _chunkJA6PNN27js = require('./chunk-JA6PNN27.js');
5
- require('./chunk-PDP4OIKN.js');
4
+ var _chunkK7CTHHN2js = require('./chunk-K7CTHHN2.js');
5
+ require('./chunk-P65O2L27.js');
6
6
  require('./chunk-IIDSY4XZ.js');
7
7
  require('./chunk-LTJQUORK.js');
8
- require('./chunk-HFXMZGPW.js');
9
- require('./chunk-VTIOEDOK.js');
8
+ require('./chunk-RB7YN5XZ.js');
9
+ require('./chunk-7K3R5LV6.js');
10
10
  require('./chunk-5APD2MNV.js');
11
11
  require('./chunk-5U24PLVV.js');
12
12
  require('./chunk-DYLQ6UOI.js');
@@ -14,4 +14,4 @@ require('./chunk-DBAAU4LK.js');
14
14
 
15
15
 
16
16
 
17
- exports.UnifiedWebpackPluginV5 = _chunkJA6PNN27js.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunkJA6PNN27js.weappTailwindcssPackageDir;
17
+ exports.UnifiedWebpackPluginV5 = _chunkK7CTHHN2js.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunkK7CTHHN2js.weappTailwindcssPackageDir;
package/dist/webpack.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  UnifiedWebpackPluginV5,
3
3
  weappTailwindcssPackageDir
4
- } from "./chunk-TNAPEHNW.mjs";
5
- import "./chunk-6QU7CMAG.mjs";
4
+ } from "./chunk-3BKE5AJQ.mjs";
5
+ import "./chunk-GKT5AE7D.mjs";
6
6
  import "./chunk-F2CKKG6Q.mjs";
7
7
  import "./chunk-RRHPTTCP.mjs";
8
- import "./chunk-F6VHIO5B.mjs";
9
- import "./chunk-Q5IGGG5W.mjs";
8
+ import "./chunk-4QCL7FBX.mjs";
9
+ import "./chunk-RXM5ERRJ.mjs";
10
10
  import "./chunk-QOTLDKI4.mjs";
11
11
  import "./chunk-3WUHHFLF.mjs";
12
12
  import "./chunk-OOHJLO5M.mjs";
@@ -1,6 +1,6 @@
1
1
  import { Compiler } from 'webpack4';
2
2
  import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.mjs';
3
- import { A as AppType, U as UserDefinedOptions } from './index-B6U7MoOM.mjs';
3
+ import { A as AppType, U as UserDefinedOptions } from './index-BESv5MWf.mjs';
4
4
  import '@babel/parser';
5
5
  import '@weapp-tailwindcss/postcss';
6
6
  import 'magic-string';
@@ -1,6 +1,6 @@
1
1
  import { Compiler } from 'webpack4';
2
2
  import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.js';
3
- import { A as AppType, U as UserDefinedOptions } from './index-B6U7MoOM.js';
3
+ import { A as AppType, U as UserDefinedOptions } from './index-BESv5MWf.js';
4
4
  import '@babel/parser';
5
5
  import '@weapp-tailwindcss/postcss';
6
6
  import 'magic-string';
package/dist/webpack4.js CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- var _chunkPDP4OIKNjs = require('./chunk-PDP4OIKN.js');
13
+ var _chunkP65O2L27js = require('./chunk-P65O2L27.js');
14
14
 
15
15
 
16
16
 
@@ -23,14 +23,14 @@ var _chunkIIDSY4XZjs = require('./chunk-IIDSY4XZ.js');
23
23
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
24
24
 
25
25
 
26
- var _chunkHFXMZGPWjs = require('./chunk-HFXMZGPW.js');
26
+ var _chunkRB7YN5XZjs = require('./chunk-RB7YN5XZ.js');
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
32
 
33
- var _chunkVTIOEDOKjs = require('./chunk-VTIOEDOK.js');
33
+ var _chunk7K3R5LV6js = require('./chunk-7K3R5LV6.js');
34
34
  require('./chunk-5APD2MNV.js');
35
35
  require('./chunk-5U24PLVV.js');
36
36
 
@@ -59,7 +59,7 @@ function setupWebpackV4EmitHook(options) {
59
59
  runtimeState,
60
60
  debug: debug2
61
61
  } = options;
62
- compiler.hooks.emit.tapPromise(_chunkVTIOEDOKjs.pluginName, async (compilation) => {
62
+ compiler.hooks.emit.tapPromise(_chunk7K3R5LV6js.pluginName, async (compilation) => {
63
63
  await runtimeState.patchPromise;
64
64
  compilerOptions.onStart();
65
65
  debug2("start");
@@ -68,7 +68,7 @@ function setupWebpackV4EmitHook(options) {
68
68
  compilerOptions.cache.calcHashValueChanged(chunk.id, chunk.hash);
69
69
  }
70
70
  }
71
- const assetHashByChunk = _chunkPDP4OIKNjs.createAssetHashByChunkMap.call(void 0, compilation.chunks);
71
+ const assetHashByChunk = _chunkP65O2L27js.createAssetHashByChunkMap.call(void 0, compilation.chunks);
72
72
  const assets = compilation.assets;
73
73
  const entries = Object.entries(assets);
74
74
  const outputDir = _optionalChain([compiler, 'access', _ => _.options, 'optionalAccess', _2 => _2.output, 'optionalAccess', _3 => _3.path]) ? _path2.default.resolve(compiler.options.output.path) : _process2.default.cwd();
@@ -125,7 +125,7 @@ function setupWebpackV4EmitHook(options) {
125
125
  };
126
126
  const groupedEntries = _chunkDYLQ6UOIjs.getGroupedEntries.call(void 0, entries, compilerOptions);
127
127
  const staleClassNameFallback = resolveWebpackStaleClassNameFallback(compilerOptions.staleClassNameFallback, compiler);
128
- const runtimeSet = await _chunkVTIOEDOKjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
128
+ const runtimeSet = await _chunk7K3R5LV6js.ensureRuntimeClassSet.call(void 0, runtimeState, {
129
129
  // webpack 的 script-only 热更新可能不会触发 runtime classset loader,
130
130
  // 这里强制收集可避免沿用上轮 class set,保证 JS 仅按最新集合精确命中。
131
131
  forceCollect: true,
@@ -170,7 +170,7 @@ function setupWebpackV4EmitHook(options) {
170
170
  const jsTaskFactories = [];
171
171
  if (Array.isArray(groupedEntries.js)) {
172
172
  for (const [file] of groupedEntries.js) {
173
- const cacheKey = _chunkPDP4OIKNjs.getCacheKey.call(void 0, file);
173
+ const cacheKey = _chunkP65O2L27js.getCacheKey.call(void 0, file);
174
174
  const assetSource = compilation.assets[file];
175
175
  if (!assetSource) {
176
176
  continue;
@@ -280,9 +280,9 @@ function setupWebpackV4Loaders(options) {
280
280
  getClassSetInLoader,
281
281
  debug: debug2
282
282
  } = options;
283
- const isMpxApp = _chunkPDP4OIKNjs.isMpx.call(void 0, appType);
283
+ const isMpxApp = _chunkP65O2L27js.isMpx.call(void 0, appType);
284
284
  if (shouldRewriteCssImports && isMpxApp) {
285
- _chunkPDP4OIKNjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
285
+ _chunkP65O2L27js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
286
286
  }
287
287
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
288
288
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -295,12 +295,12 @@ function setupWebpackV4Loaders(options) {
295
295
  const classSetLoaderOptions = {
296
296
  getClassSet: getClassSetInLoader
297
297
  };
298
- const { findRewriteAnchor, findClassSetAnchor } = _chunkPDP4OIKNjs.createLoaderAnchorFinders.call(void 0, appType);
298
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkP65O2L27js.createLoaderAnchorFinders.call(void 0, appType);
299
299
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
300
300
  rewriteCssImports: runtimeLoaderRewriteOptions
301
301
  } : void 0;
302
302
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
303
- _chunkPDP4OIKNjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
303
+ _chunkP65O2L27js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
304
304
  }
305
305
  const createRuntimeClassSetLoaderEntry = () => ({
306
306
  loader: runtimeClassSetLoader,
@@ -319,19 +319,19 @@ function setupWebpackV4Loaders(options) {
319
319
  type: null
320
320
  };
321
321
  };
322
- compiler.hooks.compilation.tap(_chunkVTIOEDOKjs.pluginName, (compilation) => {
323
- compilation.hooks.normalModuleLoader.tap(_chunkVTIOEDOKjs.pluginName, (_loaderContext, module) => {
322
+ compiler.hooks.compilation.tap(_chunk7K3R5LV6js.pluginName, (compilation) => {
323
+ compilation.hooks.normalModuleLoader.tap(_chunk7K3R5LV6js.pluginName, (_loaderContext, module) => {
324
324
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
325
325
  if (!hasRuntimeLoader) {
326
326
  return;
327
327
  }
328
- if (shouldRewriteCssImports && _chunkPDP4OIKNjs.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
329
- _chunkPDP4OIKNjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
328
+ if (shouldRewriteCssImports && _chunkP65O2L27js.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
329
+ _chunkP65O2L27js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
330
330
  }
331
331
  const loaderEntries = module.loaders || [];
332
332
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
333
333
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
334
- const isCssModule = _chunkPDP4OIKNjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
334
+ const isCssModule = _chunkP65O2L27js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
335
335
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
336
336
  debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
337
337
  }
@@ -365,7 +365,7 @@ function setupWebpackV4Loaders(options) {
365
365
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
366
366
  }
367
367
  }
368
- if (runtimeClassSetLoaderExists && !_chunkPDP4OIKNjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
368
+ if (runtimeClassSetLoaderExists && !_chunkP65O2L27js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
369
369
  const anchorIndex = findClassSetAnchor(loaderEntries);
370
370
  if (anchorIndex === -1) {
371
371
  anchorlessInsert(createRuntimeClassSetLoaderEntry(), "before");
@@ -379,11 +379,11 @@ function setupWebpackV4Loaders(options) {
379
379
  }
380
380
 
381
381
  // src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
382
- var debug = _chunkVTIOEDOKjs.createDebug.call(void 0, );
382
+ var debug = _chunk7K3R5LV6js.createDebug.call(void 0, );
383
383
  var weappTailwindcssPackageDir = _chunkIIDSY4XZjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
384
384
  var UnifiedWebpackPluginV4 = class {
385
385
  constructor(options = {}) {
386
- this.options = _chunkVTIOEDOKjs.getCompilerContext.call(void 0, options);
386
+ this.options = _chunk7K3R5LV6js.getCompilerContext.call(void 0, options);
387
387
  this.appType = this.options.appType;
388
388
  }
389
389
  apply(compiler) {
@@ -399,19 +399,19 @@ var UnifiedWebpackPluginV4 = class {
399
399
  const disabledOptions = _chunkIIDSY4XZjs.resolveDisabledOptions.call(void 0, disabled);
400
400
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
401
401
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
402
- const isMpxApp = _chunkPDP4OIKNjs.isMpx.call(void 0, this.appType);
402
+ const isMpxApp = _chunkP65O2L27js.isMpx.call(void 0, this.appType);
403
403
  if (shouldRewriteCssImports) {
404
- _chunkPDP4OIKNjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
404
+ _chunkP65O2L27js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
405
405
  pkgDir: weappTailwindcssPackageDir,
406
406
  enabled: true,
407
407
  appType: this.appType
408
408
  });
409
- _chunkPDP4OIKNjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
409
+ _chunkP65O2L27js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
410
410
  }
411
411
  if (disabledOptions.plugin) {
412
412
  return;
413
413
  }
414
- const patchRecorderState = _chunkHFXMZGPWjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
414
+ const patchRecorderState = _chunkRB7YN5XZjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
415
415
  source: "runtime",
416
416
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
417
417
  });
@@ -423,17 +423,17 @@ var UnifiedWebpackPluginV4 = class {
423
423
  };
424
424
  let runtimeSetPrepared = false;
425
425
  let runtimeSetSignature;
426
- compiler.hooks.compilation.tap(_chunkVTIOEDOKjs.pluginName, () => {
426
+ compiler.hooks.compilation.tap(_chunk7K3R5LV6js.pluginName, () => {
427
427
  runtimeSetPrepared = false;
428
428
  });
429
429
  async function getClassSetInLoader() {
430
430
  if (runtimeSetPrepared) {
431
431
  return;
432
432
  }
433
- const signature = _chunkVTIOEDOKjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
433
+ const signature = _chunk7K3R5LV6js.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
434
434
  const forceRefresh = signature !== runtimeSetSignature;
435
435
  runtimeSetPrepared = true;
436
- await _chunkVTIOEDOKjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
436
+ await _chunk7K3R5LV6js.ensureRuntimeClassSet.call(void 0, runtimeState, {
437
437
  forceRefresh,
438
438
  forceCollect: true,
439
439
  clearCache: forceRefresh,
package/dist/webpack4.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  isMpx,
11
11
  patchMpxLoaderResolve,
12
12
  setupMpxTailwindcssRedirect
13
- } from "./chunk-6QU7CMAG.mjs";
13
+ } from "./chunk-GKT5AE7D.mjs";
14
14
  import {
15
15
  pushConcurrentTaskFactories,
16
16
  resolveDisabledOptions,
@@ -23,14 +23,14 @@ import {
23
23
  } from "./chunk-RRHPTTCP.mjs";
24
24
  import {
25
25
  setupPatchRecorder
26
- } from "./chunk-F6VHIO5B.mjs";
26
+ } from "./chunk-4QCL7FBX.mjs";
27
27
  import {
28
28
  createDebug,
29
29
  ensureRuntimeClassSet,
30
30
  getCompilerContext,
31
31
  getRuntimeClassSetSignature,
32
32
  pluginName
33
- } from "./chunk-Q5IGGG5W.mjs";
33
+ } from "./chunk-RXM5ERRJ.mjs";
34
34
  import "./chunk-QOTLDKI4.mjs";
35
35
  import "./chunk-3WUHHFLF.mjs";
36
36
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",