weapp-tailwindcss 4.9.5 → 4.9.6
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.
- package/dist/{chunk-4H6IVC77.js → chunk-3J6TSML5.js} +24 -24
- package/dist/{chunk-5PICNI6R.js → chunk-56QWZ2UM.js} +3 -3
- package/dist/{chunk-DCYV3N3T.mjs → chunk-6HOJUSTX.mjs} +1 -1
- package/dist/{chunk-DUNUSQPW.js → chunk-COWTRJLM.js} +2 -2
- package/dist/{chunk-EHI5UUJ2.js → chunk-F345SX2I.js} +3 -3
- package/dist/{chunk-CQSMFX4I.js → chunk-FQUFI6M7.js} +13 -13
- package/dist/{chunk-3NHQQWE3.mjs → chunk-GHWN5Y7Z.mjs} +2 -2
- package/dist/{chunk-2SD5C6P5.mjs → chunk-PUUBR36U.mjs} +2 -2
- package/dist/{chunk-H3FNFKOH.mjs → chunk-R3IC273Z.mjs} +2 -2
- package/dist/{chunk-WNFPFNXO.js → chunk-VI5WDH6L.js} +7 -7
- package/dist/{chunk-SDVCC3VG.mjs → chunk-W7ETGQW7.mjs} +1 -1
- package/dist/{chunk-CCJHSRUV.mjs → chunk-XD5AWWTB.mjs} +3 -3
- package/dist/cli.js +9 -9
- package/dist/cli.mjs +1 -1
- package/dist/core.js +8 -8
- package/dist/core.mjs +2 -2
- package/dist/gulp.js +4 -4
- package/dist/gulp.mjs +3 -3
- package/dist/index.js +7 -7
- package/dist/index.mjs +6 -6
- package/dist/vite.js +4 -4
- package/dist/vite.mjs +3 -3
- package/dist/webpack.js +5 -5
- package/dist/webpack.mjs +4 -4
- package/dist/webpack4.js +24 -24
- package/dist/webpack4.mjs +3 -3
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk56QWZ2UMjs = require('./chunk-56QWZ2UM.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
|
|
25
|
+
var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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(
|
|
54
|
+
compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
|
|
55
55
|
compilation.hooks.processAssets.tapPromise(
|
|
56
56
|
{
|
|
57
|
-
name:
|
|
57
|
+
name: _chunkCOWTRJLMjs.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
|
|
126
|
+
const runtimeSet = await _chunkCOWTRJLMjs.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 =
|
|
163
|
+
const cacheKey = _chunk56QWZ2UMjs.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 =
|
|
268
|
+
const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, appType);
|
|
269
269
|
if (shouldRewriteCssImports && isMpxApp) {
|
|
270
|
-
|
|
270
|
+
_chunk56QWZ2UMjs.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 } =
|
|
283
|
+
const { findRewriteAnchor, findClassSetAnchor } = _chunk56QWZ2UMjs.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
|
-
|
|
288
|
+
_chunk56QWZ2UMjs.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(
|
|
309
|
-
NormalModule.getCompilationHooks(compilation).loader.tap(
|
|
308
|
+
compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
|
|
309
|
+
NormalModule.getCompilationHooks(compilation).loader.tap(_chunkCOWTRJLMjs.pluginName, (_loaderContext, module) => {
|
|
310
310
|
const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
|
|
311
311
|
if (!hasRuntimeLoader) {
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
|
|
314
|
+
_chunk56QWZ2UMjs.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 =
|
|
318
|
+
const isCssModule = _chunk56QWZ2UMjs.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 && !
|
|
350
|
+
if (runtimeClassSetLoaderExists && !_chunk56QWZ2UMjs.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 =
|
|
365
|
+
var debug = _chunkCOWTRJLMjs.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 =
|
|
369
|
+
this.options = _chunkCOWTRJLMjs.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 =
|
|
385
|
+
const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, this.appType);
|
|
386
386
|
if (shouldRewriteCssImports) {
|
|
387
|
-
|
|
387
|
+
_chunk56QWZ2UMjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
|
|
388
388
|
pkgDir: weappTailwindcssPackageDir,
|
|
389
389
|
enabled: true,
|
|
390
390
|
appType: this.appType
|
|
391
391
|
});
|
|
392
|
-
|
|
392
|
+
_chunk56QWZ2UMjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
|
|
393
393
|
}
|
|
394
394
|
if (disabledOptions.plugin) {
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
|
-
const patchRecorderState =
|
|
397
|
+
const patchRecorderState = _chunkF345SX2Ijs.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
|
|
408
|
+
await _chunkCOWTRJLMjs.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
|
|
413
|
+
await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
|
|
414
414
|
}
|
|
415
415
|
onLoad();
|
|
416
416
|
setupWebpackV5Loaders({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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(
|
|
158
|
-
factory.hooks.beforeResolve.tap(
|
|
157
|
+
compiler.hooks.normalModuleFactory.tap(_chunkCOWTRJLMjs.pluginName, (factory) => {
|
|
158
|
+
factory.hooks.beforeResolve.tap(_chunkCOWTRJLMjs.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.
|
|
195
|
+
version: "4.9.6",
|
|
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",
|
|
@@ -386,7 +386,7 @@ var package_default = {
|
|
|
386
386
|
"@tailwindcss-mangle/config": "^6.1.0",
|
|
387
387
|
"@vue/compiler-dom": "catalog:vue3",
|
|
388
388
|
"@vue/compiler-sfc": "catalog:vue3",
|
|
389
|
-
"@weapp-core/escape": "~
|
|
389
|
+
"@weapp-core/escape": "~7.0.0",
|
|
390
390
|
"@weapp-core/regex": "~1.0.1",
|
|
391
391
|
"@weapp-tailwindcss/logger": "workspace:*",
|
|
392
392
|
"@weapp-tailwindcss/postcss": "workspace:*",
|
|
@@ -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
|
|
4
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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 =
|
|
11
|
+
const recorder = _chunkCOWTRJLMjs.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 ?
|
|
19
|
+
const patchPromise = patcher ? _chunkCOWTRJLMjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
|
|
20
20
|
return {
|
|
21
21
|
recorder,
|
|
22
22
|
patchPromise,
|
|
@@ -12,7 +12,7 @@ var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
|
|
|
12
12
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ var _chunkEHI5UUJ2js = require('./chunk-EHI5UUJ2.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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,
|
|
57
|
+
ms.update(start, end, _chunkCOWTRJLMjs.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 =
|
|
69
|
+
const generated = _chunkCOWTRJLMjs.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 =
|
|
98
|
+
const matchCustomAttribute = _chunkCOWTRJLMjs.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: `${
|
|
680
|
+
name: `${_chunkCOWTRJLMjs.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 =
|
|
722
|
+
var debug = _chunkCOWTRJLMjs.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 =
|
|
727
|
+
const opts = _chunkCOWTRJLMjs.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 =
|
|
753
|
-
const patchRecorderState =
|
|
752
|
+
const customAttributesEntities = _chunkCOWTRJLMjs.toCustomAttributesEntities.call(void 0, customAttributes);
|
|
753
|
+
const patchRecorderState = _chunkF345SX2Ijs.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
|
|
767
|
+
const refreshed = await _chunkCOWTRJLMjs.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 =
|
|
780
|
+
const task2 = _chunkCOWTRJLMjs.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: `${
|
|
815
|
+
name: `${_chunkCOWTRJLMjs.vitePluginName}:post`,
|
|
816
816
|
enforce: "post",
|
|
817
817
|
configResolved(config) {
|
|
818
818
|
resolvedConfig = config;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-RRHPTTCP.mjs";
|
|
13
13
|
import {
|
|
14
14
|
setupPatchRecorder
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-W7ETGQW7.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-
|
|
26
|
+
} from "./chunk-PUUBR36U.mjs";
|
|
27
27
|
import {
|
|
28
28
|
getGroupedEntries,
|
|
29
29
|
resolveUniUtsPlatform
|
|
@@ -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.
|
|
195
|
+
version: "4.9.6",
|
|
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",
|
|
@@ -386,7 +386,7 @@ var package_default = {
|
|
|
386
386
|
"@tailwindcss-mangle/config": "^6.1.0",
|
|
387
387
|
"@vue/compiler-dom": "catalog:vue3",
|
|
388
388
|
"@vue/compiler-sfc": "catalog:vue3",
|
|
389
|
-
"@weapp-core/escape": "~
|
|
389
|
+
"@weapp-core/escape": "~7.0.0",
|
|
390
390
|
"@weapp-core/regex": "~1.0.1",
|
|
391
391
|
"@weapp-tailwindcss/logger": "workspace:*",
|
|
392
392
|
"@weapp-tailwindcss/postcss": "workspace:*",
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-RRHPTTCP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
setupPatchRecorder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7ETGQW7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
collectRuntimeClassSet,
|
|
9
9
|
createDebug,
|
|
10
10
|
getCompilerContext,
|
|
11
11
|
refreshTailwindRuntimeState
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PUUBR36U.mjs";
|
|
13
13
|
|
|
14
14
|
// src/bundlers/gulp/index.ts
|
|
15
15
|
import { Buffer } from "buffer";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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 =
|
|
20
|
+
var debug = _chunkCOWTRJLMjs.createDebug.call(void 0, );
|
|
21
21
|
var Transform = _stream2.default.Transform;
|
|
22
22
|
function createPlugins(options = {}) {
|
|
23
|
-
const opts =
|
|
23
|
+
const opts = _chunkCOWTRJLMjs.getCompilerContext.call(void 0, options);
|
|
24
24
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
25
|
-
const patchRecorderState =
|
|
25
|
+
const patchRecorderState = _chunkF345SX2Ijs.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
|
|
39
|
+
await _chunkCOWTRJLMjs.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
|
|
47
|
+
runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
|
|
48
48
|
runtimeSetInitialized = true;
|
|
49
49
|
return runtimeSet;
|
|
50
50
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isMpx,
|
|
10
10
|
patchMpxLoaderResolve,
|
|
11
11
|
setupMpxTailwindcssRedirect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6HOJUSTX.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-
|
|
25
|
+
} from "./chunk-W7ETGQW7.mjs";
|
|
26
26
|
import {
|
|
27
27
|
collectRuntimeClassSet,
|
|
28
28
|
createDebug,
|
|
29
29
|
getCompilerContext,
|
|
30
30
|
pluginName,
|
|
31
31
|
refreshTailwindRuntimeState
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PUUBR36U.mjs";
|
|
33
33
|
import {
|
|
34
34
|
getGroupedEntries
|
|
35
35
|
} from "./chunk-OOHJLO5M.mjs";
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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
|
|
407
|
+
await _chunkCOWTRJLMjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
|
|
408
408
|
}
|
|
409
|
-
const recorder =
|
|
409
|
+
const recorder = _chunkCOWTRJLMjs.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
|
-
|
|
418
|
+
_chunkCOWTRJLMjs.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
|
|
549
|
+
await _chunkCOWTRJLMjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
|
|
550
550
|
}
|
|
551
|
-
const recorder =
|
|
551
|
+
const recorder = _chunkCOWTRJLMjs.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
|
-
|
|
560
|
+
_chunkCOWTRJLMjs.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,
|
|
708
|
+
if (_semver2.default.lt(_process2.default.versions.node, _chunkCOWTRJLMjs.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${
|
|
710
|
+
`You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkCOWTRJLMjs.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
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
|
|
3
|
+
var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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 =
|
|
18
|
+
const opts = _chunkCOWTRJLMjs.getCompilerContext.call(void 0, options);
|
|
19
19
|
const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
20
|
-
const patchRecorderState =
|
|
20
|
+
const patchRecorderState = _chunkF345SX2Ijs.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
|
|
32
|
+
await _chunkCOWTRJLMjs.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
|
|
41
|
+
runtimeSet = await _chunkCOWTRJLMjs.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
|
|
51
|
+
runtimeSet = await _chunkCOWTRJLMjs.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
|
|
60
|
+
runtimeSet = await _chunkCOWTRJLMjs.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-
|
|
3
|
+
} from "./chunk-W7ETGQW7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
collectRuntimeClassSet,
|
|
6
6
|
getCompilerContext,
|
|
7
7
|
refreshTailwindRuntimeState
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PUUBR36U.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
|
|
3
|
+
var _chunkVI5WDH6Ljs = require('./chunk-VI5WDH6L.js');
|
|
4
4
|
require('./chunk-LTJQUORK.js');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-F345SX2I.js');
|
|
6
|
+
require('./chunk-COWTRJLM.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 =
|
|
13
|
+
exports.createPlugins = _chunkVI5WDH6Ljs.createPlugins;
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R3IC273Z.mjs";
|
|
4
4
|
import "./chunk-RRHPTTCP.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-W7ETGQW7.mjs";
|
|
6
|
+
import "./chunk-PUUBR36U.mjs";
|
|
7
7
|
import "./chunk-7D27E7TU.mjs";
|
|
8
8
|
import "./chunk-HWF5U4CI.mjs";
|
|
9
9
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk3J6TSML5js = require('./chunk-3J6TSML5.js');
|
|
5
|
+
require('./chunk-56QWZ2UM.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkVI5WDH6Ljs = require('./chunk-VI5WDH6L.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkFQUFI6M7js = require('./chunk-FQUFI6M7.js');
|
|
12
12
|
require('./chunk-VPHA77FH.js');
|
|
13
13
|
require('./chunk-LTJQUORK.js');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-F345SX2I.js');
|
|
15
|
+
require('./chunk-COWTRJLM.js');
|
|
16
16
|
require('./chunk-4RUFPPI6.js');
|
|
17
17
|
require('./chunk-FYYBY3VK.js');
|
|
18
18
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -22,4 +22,4 @@ require('./chunk-Y6F6NBA7.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
25
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkFQUFI6M7js.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunk3J6TSML5js.UnifiedWebpackPluginV5; exports.createPlugins = _chunkVI5WDH6Ljs.createPlugins; exports.weappTailwindcssPackageDir = _chunk3J6TSML5js.weappTailwindcssPackageDir;
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-XD5AWWTB.mjs";
|
|
5
|
+
import "./chunk-6HOJUSTX.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R3IC273Z.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GHWN5Y7Z.mjs";
|
|
12
12
|
import "./chunk-F2CKKG6Q.mjs";
|
|
13
13
|
import "./chunk-RRHPTTCP.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-W7ETGQW7.mjs";
|
|
15
|
+
import "./chunk-PUUBR36U.mjs";
|
|
16
16
|
import "./chunk-7D27E7TU.mjs";
|
|
17
17
|
import "./chunk-HWF5U4CI.mjs";
|
|
18
18
|
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
|
|
3
|
+
var _chunkFQUFI6M7js = require('./chunk-FQUFI6M7.js');
|
|
4
4
|
require('./chunk-VPHA77FH.js');
|
|
5
5
|
require('./chunk-LTJQUORK.js');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-F345SX2I.js');
|
|
7
|
+
require('./chunk-COWTRJLM.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 =
|
|
14
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkFQUFI6M7js.UnifiedViteWeappTailwindcssPlugin;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedViteWeappTailwindcssPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GHWN5Y7Z.mjs";
|
|
4
4
|
import "./chunk-F2CKKG6Q.mjs";
|
|
5
5
|
import "./chunk-RRHPTTCP.mjs";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-W7ETGQW7.mjs";
|
|
7
|
+
import "./chunk-PUUBR36U.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
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk3J6TSML5js = require('./chunk-3J6TSML5.js');
|
|
5
|
+
require('./chunk-56QWZ2UM.js');
|
|
6
6
|
require('./chunk-VPHA77FH.js');
|
|
7
7
|
require('./chunk-LTJQUORK.js');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-F345SX2I.js');
|
|
9
|
+
require('./chunk-COWTRJLM.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 =
|
|
17
|
+
exports.UnifiedWebpackPluginV5 = _chunk3J6TSML5js.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunk3J6TSML5js.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-XD5AWWTB.mjs";
|
|
5
|
+
import "./chunk-6HOJUSTX.mjs";
|
|
6
6
|
import "./chunk-F2CKKG6Q.mjs";
|
|
7
7
|
import "./chunk-RRHPTTCP.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-W7ETGQW7.mjs";
|
|
9
|
+
import "./chunk-PUUBR36U.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
|
|
12
|
+
var _chunk56QWZ2UMjs = require('./chunk-56QWZ2UM.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
|
|
25
|
+
var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.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(
|
|
56
|
+
compiler.hooks.emit.tapPromise(_chunkCOWTRJLMjs.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
|
|
122
|
+
const runtimeSet = await _chunkCOWTRJLMjs.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 =
|
|
159
|
+
const cacheKey = _chunk56QWZ2UMjs.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 =
|
|
262
|
+
const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, appType);
|
|
263
263
|
if (shouldRewriteCssImports && isMpxApp) {
|
|
264
|
-
|
|
264
|
+
_chunk56QWZ2UMjs.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 } =
|
|
277
|
+
const { findRewriteAnchor, findClassSetAnchor } = _chunk56QWZ2UMjs.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
|
-
|
|
282
|
+
_chunk56QWZ2UMjs.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(
|
|
302
|
-
compilation.hooks.normalModuleLoader.tap(
|
|
301
|
+
compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
|
|
302
|
+
compilation.hooks.normalModuleLoader.tap(_chunkCOWTRJLMjs.pluginName, (_loaderContext, module) => {
|
|
303
303
|
const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
|
|
304
304
|
if (!hasRuntimeLoader) {
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
|
-
if (shouldRewriteCssImports &&
|
|
308
|
-
|
|
307
|
+
if (shouldRewriteCssImports && _chunk56QWZ2UMjs.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
|
|
308
|
+
_chunk56QWZ2UMjs.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 =
|
|
313
|
+
const isCssModule = _chunk56QWZ2UMjs.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 && !
|
|
347
|
+
if (runtimeClassSetLoaderExists && !_chunk56QWZ2UMjs.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 =
|
|
361
|
+
var debug = _chunkCOWTRJLMjs.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 =
|
|
365
|
+
this.options = _chunkCOWTRJLMjs.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 =
|
|
381
|
+
const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, this.appType);
|
|
382
382
|
if (shouldRewriteCssImports) {
|
|
383
|
-
|
|
383
|
+
_chunk56QWZ2UMjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
|
|
384
384
|
pkgDir: weappTailwindcssPackageDir,
|
|
385
385
|
enabled: true,
|
|
386
386
|
appType: this.appType
|
|
387
387
|
});
|
|
388
|
-
|
|
388
|
+
_chunk56QWZ2UMjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
|
|
389
389
|
}
|
|
390
390
|
if (disabledOptions.plugin) {
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
|
-
const patchRecorderState =
|
|
393
|
+
const patchRecorderState = _chunkF345SX2Ijs.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
|
|
404
|
+
await _chunkCOWTRJLMjs.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
|
|
409
|
+
await _chunkCOWTRJLMjs.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-
|
|
12
|
+
} from "./chunk-6HOJUSTX.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-
|
|
25
|
+
} from "./chunk-W7ETGQW7.mjs";
|
|
26
26
|
import {
|
|
27
27
|
collectRuntimeClassSet,
|
|
28
28
|
createDebug,
|
|
29
29
|
getCompilerContext,
|
|
30
30
|
pluginName,
|
|
31
31
|
refreshTailwindRuntimeState
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PUUBR36U.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
|
+
"version": "4.9.6",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"@tailwindcss-mangle/config": "^6.1.0",
|
|
171
171
|
"@vue/compiler-dom": "^3.5.27",
|
|
172
172
|
"@vue/compiler-sfc": "^3.5.27",
|
|
173
|
-
"@weapp-core/escape": "~
|
|
173
|
+
"@weapp-core/escape": "~7.0.0",
|
|
174
174
|
"@weapp-core/regex": "~1.0.1",
|
|
175
175
|
"cac": "^6.7.14",
|
|
176
176
|
"debug": "~4.4.3",
|
|
@@ -185,7 +185,7 @@
|
|
|
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.
|
|
188
|
+
"@weapp-tailwindcss/postcss": "2.1.3",
|
|
189
189
|
"@weapp-tailwindcss/shared": "1.1.2"
|
|
190
190
|
},
|
|
191
191
|
"scripts": {
|