weapp-tailwindcss 4.11.0-alpha.3 → 4.11.0-alpha.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.
- package/dist/{chunk-EW2K6CO5.mjs → chunk-3V52XTPJ.mjs} +14 -1
- package/dist/{chunk-NYDCSSXH.mjs → chunk-6R2OVCLW.mjs} +3 -3
- package/dist/{chunk-5KSBT6GU.js → chunk-FI75TLOQ.js} +14 -1
- package/dist/{chunk-APTYSWEQ.js → chunk-GCZ7ZE7V.js} +31 -31
- package/dist/{chunk-CBZ7BRNV.js → chunk-JKK5KZCN.js} +3 -3
- package/dist/{chunk-NAW56TSQ.mjs → chunk-JOT24YET.mjs} +2 -2
- package/dist/{chunk-KIEB7M3C.js → chunk-N3RT3VZH.js} +25 -25
- package/dist/{chunk-SRMDDOZQ.mjs → chunk-NYZTRTBM.mjs} +2 -2
- package/dist/{chunk-DFHWHTMB.mjs → chunk-TDHY27WS.mjs} +1 -1
- package/dist/{chunk-JS74G7LK.js → chunk-VHUV7ZDB.js} +6 -6
- package/dist/{chunk-V3CX3X6I.js → chunk-VO2ZPNCW.js} +14 -14
- package/dist/{chunk-QO7CF2RF.mjs → chunk-ZPGT5C7G.mjs} +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +7 -7
- 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/presets.js +54 -6
- package/dist/presets.mjs +50 -2
- 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 +26 -26
- package/dist/webpack4.mjs +3 -3
- package/package.json +3 -3
|
@@ -1035,6 +1035,18 @@ function isTailwindcss4Package(packageName) {
|
|
|
1035
1035
|
packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4"))
|
|
1036
1036
|
);
|
|
1037
1037
|
}
|
|
1038
|
+
function resolveExplicitTailwindVersion(configuredVersion, configuredPackageName) {
|
|
1039
|
+
if (typeof configuredVersion === "number") {
|
|
1040
|
+
return configuredVersion;
|
|
1041
|
+
}
|
|
1042
|
+
if (configuredPackageName === "tailwindcss") {
|
|
1043
|
+
return 3;
|
|
1044
|
+
}
|
|
1045
|
+
if (isTailwindcss4Package(configuredPackageName)) {
|
|
1046
|
+
return 4;
|
|
1047
|
+
}
|
|
1048
|
+
return void 0;
|
|
1049
|
+
}
|
|
1038
1050
|
function hasOwnV4Signal(value) {
|
|
1039
1051
|
return typeof value === "object" && value !== null && "v4" in value;
|
|
1040
1052
|
}
|
|
@@ -1091,8 +1103,9 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
1091
1103
|
);
|
|
1092
1104
|
const configuredPackageName = tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwind?.packageName || tailwindcssPatcherOptions?.patch?.tailwindcss?.packageName;
|
|
1093
1105
|
const configuredVersion = tailwindcss?.version || tailwindcssPatcherOptions?.tailwindcss?.version || tailwindcssPatcherOptions?.tailwind?.version || tailwindcssPatcherOptions?.patch?.tailwindcss?.version || mergedTailwindOptions.version;
|
|
1106
|
+
const explicitTailwindVersion = resolveExplicitTailwindVersion(configuredVersion, configuredPackageName);
|
|
1094
1107
|
const hasExplicitV4Signals = hasCssEntries || hasOwnV4Signal(tailwindcss) || hasOwnV4Signal(tailwindcssPatcherOptions?.tailwindcss) || hasOwnV4Signal(tailwindcssPatcherOptions?.tailwind) || hasOwnV4Signal(tailwindcssPatcherOptions?.patch?.tailwindcss);
|
|
1095
|
-
const isV4 =
|
|
1108
|
+
const isV4 = explicitTailwindVersion === 3 ? false : explicitTailwindVersion === 4 || explicitTailwindVersion === void 0 && (mergedTailwindOptions.version === 4 || isTailwindcss4Package(configuredPackageName ?? mergedTailwindOptions.packageName) || hasExplicitV4Signals);
|
|
1096
1109
|
const tailwindPackageConfigured = Boolean(configuredPackageName);
|
|
1097
1110
|
const shouldPatchV4PostcssPackage = isV4 && !tailwindPackageConfigured;
|
|
1098
1111
|
const packageCandidates = /* @__PURE__ */ new Set();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
isMpx,
|
|
12
12
|
patchMpxLoaderResolve,
|
|
13
13
|
setupMpxTailwindcssRedirect
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZPGT5C7G.mjs";
|
|
15
15
|
import {
|
|
16
16
|
pushConcurrentTaskFactories,
|
|
17
17
|
resolveDisabledOptions,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
getCompilerContext,
|
|
29
29
|
pluginName,
|
|
30
30
|
setupPatchRecorder
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JOT24YET.mjs";
|
|
32
32
|
import {
|
|
33
33
|
getRuntimeClassSetSignature,
|
|
34
34
|
resolveTailwindcssOptions
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-3V52XTPJ.mjs";
|
|
36
36
|
import {
|
|
37
37
|
getGroupedEntries
|
|
38
38
|
} from "./chunk-OOHJLO5M.mjs";
|
|
@@ -1038,6 +1038,18 @@ function isTailwindcss4Package(packageName) {
|
|
|
1038
1038
|
packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4"))
|
|
1039
1039
|
);
|
|
1040
1040
|
}
|
|
1041
|
+
function resolveExplicitTailwindVersion(configuredVersion, configuredPackageName) {
|
|
1042
|
+
if (typeof configuredVersion === "number") {
|
|
1043
|
+
return configuredVersion;
|
|
1044
|
+
}
|
|
1045
|
+
if (configuredPackageName === "tailwindcss") {
|
|
1046
|
+
return 3;
|
|
1047
|
+
}
|
|
1048
|
+
if (isTailwindcss4Package(configuredPackageName)) {
|
|
1049
|
+
return 4;
|
|
1050
|
+
}
|
|
1051
|
+
return void 0;
|
|
1052
|
+
}
|
|
1041
1053
|
function hasOwnV4Signal(value) {
|
|
1042
1054
|
return typeof value === "object" && value !== null && "v4" in value;
|
|
1043
1055
|
}
|
|
@@ -1094,8 +1106,9 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
1094
1106
|
);
|
|
1095
1107
|
const configuredPackageName = _optionalChain([tailwindcss, 'optionalAccess', _86 => _86.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _87 => _87.tailwindcss, 'optionalAccess', _88 => _88.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _89 => _89.tailwind, 'optionalAccess', _90 => _90.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _91 => _91.patch, 'optionalAccess', _92 => _92.tailwindcss, 'optionalAccess', _93 => _93.packageName]);
|
|
1096
1108
|
const configuredVersion = _optionalChain([tailwindcss, 'optionalAccess', _94 => _94.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _95 => _95.tailwindcss, 'optionalAccess', _96 => _96.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _97 => _97.tailwind, 'optionalAccess', _98 => _98.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _99 => _99.patch, 'optionalAccess', _100 => _100.tailwindcss, 'optionalAccess', _101 => _101.version]) || mergedTailwindOptions.version;
|
|
1109
|
+
const explicitTailwindVersion = resolveExplicitTailwindVersion(configuredVersion, configuredPackageName);
|
|
1097
1110
|
const hasExplicitV4Signals = hasCssEntries || hasOwnV4Signal(tailwindcss) || hasOwnV4Signal(_optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _102 => _102.tailwindcss])) || hasOwnV4Signal(_optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _103 => _103.tailwind])) || hasOwnV4Signal(_optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _104 => _104.patch, 'optionalAccess', _105 => _105.tailwindcss]));
|
|
1098
|
-
const isV4 =
|
|
1111
|
+
const isV4 = explicitTailwindVersion === 3 ? false : explicitTailwindVersion === 4 || explicitTailwindVersion === void 0 && (mergedTailwindOptions.version === 4 || isTailwindcss4Package(_nullishCoalesce(configuredPackageName, () => ( mergedTailwindOptions.packageName))) || hasExplicitV4Signals);
|
|
1099
1112
|
const tailwindPackageConfigured = Boolean(configuredPackageName);
|
|
1100
1113
|
const shouldPatchV4PostcssPackage = isV4 && !tailwindPackageConfigured;
|
|
1101
1114
|
const packageCandidates = /* @__PURE__ */ new Set();
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkJKK5KZCNjs = require('./chunk-JKK5KZCN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -28,11 +28,11 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkVO2ZPNCWjs = require('./chunk-VO2ZPNCW.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkFI75TLOQjs = require('./chunk-FI75TLOQ.js');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
@@ -63,10 +63,10 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
63
63
|
const { Compilation, sources } = compiler.webpack;
|
|
64
64
|
const { ConcatSource } = sources;
|
|
65
65
|
const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
66
|
-
compiler.hooks.compilation.tap(
|
|
66
|
+
compiler.hooks.compilation.tap(_chunkVO2ZPNCWjs.pluginName, (compilation) => {
|
|
67
67
|
compilation.hooks.processAssets.tapPromise(
|
|
68
68
|
{
|
|
69
|
-
name:
|
|
69
|
+
name: _chunkVO2ZPNCWjs.pluginName,
|
|
70
70
|
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
|
|
71
71
|
},
|
|
72
72
|
async (assets) => {
|
|
@@ -78,7 +78,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
78
78
|
compilerOptions.cache.calcHashValueChanged(chunk.id, chunk.hash);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const assetHashByChunk =
|
|
81
|
+
const assetHashByChunk = _chunkJKK5KZCNjs.createAssetHashByChunkMap.call(void 0, compilation.chunks);
|
|
82
82
|
const entries = Object.entries(assets);
|
|
83
83
|
const compilerOutputPath = _nullishCoalesce(_optionalChain([compilation, 'access', _ => _.compiler, 'optionalAccess', _2 => _2.outputPath]), () => ( compiler.outputPath));
|
|
84
84
|
const outputDir = compilerOutputPath ? _path2.default.resolve(compilerOutputPath) : _nullishCoalesce(_optionalChain([compilation, 'access', _3 => _3.outputOptions, 'optionalAccess', _4 => _4.path]), () => ( _process2.default.cwd()));
|
|
@@ -157,7 +157,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
157
157
|
const staleClassNameFallback = resolveWebpackStaleClassNameFallback(compilerOptions.staleClassNameFallback, compiler);
|
|
158
158
|
const forceRuntimeRefresh = getRuntimeRefreshRequirement();
|
|
159
159
|
debug2("processAssets ensure runtime set forceRefresh=%s major=%s", forceRuntimeRefresh, _nullishCoalesce(runtimeState.twPatcher.majorVersion, () => ( "unknown")));
|
|
160
|
-
const runtimeSet = await
|
|
160
|
+
const runtimeSet = await _chunkVO2ZPNCWjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
161
161
|
forceRefresh: forceRuntimeRefresh,
|
|
162
162
|
// webpack 的 script-only 热更新可能不会触发 runtime classset loader,
|
|
163
163
|
// 这里强制收集可避免沿用上轮 class set,保证 JS 仅按最新集合精确命中。
|
|
@@ -207,7 +207,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
207
207
|
const jsTaskFactories = [];
|
|
208
208
|
if (Array.isArray(groupedEntries.js)) {
|
|
209
209
|
for (const [file] of groupedEntries.js) {
|
|
210
|
-
const cacheKey =
|
|
210
|
+
const cacheKey = _chunkJKK5KZCNjs.getCacheKey.call(void 0, file);
|
|
211
211
|
const asset = compilation.getAsset(file);
|
|
212
212
|
if (!asset) {
|
|
213
213
|
continue;
|
|
@@ -313,9 +313,9 @@ function setupWebpackV5Loaders(options) {
|
|
|
313
313
|
getRuntimeWatchDependencies,
|
|
314
314
|
debug: debug2
|
|
315
315
|
} = options;
|
|
316
|
-
const isMpxApp =
|
|
316
|
+
const isMpxApp = _chunkJKK5KZCNjs.isMpx.call(void 0, appType);
|
|
317
317
|
if (shouldRewriteCssImports && isMpxApp) {
|
|
318
|
-
|
|
318
|
+
_chunkJKK5KZCNjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
|
|
319
319
|
}
|
|
320
320
|
const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
|
|
321
321
|
const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
|
|
@@ -329,12 +329,12 @@ function setupWebpackV5Loaders(options) {
|
|
|
329
329
|
getClassSet: getClassSetInLoader,
|
|
330
330
|
getWatchDependencies: getRuntimeWatchDependencies
|
|
331
331
|
};
|
|
332
|
-
const { findRewriteAnchor, findClassSetAnchor } =
|
|
332
|
+
const { findRewriteAnchor, findClassSetAnchor } = _chunkJKK5KZCNjs.createLoaderAnchorFinders.call(void 0, appType);
|
|
333
333
|
const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
|
|
334
334
|
rewriteCssImports: runtimeLoaderRewriteOptions
|
|
335
335
|
} : void 0;
|
|
336
336
|
if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
|
|
337
|
-
|
|
337
|
+
_chunkJKK5KZCNjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
|
|
338
338
|
}
|
|
339
339
|
const createRuntimeClassSetLoaderEntry = () => ({
|
|
340
340
|
loader: runtimeClassSetLoader,
|
|
@@ -354,17 +354,17 @@ function setupWebpackV5Loaders(options) {
|
|
|
354
354
|
};
|
|
355
355
|
};
|
|
356
356
|
const { NormalModule } = compiler.webpack;
|
|
357
|
-
compiler.hooks.compilation.tap(
|
|
358
|
-
NormalModule.getCompilationHooks(compilation).loader.tap(
|
|
357
|
+
compiler.hooks.compilation.tap(_chunkVO2ZPNCWjs.pluginName, (compilation) => {
|
|
358
|
+
NormalModule.getCompilationHooks(compilation).loader.tap(_chunkVO2ZPNCWjs.pluginName, (_loaderContext, module) => {
|
|
359
359
|
const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
|
|
360
360
|
if (!hasRuntimeLoader) {
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
_chunkJKK5KZCNjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
|
|
364
364
|
const loaderEntries = module.loaders || [];
|
|
365
365
|
let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
366
366
|
const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
|
|
367
|
-
const isCssModule =
|
|
367
|
+
const isCssModule = _chunkJKK5KZCNjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
|
|
368
368
|
if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
|
|
369
369
|
debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
|
|
370
370
|
}
|
|
@@ -396,7 +396,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
396
396
|
rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
if (runtimeClassSetLoaderExists && !
|
|
399
|
+
if (runtimeClassSetLoaderExists && !_chunkJKK5KZCNjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
|
|
400
400
|
const classSetLoaderEntry = createRuntimeClassSetLoaderEntry();
|
|
401
401
|
const anchorIndex = findClassSetAnchor(loaderEntries);
|
|
402
402
|
if (anchorIndex === -1) {
|
|
@@ -411,11 +411,11 @@ function setupWebpackV5Loaders(options) {
|
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
// src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
|
|
414
|
-
var debug =
|
|
414
|
+
var debug = _chunkVO2ZPNCWjs.createDebug.call(void 0, );
|
|
415
415
|
var weappTailwindcssPackageDir = _chunk7LKMJZD2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
|
|
416
416
|
var UnifiedWebpackPluginV5 = class {
|
|
417
417
|
constructor(options = {}) {
|
|
418
|
-
this.options =
|
|
418
|
+
this.options = _chunkVO2ZPNCWjs.getCompilerContext.call(void 0, options);
|
|
419
419
|
this.appType = this.options.appType;
|
|
420
420
|
}
|
|
421
421
|
apply(compiler) {
|
|
@@ -431,19 +431,19 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
431
431
|
const disabledOptions = _chunk7LKMJZD2js.resolveDisabledOptions.call(void 0, disabled);
|
|
432
432
|
const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
|
|
433
433
|
const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
|
|
434
|
-
const isMpxApp =
|
|
434
|
+
const isMpxApp = _chunkJKK5KZCNjs.isMpx.call(void 0, this.appType);
|
|
435
435
|
if (shouldRewriteCssImports) {
|
|
436
|
-
|
|
436
|
+
_chunkJKK5KZCNjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
|
|
437
437
|
pkgDir: weappTailwindcssPackageDir,
|
|
438
438
|
enabled: true,
|
|
439
439
|
appType: this.appType
|
|
440
440
|
});
|
|
441
|
-
|
|
441
|
+
_chunkJKK5KZCNjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
|
|
442
442
|
}
|
|
443
443
|
if (disabledOptions.plugin) {
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
|
-
const patchRecorderState =
|
|
446
|
+
const patchRecorderState = _chunkVO2ZPNCWjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
|
|
447
447
|
source: "runtime",
|
|
448
448
|
cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
449
449
|
});
|
|
@@ -462,7 +462,7 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
462
462
|
const updateRuntimeWatchDependencies = async () => {
|
|
463
463
|
runtimeWatchDependencyFiles.clear();
|
|
464
464
|
runtimeWatchDependencyContexts.clear();
|
|
465
|
-
const tailwindOptions =
|
|
465
|
+
const tailwindOptions = _chunkFI75TLOQjs.resolveTailwindcssOptions.call(void 0, runtimeState.twPatcher.options);
|
|
466
466
|
if (_optionalChain([tailwindOptions, 'optionalAccess', _13 => _13.config])) {
|
|
467
467
|
runtimeWatchDependencyFiles.add(tailwindOptions.config);
|
|
468
468
|
}
|
|
@@ -501,31 +501,31 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
501
501
|
runtimeMetadataPrepared = true;
|
|
502
502
|
};
|
|
503
503
|
const syncRuntimeRefreshRequirement = () => {
|
|
504
|
-
runtimeRefreshRequiredForCompilation = runtimeRefreshRequiredForCompilation ||
|
|
504
|
+
runtimeRefreshRequiredForCompilation = runtimeRefreshRequiredForCompilation || _chunkJKK5KZCNjs.hasWatchChanges.call(void 0, compiler);
|
|
505
505
|
};
|
|
506
506
|
const resetRuntimePreparation = () => {
|
|
507
507
|
runtimeSetPrepared = false;
|
|
508
508
|
runtimeMetadataPrepared = false;
|
|
509
509
|
syncRuntimeRefreshRequirement();
|
|
510
510
|
};
|
|
511
|
-
_optionalChain([compiler, 'access', _20 => _20.hooks, 'access', _21 => _21.invalid, 'optionalAccess', _22 => _22.tap, 'optionalCall', _23 => _23(
|
|
511
|
+
_optionalChain([compiler, 'access', _20 => _20.hooks, 'access', _21 => _21.invalid, 'optionalAccess', _22 => _22.tap, 'optionalCall', _23 => _23(_chunkVO2ZPNCWjs.pluginName, () => {
|
|
512
512
|
runtimeRefreshRequiredForCompilation = true;
|
|
513
513
|
})]);
|
|
514
|
-
_optionalChain([compiler, 'access', _24 => _24.hooks, 'access', _25 => _25.watchRun, 'optionalAccess', _26 => _26.tap, 'optionalCall', _27 => _27(
|
|
514
|
+
_optionalChain([compiler, 'access', _24 => _24.hooks, 'access', _25 => _25.watchRun, 'optionalAccess', _26 => _26.tap, 'optionalCall', _27 => _27(_chunkVO2ZPNCWjs.pluginName, syncRuntimeRefreshRequirement)]);
|
|
515
515
|
if (_optionalChain([compiler, 'access', _28 => _28.hooks, 'access', _29 => _29.thisCompilation, 'optionalAccess', _30 => _30.tap])) {
|
|
516
|
-
compiler.hooks.thisCompilation.tap(
|
|
516
|
+
compiler.hooks.thisCompilation.tap(_chunkVO2ZPNCWjs.pluginName, resetRuntimePreparation);
|
|
517
517
|
} else if (_optionalChain([compiler, 'access', _31 => _31.hooks, 'access', _32 => _32.compilation, 'optionalAccess', _33 => _33.tap])) {
|
|
518
|
-
compiler.hooks.compilation.tap(
|
|
518
|
+
compiler.hooks.compilation.tap(_chunkVO2ZPNCWjs.pluginName, resetRuntimePreparation);
|
|
519
519
|
}
|
|
520
520
|
async function getClassSetInLoader() {
|
|
521
521
|
if (runtimeSetPrepared) {
|
|
522
522
|
return;
|
|
523
523
|
}
|
|
524
|
-
const signature =
|
|
524
|
+
const signature = _chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
|
|
525
525
|
const forceRefresh = runtimeRefreshRequiredForCompilation || signature !== runtimeSetSignature;
|
|
526
526
|
debug("runtime loader ensure class set forceRefresh=%s watchDirty=%s signatureChanged=%s", forceRefresh, runtimeRefreshRequiredForCompilation, signature !== runtimeSetSignature);
|
|
527
527
|
runtimeSetPrepared = true;
|
|
528
|
-
await
|
|
528
|
+
await _chunkVO2ZPNCWjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
529
529
|
forceRefresh,
|
|
530
530
|
forceCollect: true,
|
|
531
531
|
clearCache: forceRefresh,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunk7LKMJZD2js = require('./chunk-7LKMJZD2.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVO2ZPNCWjs = require('./chunk-VO2ZPNCW.js');
|
|
7
7
|
|
|
8
8
|
// src/shared/mpx.ts
|
|
9
9
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -155,8 +155,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
|
|
|
155
155
|
if (!options.enabled) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
compiler.hooks.normalModuleFactory.tap(
|
|
159
|
-
factory.hooks.beforeResolve.tap(
|
|
158
|
+
compiler.hooks.normalModuleFactory.tap(_chunkVO2ZPNCWjs.pluginName, (factory) => {
|
|
159
|
+
factory.hooks.beforeResolve.tap(_chunkVO2ZPNCWjs.pluginName, (data) => {
|
|
160
160
|
rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
|
|
161
161
|
});
|
|
162
162
|
});
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
invalidateRuntimeClassSet,
|
|
8
8
|
logger,
|
|
9
9
|
warnMissingCssEntries
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3V52XTPJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getDefaultOptions
|
|
13
13
|
} from "./chunk-23K4XDKF.mjs";
|
|
@@ -422,7 +422,7 @@ import { logger as logger2 } from "@weapp-tailwindcss/logger";
|
|
|
422
422
|
// package.json
|
|
423
423
|
var package_default = {
|
|
424
424
|
name: "weapp-tailwindcss",
|
|
425
|
-
version: "4.11.0-alpha.
|
|
425
|
+
version: "4.11.0-alpha.4",
|
|
426
426
|
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!",
|
|
427
427
|
author: "ice breaker <1324318532@qq.com>",
|
|
428
428
|
license: "MIT",
|
|
@@ -23,13 +23,13 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkVO2ZPNCWjs = require('./chunk-VO2ZPNCW.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkFI75TLOQjs = require('./chunk-FI75TLOQ.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
@@ -64,7 +64,7 @@ function updateStaticAttribute(ms, prop) {
|
|
|
64
64
|
const start = prop.value.loc.start.offset + 1;
|
|
65
65
|
const end = prop.value.loc.end.offset - 1;
|
|
66
66
|
if (start < end) {
|
|
67
|
-
ms.update(start, end,
|
|
67
|
+
ms.update(start, end, _chunkVO2ZPNCWjs.replaceWxml.call(void 0, prop.value.content));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
|
|
@@ -76,7 +76,7 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
|
|
|
76
76
|
if (start >= end) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
const generated =
|
|
79
|
+
const generated = _chunkVO2ZPNCWjs.generateCode.call(void 0, prop.exp.content, {
|
|
80
80
|
jsHandler,
|
|
81
81
|
runtimeSet,
|
|
82
82
|
wrapExpression: true
|
|
@@ -106,7 +106,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
|
|
109
|
-
const matchCustomAttribute =
|
|
109
|
+
const matchCustomAttribute = _chunkVO2ZPNCWjs.createAttributeMatcher.call(void 0, customAttributesEntities);
|
|
110
110
|
const ms = new (0, _magicstring2.default)(code);
|
|
111
111
|
const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
|
|
112
112
|
if (errors.length === 0) {
|
|
@@ -530,14 +530,14 @@ function createHtmlRuntimeAffectingSignature(source) {
|
|
|
530
530
|
}
|
|
531
531
|
function createJsRuntimeAffectingSignature(source) {
|
|
532
532
|
try {
|
|
533
|
-
const ast =
|
|
533
|
+
const ast = _chunkVO2ZPNCWjs.babelParse.call(void 0, source, {
|
|
534
534
|
cache: true,
|
|
535
535
|
cacheKey: "vite-runtime-affecting:unambiguous",
|
|
536
536
|
plugins: ["jsx", "typescript"],
|
|
537
537
|
sourceType: "unambiguous"
|
|
538
538
|
});
|
|
539
539
|
const parts = [];
|
|
540
|
-
|
|
540
|
+
_chunkVO2ZPNCWjs.traverse.call(void 0, ast, {
|
|
541
541
|
noScope: true,
|
|
542
542
|
StringLiteral(path5) {
|
|
543
543
|
parts.push(`s:${path5.node.value}`);
|
|
@@ -992,7 +992,7 @@ function createGenerateBundleHook(context) {
|
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
994
|
debug3("get runtimeSet, class count: %d", runtime.size);
|
|
995
|
-
const runtimeSignature = _nullishCoalesce(
|
|
995
|
+
const runtimeSignature = _nullishCoalesce(_chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher), () => ( "runtime:missing"));
|
|
996
996
|
const handleLinkedUpdate = (fileName, previous, next) => {
|
|
997
997
|
onUpdate(fileName, previous, next);
|
|
998
998
|
debug3("js linked handle: %s", fileName);
|
|
@@ -1319,7 +1319,7 @@ var _module = require('module');
|
|
|
1319
1319
|
|
|
1320
1320
|
|
|
1321
1321
|
var _tailwindcsspatch = require('tailwindcss-patch');
|
|
1322
|
-
var debug =
|
|
1322
|
+
var debug = _chunkVO2ZPNCWjs.createDebug.call(void 0, "[vite:runtime-set] ");
|
|
1323
1323
|
var require2 = _module.createRequire.call(void 0, _chunkCRDOWYG4js.importMetaUrl);
|
|
1324
1324
|
var EXTENSION_DOT_PREFIX_RE = /^\./;
|
|
1325
1325
|
var VALIDATION_FILE_NAME = "runtime-candidates.html";
|
|
@@ -1337,7 +1337,7 @@ function isPostcssPluginImportTarget(value) {
|
|
|
1337
1337
|
return value === "@tailwindcss/postcss" || value === "@tailwindcss/postcss7-compat" || value.includes("/postcss");
|
|
1338
1338
|
}
|
|
1339
1339
|
function resolveTailwindCssImportTarget(patcher) {
|
|
1340
|
-
const tailwindOptions =
|
|
1340
|
+
const tailwindOptions = _chunkFI75TLOQjs.resolveTailwindcssOptions.call(void 0, patcher.options);
|
|
1341
1341
|
const cssEntries = _optionalChain([tailwindOptions, 'optionalAccess', _31 => _31.v4, 'optionalAccess', _32 => _32.cssEntries, 'optionalAccess', _33 => _33.filter, 'call', _34 => _34((item) => typeof item === "string" && item.length > 0)]);
|
|
1342
1342
|
if (cssEntries && cssEntries.length > 0) {
|
|
1343
1343
|
return createCssImportSource(cssEntries);
|
|
@@ -1380,7 +1380,7 @@ function resolveMaybeAbsolute(base, value) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
async function resolveTailwindCssSource(patcher) {
|
|
1382
1382
|
const projectRoot = getProjectRoot(patcher);
|
|
1383
|
-
const tailwindOptions =
|
|
1383
|
+
const tailwindOptions = _chunkFI75TLOQjs.resolveTailwindcssOptions.call(void 0, patcher.options);
|
|
1384
1384
|
const configuredBase = resolveMaybeAbsolute(projectRoot, _optionalChain([tailwindOptions, 'optionalAccess', _40 => _40.v4, 'optionalAccess', _41 => _41.base]));
|
|
1385
1385
|
const configDir = _optionalChain([tailwindOptions, 'optionalAccess', _42 => _42.config]) ? _path2.default.dirname(tailwindOptions.config) : void 0;
|
|
1386
1386
|
const sharedFallbacks = [
|
|
@@ -1586,7 +1586,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
1586
1586
|
return candidates;
|
|
1587
1587
|
}
|
|
1588
1588
|
async function sync(patcher, snapshot) {
|
|
1589
|
-
const nextSignature = _nullishCoalesce(
|
|
1589
|
+
const nextSignature = _nullishCoalesce(_chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, patcher), () => ( "runtime:missing"));
|
|
1590
1590
|
const runtimeEntries = createRuntimeEntries(snapshot);
|
|
1591
1591
|
const runtimeEntriesByFile = new Map(runtimeEntries.map((entry) => [entry.file, entry]));
|
|
1592
1592
|
const currentRuntimeFiles = new Set(runtimeEntriesByFile.keys());
|
|
@@ -1690,7 +1690,7 @@ function createRewriteCssImportsPlugins(options) {
|
|
|
1690
1690
|
const { appType, weappTailwindcssDirPosix: weappTailwindcssDirPosix2 } = options;
|
|
1691
1691
|
return [
|
|
1692
1692
|
{
|
|
1693
|
-
name: `${
|
|
1693
|
+
name: `${_chunkVO2ZPNCWjs.vitePluginName}:rewrite-css-imports`,
|
|
1694
1694
|
enforce: "pre",
|
|
1695
1695
|
resolveId: {
|
|
1696
1696
|
order: "pre",
|
|
@@ -1732,7 +1732,7 @@ function createRewriteCssImportsPlugins(options) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
1734
|
// src/bundlers/vite/index.ts
|
|
1735
|
-
var debug2 =
|
|
1735
|
+
var debug2 = _chunkVO2ZPNCWjs.createDebug.call(void 0, );
|
|
1736
1736
|
var weappTailwindcssPackageDir = _chunk7LKMJZD2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
|
|
1737
1737
|
var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
|
|
1738
1738
|
var PACKAGE_JSON_FILE = "package.json";
|
|
@@ -1751,11 +1751,11 @@ function resolveImplicitTailwindcssBasedirFromViteRoot(root) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
current = parent;
|
|
1753
1753
|
}
|
|
1754
|
-
const tailwindConfigPath =
|
|
1754
|
+
const tailwindConfigPath = _chunkFI75TLOQjs.findTailwindConfig.call(void 0, searchRoots);
|
|
1755
1755
|
if (tailwindConfigPath) {
|
|
1756
1756
|
return _path2.default.dirname(tailwindConfigPath);
|
|
1757
1757
|
}
|
|
1758
|
-
const packageRoot =
|
|
1758
|
+
const packageRoot = _chunkFI75TLOQjs.findNearestPackageRoot.call(void 0, resolvedRoot);
|
|
1759
1759
|
if (packageRoot && _fs.existsSync.call(void 0, _path2.default.join(packageRoot, PACKAGE_JSON_FILE))) {
|
|
1760
1760
|
return packageRoot;
|
|
1761
1761
|
}
|
|
@@ -1764,7 +1764,7 @@ function resolveImplicitTailwindcssBasedirFromViteRoot(root) {
|
|
|
1764
1764
|
function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
1765
1765
|
const rewriteCssImportsSpecified = Object.hasOwn(options, "rewriteCssImports");
|
|
1766
1766
|
const hasExplicitTailwindcssBasedir = typeof options.tailwindcssBasedir === "string" && options.tailwindcssBasedir.trim().length > 0;
|
|
1767
|
-
const opts =
|
|
1767
|
+
const opts = _chunkVO2ZPNCWjs.getCompilerContext.call(void 0, options);
|
|
1768
1768
|
const {
|
|
1769
1769
|
disabled,
|
|
1770
1770
|
customAttributes,
|
|
@@ -1789,8 +1789,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1789
1789
|
if (disabledOptions.plugin) {
|
|
1790
1790
|
return rewritePlugins.length ? rewritePlugins : void 0;
|
|
1791
1791
|
}
|
|
1792
|
-
const customAttributesEntities =
|
|
1793
|
-
const patchRecorderState =
|
|
1792
|
+
const customAttributesEntities = _chunkVO2ZPNCWjs.toCustomAttributesEntities.call(void 0, customAttributes);
|
|
1793
|
+
const patchRecorderState = _chunkVO2ZPNCWjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
1794
1794
|
source: "runtime",
|
|
1795
1795
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
1796
1796
|
});
|
|
@@ -1807,8 +1807,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1807
1807
|
let runtimeRefreshOptionsKey;
|
|
1808
1808
|
const bundleRuntimeClassSetManager = createBundleRuntimeClassSetManager();
|
|
1809
1809
|
function resolveRuntimeRefreshOptions() {
|
|
1810
|
-
const configPath = _optionalChain([
|
|
1811
|
-
const signature =
|
|
1810
|
+
const configPath = _optionalChain([_chunkFI75TLOQjs.resolveTailwindcssOptions.call(void 0, runtimeState.twPatcher.options), 'optionalAccess', _51 => _51.config]);
|
|
1811
|
+
const signature = _chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
|
|
1812
1812
|
const optionsKey = JSON.stringify({
|
|
1813
1813
|
appType,
|
|
1814
1814
|
uniAppX: Boolean(uniAppX),
|
|
@@ -1829,7 +1829,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1829
1829
|
async function refreshRuntimeState(force) {
|
|
1830
1830
|
const invalidation = resolveRuntimeRefreshOptions();
|
|
1831
1831
|
const shouldRefresh = force || invalidation.changed;
|
|
1832
|
-
const refreshed = await
|
|
1832
|
+
const refreshed = await _chunkVO2ZPNCWjs.refreshTailwindRuntimeState.call(void 0, runtimeState, {
|
|
1833
1833
|
force: shouldRefresh,
|
|
1834
1834
|
clearCache: force || invalidation.changed
|
|
1835
1835
|
});
|
|
@@ -1850,7 +1850,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
if (forceRuntimeRefresh || !runtimeSetPromise) {
|
|
1852
1852
|
const invalidation = resolveRuntimeRefreshOptions();
|
|
1853
|
-
const task2 =
|
|
1853
|
+
const task2 = _chunkVO2ZPNCWjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
|
|
1854
1854
|
force: forceRuntimeRefresh || invalidation.changed,
|
|
1855
1855
|
skipRefresh: forceRuntimeRefresh,
|
|
1856
1856
|
clearCache: forceRuntimeRefresh || invalidation.changed
|
|
@@ -1892,7 +1892,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1892
1892
|
if (!forceRuntimeRefresh && !invalidation.changed && !forceCollectBySource && runtimeSet) {
|
|
1893
1893
|
return runtimeSet;
|
|
1894
1894
|
}
|
|
1895
|
-
const task =
|
|
1895
|
+
const task = _chunkVO2ZPNCWjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
|
|
1896
1896
|
force: forceRuntimeRefresh || invalidation.changed || forceCollectBySource,
|
|
1897
1897
|
skipRefresh: forceRuntimeRefresh,
|
|
1898
1898
|
clearCache: forceRuntimeRefresh || invalidation.changed
|
|
@@ -1926,7 +1926,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1926
1926
|
const plugins = [
|
|
1927
1927
|
...rewritePlugins,
|
|
1928
1928
|
{
|
|
1929
|
-
name: `${
|
|
1929
|
+
name: `${_chunkVO2ZPNCWjs.vitePluginName}:post`,
|
|
1930
1930
|
enforce: "post",
|
|
1931
1931
|
async configResolved(config) {
|
|
1932
1932
|
resolvedConfig = config;
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
toCustomAttributesEntities,
|
|
24
24
|
traverse,
|
|
25
25
|
vitePluginName
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JOT24YET.mjs";
|
|
27
27
|
import {
|
|
28
28
|
findNearestPackageRoot,
|
|
29
29
|
findTailwindConfig,
|
|
30
30
|
getRuntimeClassSetSignature,
|
|
31
31
|
resolveTailwindcssOptions
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3V52XTPJ.mjs";
|
|
33
33
|
import {
|
|
34
34
|
resolveUniUtsPlatform
|
|
35
35
|
} from "./chunk-OOHJLO5M.mjs";
|
|
@@ -7,7 +7,7 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVO2ZPNCWjs = require('./chunk-VO2ZPNCW.js');
|
|
11
11
|
|
|
12
12
|
// src/bundlers/gulp/index.ts
|
|
13
13
|
var _buffer = require('buffer');
|
|
@@ -15,12 +15,12 @@ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
|
15
15
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
16
16
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
17
17
|
var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
|
|
18
|
-
var debug =
|
|
18
|
+
var debug = _chunkVO2ZPNCWjs.createDebug.call(void 0, );
|
|
19
19
|
var Transform = _stream2.default.Transform;
|
|
20
20
|
function createPlugins(options = {}) {
|
|
21
|
-
const opts =
|
|
21
|
+
const opts = _chunkVO2ZPNCWjs.getCompilerContext.call(void 0, options);
|
|
22
22
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
23
|
-
const patchRecorderState =
|
|
23
|
+
const patchRecorderState = _chunkVO2ZPNCWjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
24
24
|
source: "runtime",
|
|
25
25
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
26
26
|
});
|
|
@@ -38,13 +38,13 @@ function createPlugins(options = {}) {
|
|
|
38
38
|
const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".tsx", ".jsx"];
|
|
39
39
|
let runtimeSetInitialized = false;
|
|
40
40
|
async function refreshRuntimeState(force) {
|
|
41
|
-
await
|
|
41
|
+
await _chunkVO2ZPNCWjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
|
|
42
42
|
}
|
|
43
43
|
async function refreshRuntimeSet(force = false) {
|
|
44
44
|
if (!force && runtimeSetInitialized) {
|
|
45
45
|
return runtimeSet;
|
|
46
46
|
}
|
|
47
|
-
runtimeSet = await
|
|
47
|
+
runtimeSet = await _chunkVO2ZPNCWjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
48
48
|
forceRefresh: force,
|
|
49
49
|
forceCollect: force,
|
|
50
50
|
clearCache: force,
|