weapp-tailwindcss 5.1.5 → 5.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +4 -1
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +1 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +7 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +10 -0
- package/dist/{context-rrYZuUBU.mjs → context-BqeDu1Ha.mjs} +5 -4
- package/dist/{context-BziwyWy1.js → context-C7KTDlrG.js} +5 -4
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator-24-HgU9F.mjs → generator-BOt2Tvx3.mjs} +2 -2
- package/dist/{generator-CilgHtxb.js → generator-DASZwC6t.js} +2 -2
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/{gulp-CuVsZdO9.js → gulp-D6hsaTLM.js} +4 -4
- package/dist/{gulp-ygWfmOqh.mjs → gulp-alDZryyB.mjs} +4 -4
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-BKdCeIrn.js → hmr-timing-BIr_CiPW.js} +55 -566
- package/dist/{hmr-timing-Dh_nn3w5.mjs → hmr-timing-CYwVMRol.mjs} +32 -513
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/postcss.js +2 -2
- package/dist/postcss.mjs +2 -2
- package/dist/presets.js +6 -3
- package/dist/presets.mjs +6 -3
- package/dist/rspack.js +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/runtime-branch/generator-target-env.d.ts +1 -0
- package/dist/{source-candidate-scan-signature-DATRnS1X.mjs → source-candidate-scan-signature-D97ZEXcj.mjs} +3 -3
- package/dist/{source-candidate-scan-signature-DIj9m4wB.js → source-candidate-scan-signature-Djr2Hw8y.js} +3 -3
- package/dist/{tailwindcss-C-uM4rB8.mjs → tailwindcss-DDGD90w7.mjs} +15 -2
- package/dist/{tailwindcss-BwoNQ3t8.js → tailwindcss-DPxJpRVP.js} +15 -2
- package/dist/{transform-KLD1tJdb.js → transform-CvqqZBuq.js} +1 -1
- package/dist/{transform-DHLemtaX.mjs → transform-DPPr79r2.mjs} +1 -1
- package/dist/uni-app-x/web-preflight-reset.d.ts +3 -0
- package/dist/{v4-engine-CKtsdKxK.js → v4-engine-3UmJkAY7.js} +641 -3
- package/dist/{v4-engine-BuuYDXt1.mjs → v4-engine-CYSrDVNp.mjs} +560 -6
- package/dist/{vite-Yp14HNyS.js → vite-BJRlG835.js} +636 -114
- package/dist/{vite-cH0tTMHc.mjs → vite-XxJh7Xtu.mjs} +637 -115
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +3078 -2907
- package/dist/{webpack-DN3tgLbF.js → webpack-BxBOMUtY.js} +286 -47
- package/dist/{webpack-DBhmJ-_P.mjs → webpack-eN8WzIT-.mjs} +280 -41
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { o as resolveRuntimeBranch } from "./generator-
|
|
1
|
+
import { $ as hasTailwindGeneratedCssMarkers, A as stripTailwindSourceMediaFragments, C as isCommentOnlyCss, D as removeTailwindV4GeneratorAtRules, Dt as inferGeneratorTargetFromEnv, E as removeTailwindV4GeneratedUserCssArtifacts, F as pruneMiniProgramGeneratedCss, H as hasTailwindSourceDirectives, K as parseImportRequest, L as stripMiniProgramCssSpecificityPlaceholders, N as finalizeMiniProgramCss, Q as hasTailwindGeneratedCss, T as removeMiniProgramHoverSelectors, U as normalizeTailwindConfigDirectives, V as hasTailwindRootDirectives, _ as resolveTailwindcssOptions, bt as resolveSourceScanPath, j as stripUnmatchedTailwindSourceMediaCloseFragments, lt as getTailwindV4IncrementalGenerateCacheStats, o as hasConfiguredTailwindV4CssRoots, q as removeTailwindSourceDirectives, s as upsertTailwindV4CssSource, z as hasTailwindApplyDirective } from "./v4-engine-CYSrDVNp.mjs";
|
|
2
|
+
import { o as resolveRuntimeBranch } from "./generator-BOt2Tvx3.mjs";
|
|
3
3
|
import { r as getGroupedEntries } from "./utils-DodxWHGz.mjs";
|
|
4
|
-
import { S as createDebug, b as ensureRuntimeClassSet, f as _defineProperty, i as pluginName, l as shouldSkipJsTransform, n as normalizeStyleHandlerMajorVersion, r as resolveStyleOptionsFromContext, t as getCompilerContext, w as md5Hash, x as refreshTailwindRuntimeState, y as createTailwindRuntimeReadyPromise } from "./context-
|
|
5
|
-
import { l as getRuntimeClassSetSignature, p as resolveViteSourceScanEntries } from "./tailwindcss-
|
|
6
|
-
import { C as
|
|
7
|
-
import { A as isSourceStyleRequest, C as resolvePluginDisabledState, I as createBuiltinWebpackStyleInjectorPlugin, N as resolveOutputSpecifier, P as toAbsoluteOutputPath, S as resolvePackageDir, _ as generateTailwindV4Css, d as classifyBundleEntry, f as createBundleBuildState, i as createCandidateSignature, j as stripRequestQuery, m as createRuntimeAffectingSourceSignature, p as updateBundleBuildState, r as createScopedGeneratorRuntime, t as createSourceCandidateScanSignature, x as stripBundlerGeneratedCssMarkers, y as hasBundlerGeneratedCssMarker } from "./source-candidate-scan-signature-
|
|
4
|
+
import { S as createDebug, b as ensureRuntimeClassSet, f as _defineProperty, i as pluginName, l as shouldSkipJsTransform, n as normalizeStyleHandlerMajorVersion, r as resolveStyleOptionsFromContext, t as getCompilerContext, w as md5Hash, x as refreshTailwindRuntimeState, y as createTailwindRuntimeReadyPromise } from "./context-BqeDu1Ha.mjs";
|
|
5
|
+
import { g as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature, p as resolveViteSourceScanEntries } from "./tailwindcss-DDGD90w7.mjs";
|
|
6
|
+
import { C as hasMiniProgramTailwindV4PreflightReset, D as isCssSourceTraceEnabled, E as createCssTokenSourceMap, O as processCachedTask, S as createCssSourceOrderAppend, T as createCssSourceTraceCacheSignature, _ as isPureLocalCssImportWrapper, a as isSourceCandidateRequest, b as scoreTailwindV4CssSourceFileMatch, c as collectStrictEscapedRuntimeCandidates, f as pushConcurrentTaskFactories, i as createSourceCandidateStore, l as createEscapeFragments, n as emitHmrTiming, o as resolveSourceCandidateScanFiles, p as resolveTaskConcurrency, s as createBundleRuntimeClassSetManager, w as annotateCssSourceTrace, x as removeGeneratedSelectorCompatCss } from "./hmr-timing-CYwVMRol.mjs";
|
|
7
|
+
import { A as isSourceStyleRequest, C as resolvePluginDisabledState, I as createBuiltinWebpackStyleInjectorPlugin, N as resolveOutputSpecifier, P as toAbsoluteOutputPath, S as resolvePackageDir, _ as generateTailwindV4Css, d as classifyBundleEntry, f as createBundleBuildState, i as createCandidateSignature, j as stripRequestQuery, m as createRuntimeAffectingSourceSignature, p as updateBundleBuildState, r as createScopedGeneratorRuntime, t as createSourceCandidateScanSignature, x as stripBundlerGeneratedCssMarkers, y as hasBundlerGeneratedCssMarker } from "./source-candidate-scan-signature-D97ZEXcj.mjs";
|
|
8
8
|
import Module, { createRequire } from "node:module";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
@@ -390,6 +390,11 @@ function resolveWebpackGeneratorRawSource(rawSource, cssHandlerOptions) {
|
|
|
390
390
|
if (sourceCss && (hasTailwindRootDirectives(sourceCss, { importFallback: true }) || hasTailwindSourceDirectives(sourceCss, { importFallback: true }) || hasTailwindApplyDirective(sourceCss) || hasTailwindGeneratedCss(sourceCss) || hasTailwindGeneratedCssMarkers(sourceCss))) return sourceCss;
|
|
391
391
|
return rawSource;
|
|
392
392
|
}
|
|
393
|
+
function shouldConsumeWebpackLoaderGeneratedCss(options) {
|
|
394
|
+
if (!options.shouldRegenerateExplicitTailwindV4CssSource) return true;
|
|
395
|
+
if (options.watchMode === true && options.loaderGeneratedClassSet && options.sourceCandidates && hasMissingRuntimeCandidates(options.loaderGeneratedClassSet, options.sourceCandidates)) return false;
|
|
396
|
+
return options.hasBundlerGeneratedCssMarker;
|
|
397
|
+
}
|
|
393
398
|
function hasUsableWebpackGeneratorCssSources(cssSources) {
|
|
394
399
|
return Array.isArray(cssSources) && cssSources.some((source) => typeof source?.css === "string" && source.css.length > 0);
|
|
395
400
|
}
|
|
@@ -441,7 +446,8 @@ function hasProcessedCssAssetUrl(css) {
|
|
|
441
446
|
return /url\(\s*["']?data:/i.test(css);
|
|
442
447
|
}
|
|
443
448
|
function shouldUseWebpackAssetAsGeneratorUserCss(rawSource, generatorRawSource, options = {}) {
|
|
444
|
-
|
|
449
|
+
const rawMarkers = collectWebpackAssetUserCssMarkers(rawSource);
|
|
450
|
+
return rawSource !== generatorRawSource && (options.processed === true || !rawSource.includes("data:")) && !hasTailwindRootDirectives(rawSource, { importFallback: true }) && !hasTailwindSourceDirectives(rawSource, { importFallback: true }) && !hasTailwindApplyDirective(rawSource) && rawMarkers.size > 0 && !isOnlyWebpackTailwindGeneratedPreflightCss(rawSource) && (!hasTailwindGeneratedCssMarkers(rawSource) || hasAdditionalWebpackAssetUserCssMarkers(rawSource, generatorRawSource));
|
|
445
451
|
}
|
|
446
452
|
function collectWebpackAssetUserCssMarkers(source) {
|
|
447
453
|
const markers = /* @__PURE__ */ new Set();
|
|
@@ -463,6 +469,44 @@ function collectWebpackAssetUserCssMarkers(source) {
|
|
|
463
469
|
} catch {}
|
|
464
470
|
return markers;
|
|
465
471
|
}
|
|
472
|
+
function hasWebpackClassSelector(selector) {
|
|
473
|
+
return /(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i.test(selector);
|
|
474
|
+
}
|
|
475
|
+
function isWebpackKeyframesRule(rule) {
|
|
476
|
+
let parent = rule.parent;
|
|
477
|
+
while (parent) {
|
|
478
|
+
if (parent.type === "atrule" && parent.name.endsWith("keyframes")) return true;
|
|
479
|
+
parent = parent.parent;
|
|
480
|
+
}
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
function collectWebpackBareSelectorUserCss(source) {
|
|
484
|
+
try {
|
|
485
|
+
const root = postcss.parse(removeTailwindSourceDirectives(stripTailwindSourceMediaFragments(removeTailwindV4GeneratorAtRules(source)), { importFallback: true }));
|
|
486
|
+
let changed = false;
|
|
487
|
+
root.walkAtRules((rule) => {
|
|
488
|
+
if (rule.name === "import" || rule.name === "font-face" || rule.name.endsWith("keyframes")) {
|
|
489
|
+
rule.remove();
|
|
490
|
+
changed = true;
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
root.walkRules((rule) => {
|
|
494
|
+
if (isWebpackKeyframesRule(rule) || rule.selectors.some((selector) => hasWebpackClassSelector(selector))) {
|
|
495
|
+
rule.remove();
|
|
496
|
+
changed = true;
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
root.walkAtRules((rule) => {
|
|
500
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) {
|
|
501
|
+
rule.remove();
|
|
502
|
+
changed = true;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
return changed ? root.toString() : source;
|
|
506
|
+
} catch {
|
|
507
|
+
return "";
|
|
508
|
+
}
|
|
509
|
+
}
|
|
466
510
|
const WEBPACK_TAILWIND_GENERATED_LAYER_NAMES = /* @__PURE__ */ new Set([
|
|
467
511
|
"theme",
|
|
468
512
|
"base",
|
|
@@ -471,6 +515,26 @@ const WEBPACK_TAILWIND_GENERATED_LAYER_NAMES = /* @__PURE__ */ new Set([
|
|
|
471
515
|
const WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE = /(?:^|[^\w-])\.[^,{]{0,512}(?:\\:|\\\[|\\#)/;
|
|
472
516
|
const WEBPACK_TAILWIND_UTILITY_PREFIX_RE = /^\.(?:-?(?:bg|text|border|ring|shadow|drop-shadow|[pmwhz]|px|py|pt|pr|pb|pl|mx|my|mt|mr|mb|ml|min-w|min-h|max-w|max-h|flex|grid|inline|block|hidden|rounded|opacity|translate|scale|rotate|skew|top|right|bottom|left|inset|gap|font|leading|tracking|underline|container)(?:[\-\\{]|$)|\\\[)/;
|
|
473
517
|
const WEBPACK_TAILWIND_BANNER_RE = /tailwindcss v4\./;
|
|
518
|
+
const WEBPACK_TAILWIND_PREFLIGHT_SELECTORS = /* @__PURE__ */ new Set([
|
|
519
|
+
"*",
|
|
520
|
+
":after",
|
|
521
|
+
":before",
|
|
522
|
+
"::after",
|
|
523
|
+
"::before",
|
|
524
|
+
"::backdrop",
|
|
525
|
+
"view",
|
|
526
|
+
"text"
|
|
527
|
+
]);
|
|
528
|
+
const WEBPACK_TAILWIND_PREFLIGHT_PROPS = /* @__PURE__ */ new Set([
|
|
529
|
+
"box-sizing",
|
|
530
|
+
"border",
|
|
531
|
+
"border-width",
|
|
532
|
+
"border-style",
|
|
533
|
+
"border-color",
|
|
534
|
+
"margin",
|
|
535
|
+
"padding"
|
|
536
|
+
]);
|
|
537
|
+
const WEBPACK_TAILWIND_THEME_TOKEN_RE = /^--(?:tw-|color-|spacing|breakpoint-|container-|text-|font-|tracking-|leading-|radius-|shadow-|inset-shadow-|drop-shadow-|ease-|animate-|blur-|perspective-|aspect-|default-)/;
|
|
474
538
|
function parseWebpackCssLayerNames(params) {
|
|
475
539
|
return params.split(",").map((name) => name.trim()).filter(Boolean);
|
|
476
540
|
}
|
|
@@ -506,18 +570,21 @@ function removeWebpackTailwindGeneratedAssetCss(source) {
|
|
|
506
570
|
return;
|
|
507
571
|
}
|
|
508
572
|
if (shouldRemoveLayer && !names.includes("utilities")) {
|
|
509
|
-
rule.
|
|
510
|
-
|
|
573
|
+
for (const child of [...rule.nodes ?? []]) if (isWebpackTailwindGeneratedLayerNode(child, names)) {
|
|
574
|
+
child.remove();
|
|
575
|
+
changed = true;
|
|
576
|
+
}
|
|
577
|
+
if (rule.nodes?.length === 0) {
|
|
578
|
+
rule.remove();
|
|
579
|
+
changed = true;
|
|
580
|
+
}
|
|
511
581
|
return;
|
|
512
582
|
}
|
|
513
583
|
if (shouldRemoveLayer) {
|
|
514
|
-
rule.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
changed = true;
|
|
519
|
-
}
|
|
520
|
-
});
|
|
584
|
+
for (const child of [...rule.nodes ?? []]) if (isWebpackTailwindGeneratedLayerNode(child, names)) {
|
|
585
|
+
child.remove();
|
|
586
|
+
changed = true;
|
|
587
|
+
}
|
|
521
588
|
if (rule.nodes?.length === 0) {
|
|
522
589
|
rule.remove();
|
|
523
590
|
changed = true;
|
|
@@ -527,7 +594,7 @@ function removeWebpackTailwindGeneratedAssetCss(source) {
|
|
|
527
594
|
root.walkRules((rule) => {
|
|
528
595
|
if (rule.parent?.type === "atrule" && rule.parent.name === "layer") return;
|
|
529
596
|
const selector = rule.selector.trim();
|
|
530
|
-
if (WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector)) {
|
|
597
|
+
if (WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector) || isWebpackTailwindGeneratedPreflightRule(rule)) {
|
|
531
598
|
rule.remove();
|
|
532
599
|
changed = true;
|
|
533
600
|
}
|
|
@@ -550,14 +617,59 @@ function removeWebpackTailwindGeneratedAssetCss(source) {
|
|
|
550
617
|
}
|
|
551
618
|
}
|
|
552
619
|
function isWebpackTailwindGeneratedPrefixNode(node) {
|
|
553
|
-
if (node.type === "rule") return node
|
|
620
|
+
if (node.type === "rule") return isWebpackTailwindGeneratedRule(node, [
|
|
621
|
+
"theme",
|
|
622
|
+
"base",
|
|
623
|
+
"utilities"
|
|
624
|
+
], true);
|
|
554
625
|
if (node.type !== "atrule") return false;
|
|
555
626
|
const names = node.name === "layer" ? parseWebpackCssLayerNames(node.params) : [];
|
|
556
627
|
if (node.name === "property" && node.params.trim().startsWith("--tw-")) return true;
|
|
557
|
-
if (names.length > 0 && names.every((name) => WEBPACK_TAILWIND_GENERATED_LAYER_NAMES.has(name)))
|
|
628
|
+
if (names.length > 0 && names.every((name) => WEBPACK_TAILWIND_GENERATED_LAYER_NAMES.has(name))) {
|
|
629
|
+
if (node.nodes === void 0) return true;
|
|
630
|
+
return node.nodes.length > 0 && node.nodes.every((child) => isWebpackTailwindGeneratedLayerNode(child, names));
|
|
631
|
+
}
|
|
558
632
|
if (node.nodes === void 0 || node.nodes.length === 0) return false;
|
|
559
633
|
return node.nodes.every((child) => isWebpackTailwindGeneratedPrefixNode(child));
|
|
560
634
|
}
|
|
635
|
+
function isWebpackTailwindGeneratedLayerNode(node, layerNames) {
|
|
636
|
+
if (node.type === "rule") return isWebpackTailwindGeneratedRule(node, layerNames, false);
|
|
637
|
+
if (node.type !== "atrule") return false;
|
|
638
|
+
if (node.name === "property" && node.params.trim().startsWith("--tw-")) return true;
|
|
639
|
+
if (node.nodes === void 0 || node.nodes.length === 0) return false;
|
|
640
|
+
return node.nodes.every((child) => isWebpackTailwindGeneratedLayerNode(child, layerNames));
|
|
641
|
+
}
|
|
642
|
+
function isWebpackTailwindGeneratedRule(rule, layerNames, includePrefix) {
|
|
643
|
+
const selectors = rule.selectors ?? [rule.selector];
|
|
644
|
+
if (selectors.every((selector) => isWebpackTailwindGeneratedUtilitySelector(selector.trim(), includePrefix))) return true;
|
|
645
|
+
if (selectors.every((selector) => isWebpackTailwindGeneratedUtilitySelector(selector.trim(), true))) return true;
|
|
646
|
+
if (layerNames.includes("theme") && isWebpackTailwindGeneratedThemeRule(rule)) return true;
|
|
647
|
+
if (layerNames.includes("base") && isWebpackTailwindGeneratedPreflightRule(rule)) return true;
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
function isWebpackTailwindGeneratedThemeRule(rule) {
|
|
651
|
+
const declarations = (rule.nodes ?? []).filter((node) => node.type === "decl");
|
|
652
|
+
return declarations.length > 0 && declarations.every((decl) => WEBPACK_TAILWIND_THEME_TOKEN_RE.test(decl.prop) || decl.value.includes("--theme("));
|
|
653
|
+
}
|
|
654
|
+
function isWebpackTailwindGeneratedPreflightRule(rule) {
|
|
655
|
+
const selectors = rule.selectors ?? [rule.selector];
|
|
656
|
+
const declarations = (rule.nodes ?? []).filter((node) => node.type === "decl");
|
|
657
|
+
return selectors.length > 0 && declarations.length > 0 && selectors.every((selector) => {
|
|
658
|
+
const normalized = selector.trim().replace(/\s+/g, " ");
|
|
659
|
+
return WEBPACK_TAILWIND_PREFLIGHT_SELECTORS.has(normalized);
|
|
660
|
+
}) && declarations.every((decl) => WEBPACK_TAILWIND_PREFLIGHT_PROPS.has(decl.prop));
|
|
661
|
+
}
|
|
662
|
+
function isOnlyWebpackTailwindGeneratedPreflightCss(source) {
|
|
663
|
+
try {
|
|
664
|
+
const nodes = postcss.parse(source).nodes ?? [];
|
|
665
|
+
return nodes.length > 0 && nodes.every((node) => {
|
|
666
|
+
if (node.type === "rule") return isWebpackTailwindGeneratedPreflightRule(node);
|
|
667
|
+
return node.type === "atrule" && (node.nodes === void 0 || node.nodes.length === 0);
|
|
668
|
+
});
|
|
669
|
+
} catch {
|
|
670
|
+
return false;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
561
673
|
function isWebpackTailwindGeneratedUtilitySelector(selector, includePrefix) {
|
|
562
674
|
return WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector) || includePrefix && WEBPACK_TAILWIND_UTILITY_PREFIX_RE.test(selector);
|
|
563
675
|
}
|
|
@@ -822,13 +934,12 @@ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTa
|
|
|
822
934
|
if (options.generatedCss !== true) return stripMiniProgramCssSpecificityPlaceholders(removeMiniProgramHoverSelectors(finalized, styleOptions.cssRemoveHoverPseudoClass));
|
|
823
935
|
try {
|
|
824
936
|
finalized = pruneMiniProgramGeneratedCss(finalized, { preservePreflight: options.cssPreflight !== false });
|
|
825
|
-
} catch {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
}
|
|
937
|
+
} catch {}
|
|
938
|
+
finalized = finalizeMiniProgramCss(finalized, {
|
|
939
|
+
cssPreflight: options.cssPreflight === false ? false : !hasMiniProgramTailwindV4PreflightReset(finalized) ? compilerOptions.cssPreflight : void 0,
|
|
940
|
+
isTailwindcssV4: true,
|
|
941
|
+
tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
|
|
942
|
+
});
|
|
832
943
|
return stripMiniProgramCssSpecificityPlaceholders(removeMiniProgramHoverSelectors(finalized, styleOptions.cssRemoveHoverPseudoClass));
|
|
833
944
|
}
|
|
834
945
|
function collectWebpackJsRuntimeCandidatesFromAssets(options) {
|
|
@@ -870,6 +981,26 @@ function stringifyWebpackSourceLike(source) {
|
|
|
870
981
|
}
|
|
871
982
|
//#endregion
|
|
872
983
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.ts
|
|
984
|
+
function normalizeWebpackCssSourceRef(file) {
|
|
985
|
+
return file.replaceAll("\\", "/");
|
|
986
|
+
}
|
|
987
|
+
function collectWebpackCssTokenSourceRefs(source) {
|
|
988
|
+
const refs = /* @__PURE__ */ new Set();
|
|
989
|
+
for (const line of source.split("\n")) {
|
|
990
|
+
if (!line.includes("/* tokens:") || !line.includes("<=")) continue;
|
|
991
|
+
const traceStart = line.indexOf("<=");
|
|
992
|
+
const traceEnd = line.indexOf("*/", traceStart);
|
|
993
|
+
const trace = line.slice(traceStart + 2, traceEnd >= 0 ? traceEnd : void 0);
|
|
994
|
+
for (const segment of trace.split("|")) {
|
|
995
|
+
const sourceList = segment.replace(/^[^<]*<=\s*/, "").split(",");
|
|
996
|
+
for (const ref of sourceList) {
|
|
997
|
+
const normalizedRef = ref.trim();
|
|
998
|
+
if (normalizedRef) refs.add(normalizeWebpackCssSourceRef(normalizedRef));
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
return refs;
|
|
1003
|
+
}
|
|
873
1004
|
function createWebpackCssSourceResolvers(options) {
|
|
874
1005
|
const { activeWebpackAssetResourceFiles, appType, compilerOptions, compilation, cssAssetResources, cssHandlerOptionsCache, cssSources, cssUserHandlerOptionsCache, groupedCssEntriesLength, singleCssAssetFile, isWebGeneratorTarget, outputDir, runtimeState } = options;
|
|
875
1006
|
const hasConfiguredTailwindV4SourceRoots = () => {
|
|
@@ -937,6 +1068,19 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
937
1068
|
return activeAssetResource;
|
|
938
1069
|
}
|
|
939
1070
|
if (rawSource) {
|
|
1071
|
+
const tokenSourceRefs = collectWebpackCssTokenSourceRefs(rawSource);
|
|
1072
|
+
if (tokenSourceRefs.size > 0) {
|
|
1073
|
+
const tokenSourceMatches = [...cssSources.keys()].filter((sourceFile) => {
|
|
1074
|
+
const relativeSourceFile = normalizeWebpackCssSourceRef(path.relative(compilerOptions.tailwindcssBasedir, sourceFile));
|
|
1075
|
+
const absoluteSourceFile = normalizeWebpackCssSourceRef(path.resolve(sourceFile));
|
|
1076
|
+
return tokenSourceRefs.has(relativeSourceFile) || tokenSourceRefs.has(absoluteSourceFile);
|
|
1077
|
+
}).sort();
|
|
1078
|
+
if (tokenSourceMatches.length === 1) {
|
|
1079
|
+
const sourceFile = tokenSourceMatches[0];
|
|
1080
|
+
activeWebpackCssSourceFiles.add(sourceFile);
|
|
1081
|
+
return sourceFile;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
940
1084
|
const representedTailwindSourceMatches = [...cssSources.entries()].filter(([, source]) => isWebpackCssSourceRepresentedInAsset(rawSource, source.css)).map(([sourceFile]) => ({
|
|
941
1085
|
sourceFile,
|
|
942
1086
|
score: scoreTailwindV4CssSourceFileMatch(file, sourceFile, {
|
|
@@ -1697,7 +1841,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1697
1841
|
return rawSource;
|
|
1698
1842
|
};
|
|
1699
1843
|
const chunkHash = assetHashByChunk.get(file);
|
|
1700
|
-
const cssHandlerOptionsForProcessedAsset = getCssHandlerOptions(file);
|
|
1844
|
+
const cssHandlerOptionsForProcessedAsset = getCssHandlerOptions(file, readRawSource());
|
|
1701
1845
|
const processedCssAssetMetadata = { isMainCssChunk: cssHandlerOptionsForProcessedAsset.isMainChunk };
|
|
1702
1846
|
const processedSourceFile = cssHandlerOptionsForProcessedAsset.sourceOptions?.sourceFile;
|
|
1703
1847
|
const processedSourceCss = processedSourceFile ? cssSources.get(path.resolve(processedSourceFile))?.css : void 0;
|
|
@@ -1732,9 +1876,10 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1732
1876
|
...source,
|
|
1733
1877
|
file: sourceFile
|
|
1734
1878
|
})), readCurrentProcessedRawSource()) !== void 0;
|
|
1879
|
+
const hasProcessedLoaderGeneratedUserCss = cachedSkipProcessedCssAsset === void 0 && processedLoaderGeneratedCss !== void 0 && hasAdditionalWebpackAssetUserCssMarkers(processedLoaderGeneratedCss.css, readCurrentProcessedRawSource());
|
|
1735
1880
|
const shouldFinalizeProcessedWebCssAsset = isWebGeneratorTarget && !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss && hasTailwindSourceDirectives(readCurrentProcessedRawSource(), { importFallback: true });
|
|
1736
1881
|
const shouldPreserveFinalWebCssAsset = isWebGeneratorTarget && processedSourceFile === void 0 && !shouldForceConfiguredMainCssGeneration && (hasGeneratedCssMarker || hasTailwindGeneratedAssetCss);
|
|
1737
|
-
const shouldSkipKnownProcessedCssAsset = !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss && !shouldRegenerateStaleProcessedWebCssAsset && (processedCssAssetKnown || isWebpackProcessedCssAsset?.(file, readCurrentProcessedRawSource(), processedCssAssetMetadata)) && !hasProcessedMainAssetUserCss && (!cssHandlerOptionsForProcessedAsset.isMainChunk || hasGeneratedCssMarker || hasTailwindGeneratedAssetCss);
|
|
1882
|
+
const shouldSkipKnownProcessedCssAsset = !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss && !shouldRegenerateStaleProcessedWebCssAsset && (processedCssAssetKnown || isWebpackProcessedCssAsset?.(file, readCurrentProcessedRawSource(), processedCssAssetMetadata)) && !hasProcessedMainAssetUserCss && !hasProcessedLoaderGeneratedUserCss && (!cssHandlerOptionsForProcessedAsset.isMainChunk || hasGeneratedCssMarker || hasTailwindGeneratedAssetCss);
|
|
1738
1883
|
const shouldSkipProcessedCssAsset = cachedSkipProcessedCssAsset ?? (shouldFinalizeProcessedWebCssAsset || shouldPreserveFinalWebCssAsset || shouldSkipKnownProcessedCssAsset);
|
|
1739
1884
|
if (processedCssAssetKnown && cachedSkipProcessedCssAsset === void 0 && !shouldFinalizeProcessedWebCssAsset && !shouldPreserveFinalWebCssAsset) processedCssAssetSkipDecisionCache.set(processedCssDecisionCacheKey, shouldSkipProcessedCssAsset === true);
|
|
1740
1885
|
if (shouldSkipProcessedCssAsset) {
|
|
@@ -1759,12 +1904,29 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1759
1904
|
},
|
|
1760
1905
|
transform: async () => {
|
|
1761
1906
|
const source = readCurrentProcessedRawSource();
|
|
1907
|
+
const processedBareSelectorSourceCss = processedSourceCss ?? (hasTailwindGeneratedAssetCss ? removeWebpackTailwindGeneratedAssetCss(source) : void 0);
|
|
1762
1908
|
const nextCss = stripTrailingLineWhitespace(finalizeCssAssetSource(hasTailwindGeneratedAssetCss && !hasGeneratedCssMarker ? isWebGeneratorTarget ? source : (await compilerOptions.styleHandler(source, cssHandlerOptionsForProcessedAsset)).css : source, {
|
|
1763
1909
|
cssPreflight: cssHandlerOptionsForProcessedAsset.isMainChunk,
|
|
1764
1910
|
generatedCss: hasGeneratedCssMarker || hasTailwindGeneratedAssetCss
|
|
1765
1911
|
}));
|
|
1912
|
+
const processedSourceBareUserCss = isWebGeneratorTarget || processedBareSelectorSourceCss === void 0 ? void 0 : createWebpackGeneratorUserCssSourceAppend({
|
|
1913
|
+
css: collectWebpackBareSelectorUserCss(processedBareSelectorSourceCss),
|
|
1914
|
+
processed: false
|
|
1915
|
+
});
|
|
1916
|
+
const finalizedProcessedSourceBareUserCss = processedSourceBareUserCss === void 0 ? "" : finalizeCssAssetSource(processedSourceBareUserCss.css, {
|
|
1917
|
+
cssPreflight: false,
|
|
1918
|
+
generatedCss: false
|
|
1919
|
+
});
|
|
1920
|
+
const missingProcessedSourceBareUserCss = finalizedProcessedSourceBareUserCss.trim().length === 0 ? "" : filterExistingCssRules(nextCss, finalizedProcessedSourceBareUserCss);
|
|
1921
|
+
const css = missingProcessedSourceBareUserCss.trim().length === 0 ? nextCss : createWebpackGeneratorUserCssSourceAppend({
|
|
1922
|
+
css: nextCss,
|
|
1923
|
+
processed: true
|
|
1924
|
+
}, {
|
|
1925
|
+
css: missingProcessedSourceBareUserCss,
|
|
1926
|
+
processed: true
|
|
1927
|
+
}).css;
|
|
1766
1928
|
debug("css skip webpack-loader-pipeline asset: %s", file);
|
|
1767
|
-
return { result: new ConcatSource(finalizeTracedCss(
|
|
1929
|
+
return { result: new ConcatSource(finalizeTracedCss(css, cssHandlerOptionsForProcessedAsset)) };
|
|
1768
1930
|
}
|
|
1769
1931
|
});
|
|
1770
1932
|
}, cssTaskFactories);
|
|
@@ -1833,7 +1995,14 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1833
1995
|
const loaderGeneratedCss = sourceFile && !isWebGeneratorTarget ? generatedCssSources.get(path.resolve(sourceFile)) : void 0;
|
|
1834
1996
|
const sourceCss = sourceFile ? cssSources.get(path.resolve(sourceFile))?.css : void 0;
|
|
1835
1997
|
const shouldRegenerateExplicitTailwindV4CssSource = sourceCss !== void 0 && (hasTailwindSourceDirectives(sourceCss, { importFallback: true }) || sourceCss.includes("@config"));
|
|
1836
|
-
|
|
1998
|
+
const explicitTailwindV4SourceCandidates = shouldRegenerateExplicitTailwindV4CssSource && sourceCss && sourceFile && webpackSourceCandidates?.getSourceCandidatesForEntries ? await resolveTailwindV4EntriesFromCssCached(sourceCss, path.dirname(sourceFile)).then((resolved) => resolved?.entries ? webpackSourceCandidates.getSourceCandidatesForEntries(resolved.entries) : void 0) : void 0;
|
|
1999
|
+
if (loaderGeneratedCss && shouldConsumeWebpackLoaderGeneratedCss({
|
|
2000
|
+
hasBundlerGeneratedCssMarker: hasBundlerGeneratedCssMarker(currentRawSource),
|
|
2001
|
+
loaderGeneratedClassSet: loaderGeneratedCss.classSet,
|
|
2002
|
+
sourceCandidates: explicitTailwindV4SourceCandidates,
|
|
2003
|
+
shouldRegenerateExplicitTailwindV4CssSource,
|
|
2004
|
+
watchMode
|
|
2005
|
+
})) {
|
|
1837
2006
|
for (const className of loaderGeneratedCss.classSet) {
|
|
1838
2007
|
generatorRuntimeSet.add(className);
|
|
1839
2008
|
transformRuntimeSet.add(className);
|
|
@@ -1842,16 +2011,49 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1842
2011
|
const currentRawSourceWithoutBundlerMarkers = stripBundlerGeneratedCssMarkers(currentRawSource);
|
|
1843
2012
|
const currentAssetHasProcessedUrl = hasProcessedCssAssetUrl(currentRawSourceWithoutBundlerMarkers) && currentRawSourceWithoutBundlerMarkers !== loaderGeneratedCss.css;
|
|
1844
2013
|
const currentAssetUserCss = currentAssetHasProcessedUrl ? currentRawSourceWithoutBundlerMarkers : shouldUseWebpackAssetAsGeneratorUserCss(currentRawSourceWithoutBundlerMarkers, loaderGeneratedCss.css, { processed: true }) ? removeGeneratedSelectorCompatCss(currentRawSourceWithoutBundlerMarkers, loaderGeneratedCss.css) : void 0;
|
|
1845
|
-
const
|
|
1846
|
-
|
|
2014
|
+
const isConfiguredMainCssSource = configuredMainCssEntryFiles.some((entry) => path.resolve(entry) === path.resolve(sourceFile));
|
|
2015
|
+
const loaderGeneratedCssWithoutMarkers = stripBundlerGeneratedCssMarkers(loaderGeneratedCss.css);
|
|
2016
|
+
const currentAssetUserCssWithoutMarkers = currentAssetUserCss === void 0 ? "" : stripBundlerGeneratedCssMarkers(currentAssetUserCss);
|
|
2017
|
+
const currentAssetMissingUserCss = !(currentAssetUserCssWithoutMarkers.trim().length > 0 && !isCommentOnlyCss(currentAssetUserCssWithoutMarkers)) ? "" : filterExistingCssRules(currentAssetUserCssWithoutMarkers, loaderGeneratedCssWithoutMarkers);
|
|
2018
|
+
if (isConfiguredMainCssSource && !cssHandlerOptions.isMainChunk && (currentAssetMissingUserCss.trim().length === 0 || isCommentOnlyCss(currentAssetMissingUserCss))) {
|
|
2019
|
+
debug("css skip duplicate webpack loader main generation: %s <- %s", file, sourceFile);
|
|
2020
|
+
return { result: new ConcatSource(finalizeTracedCss("", cssHandlerOptions)) };
|
|
2021
|
+
}
|
|
2022
|
+
const finalizedLoaderCss = finalizeCssAssetSource(currentAssetUserCss === void 0 ? loaderGeneratedCss.css : createWebpackGeneratorUserCssSourceAppend({
|
|
2023
|
+
css: currentAssetUserCss === void 0 ? loaderGeneratedCss.css : currentAssetHasProcessedUrl ? removeGeneratedSelectorCompatCss(loaderGeneratedCss.css, currentAssetUserCss) : filterExistingCssRules(currentAssetUserCss, loaderGeneratedCss.css),
|
|
1847
2024
|
processed: true
|
|
1848
|
-
}, {
|
|
2025
|
+
}, currentAssetUserCss === void 0 ? void 0 : {
|
|
1849
2026
|
css: currentAssetUserCss,
|
|
1850
2027
|
processed: true
|
|
1851
2028
|
}).css, {
|
|
1852
2029
|
cssPreflight: cssHandlerOptions.isMainChunk,
|
|
1853
2030
|
generatedCss: true
|
|
1854
|
-
})
|
|
2031
|
+
});
|
|
2032
|
+
const loaderSourceBareUserCss = isWebGeneratorTarget ? void 0 : createWebpackGeneratorUserCssSourceAppend(...[currentAssetUserCss === void 0 ? void 0 : {
|
|
2033
|
+
css: currentAssetUserCss,
|
|
2034
|
+
processed: true
|
|
2035
|
+
}, sourceCss === void 0 ? void 0 : {
|
|
2036
|
+
css: sourceCss,
|
|
2037
|
+
processed: false
|
|
2038
|
+
}].map((source) => {
|
|
2039
|
+
if (source === void 0) return;
|
|
2040
|
+
return {
|
|
2041
|
+
css: collectWebpackBareSelectorUserCss(source.css),
|
|
2042
|
+
processed: source.processed
|
|
2043
|
+
};
|
|
2044
|
+
}));
|
|
2045
|
+
const finalizedLoaderSourceBareUserCss = loaderSourceBareUserCss === void 0 ? "" : finalizeCssAssetSource(loaderSourceBareUserCss.css, {
|
|
2046
|
+
cssPreflight: false,
|
|
2047
|
+
generatedCss: false
|
|
2048
|
+
});
|
|
2049
|
+
const missingLoaderSourceBareUserCss = finalizedLoaderSourceBareUserCss.trim().length === 0 ? "" : filterExistingCssRules(finalizedLoaderCss, finalizedLoaderSourceBareUserCss);
|
|
2050
|
+
const css = finalizeTracedCss(missingLoaderSourceBareUserCss.trim().length === 0 ? finalizedLoaderCss : createWebpackGeneratorUserCssSourceAppend({
|
|
2051
|
+
css: finalizedLoaderCss,
|
|
2052
|
+
processed: true
|
|
2053
|
+
}, {
|
|
2054
|
+
css: missingLoaderSourceBareUserCss,
|
|
2055
|
+
processed: true
|
|
2056
|
+
}).css, cssHandlerOptions);
|
|
1855
2057
|
debug("css consume webpack loader generation: %s <- %s", file, sourceFile);
|
|
1856
2058
|
return { result: new ConcatSource(css) };
|
|
1857
2059
|
}
|
|
@@ -1942,7 +2144,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1942
2144
|
generated = void 0;
|
|
1943
2145
|
}
|
|
1944
2146
|
else debug("css generator skipped for unmatched webpack main css asset: %s", file);
|
|
1945
|
-
const
|
|
2147
|
+
const finalizedGeneratedCss = generated ? finalizeCssAssetSource(isWebGeneratorTarget && currentRawSource.includes("tailwindcss v4.") ? createWebpackGeneratorUserCssSourceAppend({
|
|
1946
2148
|
css: generated.css,
|
|
1947
2149
|
processed: true
|
|
1948
2150
|
}, {
|
|
@@ -1951,7 +2153,36 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1951
2153
|
})?.css ?? generated.css : generated.css, {
|
|
1952
2154
|
cssPreflight: cssHandlerOptions.isMainChunk,
|
|
1953
2155
|
generatedCss: true
|
|
1954
|
-
}) : isWebGeneratorTarget ? finalizeCssAssetSource(generatorRawSource, { generatedCss: false }) : finalizeCssAssetSource((await compilerOptions.styleHandler(generatorRawSource, cssHandlerOptions)).css, { generatedCss: false })
|
|
2156
|
+
}) : isWebGeneratorTarget ? finalizeCssAssetSource(generatorRawSource, { generatedCss: false }) : finalizeCssAssetSource((await compilerOptions.styleHandler(generatorRawSource, cssHandlerOptions)).css, { generatedCss: false });
|
|
2157
|
+
const sourceBareUserCss = isWebGeneratorTarget ? void 0 : createWebpackGeneratorUserCssSourceAppend(...[
|
|
2158
|
+
userRawSource,
|
|
2159
|
+
sourceCss === void 0 ? void 0 : {
|
|
2160
|
+
css: sourceCss,
|
|
2161
|
+
processed: sourceCssProcessed
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
css: generatorRawSource,
|
|
2165
|
+
processed: false
|
|
2166
|
+
}
|
|
2167
|
+
].map((source) => {
|
|
2168
|
+
if (source === void 0) return;
|
|
2169
|
+
return {
|
|
2170
|
+
css: collectWebpackBareSelectorUserCss(source.css),
|
|
2171
|
+
processed: source.processed
|
|
2172
|
+
};
|
|
2173
|
+
}));
|
|
2174
|
+
const finalizedSourceBareUserCss = sourceBareUserCss === void 0 ? "" : finalizeCssAssetSource(sourceBareUserCss.css, {
|
|
2175
|
+
cssPreflight: false,
|
|
2176
|
+
generatedCss: false
|
|
2177
|
+
});
|
|
2178
|
+
const missingSourceBareUserCss = finalizedSourceBareUserCss.trim().length === 0 ? "" : filterExistingCssRules(finalizedGeneratedCss, finalizedSourceBareUserCss);
|
|
2179
|
+
const source = new ConcatSource(finalizeTracedCss(missingSourceBareUserCss.trim().length === 0 ? finalizedGeneratedCss : createWebpackGeneratorUserCssSourceAppend({
|
|
2180
|
+
css: finalizedGeneratedCss,
|
|
2181
|
+
processed: true
|
|
2182
|
+
}, {
|
|
2183
|
+
css: missingSourceBareUserCss,
|
|
2184
|
+
processed: true
|
|
2185
|
+
}).css, cssHandlerOptions));
|
|
1955
2186
|
if (generated) {
|
|
1956
2187
|
for (const className of generated.classSet) generatorRuntimeSet.add(className);
|
|
1957
2188
|
debug("css handle via tailwind v%s engine(%s): %s", runtimeState.tailwindRuntime.majorVersion, generated.target, file);
|
|
@@ -2157,6 +2388,13 @@ function setupWebpackV5Loaders(options) {
|
|
|
2157
2388
|
const debug = createDebug();
|
|
2158
2389
|
const weappTailwindcssPackageDir = resolvePackageDir("weapp-tailwindcss");
|
|
2159
2390
|
const outputIgnoredPredicatePath = Symbol("weapp-tailwindcss.outputIgnoredPredicatePath");
|
|
2391
|
+
function shouldKeepPreviousWebpackCssSource(previous, next) {
|
|
2392
|
+
if (next.processed === true && previous.processed === false) return true;
|
|
2393
|
+
if (previous.processed === true || next.processed === true || !previous.css || !next.css || previous.css === next.css) return false;
|
|
2394
|
+
const previousMarkers = collectWebpackAssetUserCssMarkers(previous.css);
|
|
2395
|
+
const nextMarkers = collectWebpackAssetUserCssMarkers(next.css);
|
|
2396
|
+
return previousMarkers.size > nextMarkers.size && [...nextMarkers].every((marker) => previousMarkers.has(marker));
|
|
2397
|
+
}
|
|
2160
2398
|
function normalizeIgnoredList(ignored) {
|
|
2161
2399
|
return (Array.isArray(ignored) ? [...ignored] : [ignored]).filter((item) => typeof item === "string" || item instanceof RegExp || typeof item === "function");
|
|
2162
2400
|
}
|
|
@@ -2334,14 +2572,15 @@ var WeappTailwindcss = class {
|
|
|
2334
2572
|
const registerWebpackCssSourceFile = (source) => {
|
|
2335
2573
|
const file = path.resolve(source.file);
|
|
2336
2574
|
const previous = webpackCssSources.get(file);
|
|
2337
|
-
|
|
2575
|
+
const next = {
|
|
2576
|
+
css: typeof source.css === "string" ? normalizeTailwindConfigDirectives(source.css, path.dirname(file)) : source.css,
|
|
2577
|
+
processed: source.processed
|
|
2578
|
+
};
|
|
2579
|
+
if (previous && shouldKeepPreviousWebpackCssSource(previous, next)) {
|
|
2338
2580
|
currentWebpackCssSourceFiles.add(file);
|
|
2339
2581
|
return;
|
|
2340
2582
|
}
|
|
2341
|
-
webpackCssSources.set(file,
|
|
2342
|
-
css: typeof source.css === "string" ? normalizeTailwindConfigDirectives(source.css, path.dirname(file)) : source.css,
|
|
2343
|
-
processed: source.processed
|
|
2344
|
-
});
|
|
2583
|
+
webpackCssSources.set(file, next);
|
|
2345
2584
|
currentWebpackCssSourceFiles.add(file);
|
|
2346
2585
|
};
|
|
2347
2586
|
const registerWebpackGeneratedCss = (source) => {
|
package/dist/webpack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-BxBOMUtY.js");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-eN8WzIT-.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -204,11 +204,11 @@
|
|
|
204
204
|
"semver": "~7.8.5",
|
|
205
205
|
"yaml": "^2.9.0",
|
|
206
206
|
"@weapp-tailwindcss/logger": "2.0.0",
|
|
207
|
-
"@weapp-tailwindcss/postcss": "3.1.
|
|
207
|
+
"@weapp-tailwindcss/postcss": "3.1.6",
|
|
208
208
|
"@weapp-tailwindcss/reset": "0.1.1",
|
|
209
209
|
"@weapp-tailwindcss/shared": "2.0.0",
|
|
210
210
|
"tailwindcss-config": "2.0.1",
|
|
211
|
-
"weapp-style-injector": "1.0.
|
|
211
|
+
"weapp-style-injector": "1.0.1"
|
|
212
212
|
},
|
|
213
213
|
"devDependencies": {
|
|
214
214
|
"htmlparser2": "12.0.0"
|