weapp-tailwindcss 5.3.3 → 5.3.5
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/bundlers/shared/style-requests.d.ts +1 -0
- package/dist/bundlers/vite/shared/framework-source-candidates-plugin.d.ts +1 -1
- package/dist/bundlers/vite/shared/generic-web-production-fast-path.d.ts +13 -3
- package/dist/{context-Ulhcd5lF.cjs → context-DTLRADfE.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/{gulp-CsssU4xB.cjs → gulp-CUysZjW3.cjs} +4 -4
- package/dist/{gulp-8V2aiU52.js → gulp-DwtrU4V1.js} +1 -1
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-DyiiYupC.cjs → hmr-timing-Cvh5UgnM.cjs} +2 -2
- package/dist/{hmr-timing-CTpjCpQh.js → hmr-timing-utmOgn6p.js} +15 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/{pipeline-helpers-Cda0Ox3K.cjs → pipeline-helpers-CyVXL3h6.cjs} +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{source-candidate-scan-signature-bJFr7L8T.cjs → source-candidate-scan-signature-BNt7NrrI.cjs} +1 -1
- package/dist/{source-candidate-scan-signature--r31NK5J.js → source-candidate-scan-signature-CDrLxVKu.js} +1 -1
- package/dist/{transform-BQjg2T2T.cjs → transform-AfnwH_yx.cjs} +3 -3
- package/dist/{transform-Cp4KybBy.js → transform-BMPNt_vj.js} +2 -2
- package/dist/uni-app-x/vite/style-request.d.ts +0 -1
- package/dist/{v4-generation-core-8YMXikPd.cjs → v4-generation-core-Dhsu9Deu.cjs} +21 -1
- package/dist/{vite-kY-WXrd6.js → vite-mWyHvLB0.js} +38 -29
- package/dist/{vite-CeyMHgzQ.cjs → vite-qxEVovZD.cjs} +41 -32
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +2 -2
- package/dist/{webpack-Bfj63Wt1.cjs → webpack-Cpy_yggg.cjs} +6 -6
- package/dist/{webpack-BN2kLWW_.js → webpack-CzhrD9p3.js} +3 -3
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/{wxml-CQmBCjOR.cjs → wxml-PrK-8ARX.cjs} +66 -27
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function stripRequestQuery(request: string): string;
|
|
2
2
|
export declare function isSourceStyleRequest(request: string | undefined): boolean;
|
|
3
|
+
export declare function isSourcePreprocessorRequest(request: string | undefined, lang?: string): boolean;
|
|
3
4
|
export declare function isVueScopedStyleRequest(request: string | undefined): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
|
-
export declare function createFrameworkSourceCandidatesPlugin(options: any): Plugin;
|
|
2
|
+
export declare function createFrameworkSourceCandidatesPlugin(options: any, apply?: Plugin['apply']): Plugin;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { ResolvedConfig } from 'vite';
|
|
2
|
-
interface
|
|
1
|
+
import type { ConfigEnv, ResolvedConfig, UserConfig } from 'vite';
|
|
2
|
+
interface GenericWebProductionBuildOptions {
|
|
3
3
|
command: ResolvedConfig['command'] | undefined;
|
|
4
4
|
frameworkName: string;
|
|
5
|
-
hasProcessedCss: boolean;
|
|
6
5
|
isWebGeneratorTarget: boolean;
|
|
6
|
+
requiresSourceCandidateState?: boolean;
|
|
7
7
|
watch: ResolvedConfig['build']['watch'] | undefined;
|
|
8
8
|
}
|
|
9
|
+
interface GenericWebProductionFastPathOptions extends GenericWebProductionBuildOptions {
|
|
10
|
+
hasProcessedCss: boolean;
|
|
11
|
+
}
|
|
9
12
|
export interface GenericWebFinalizerFastPathOptions extends GenericWebProductionFastPathOptions {
|
|
10
13
|
hasFrameworkRootImportShells: boolean;
|
|
11
14
|
isHarmonyAppStyleTarget: boolean;
|
|
@@ -19,6 +22,13 @@ interface GenericWebProductionBundleHooksOptions {
|
|
|
19
22
|
onEnd: () => void;
|
|
20
23
|
onStart: () => void;
|
|
21
24
|
}
|
|
25
|
+
interface GenericWebProductionSourceCandidatesApplyOptions {
|
|
26
|
+
frameworkName: string;
|
|
27
|
+
getIsWebGeneratorTarget: () => boolean;
|
|
28
|
+
requiresSourceCandidateState: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function shouldSkipGenericWebProductionSourceCandidates(options: GenericWebProductionBuildOptions): boolean;
|
|
31
|
+
export declare function createGenericWebProductionSourceCandidatesApply(options: GenericWebProductionSourceCandidatesApplyOptions): (config: UserConfig, env: ConfigEnv) => boolean;
|
|
22
32
|
export declare function shouldUseGenericWebProductionFastPath(options: GenericWebProductionFastPathOptions): boolean;
|
|
23
33
|
export declare function shouldUseGenericWebFinalizerFastPath(options: GenericWebFinalizerFastPathOptions): boolean;
|
|
24
34
|
export declare function createGenericWebProductionBundleHooks(options: GenericWebProductionBundleHooksOptions): {
|
|
@@ -4,7 +4,7 @@ const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
|
4
4
|
const require_object = require("./object-DbHtAXRk.cjs");
|
|
5
5
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
6
6
|
require("./utils-CuKLf1Zv.cjs");
|
|
7
|
-
const require_wxml = require("./wxml-
|
|
7
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
8
8
|
const require_defaults = require("./defaults.cjs");
|
|
9
9
|
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
10
10
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
@@ -619,7 +619,7 @@ function toCustomAttributesEntities(customAttributes) {
|
|
|
619
619
|
return Object.entries(customAttributes);
|
|
620
620
|
}
|
|
621
621
|
//#endregion
|
|
622
|
-
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.
|
|
622
|
+
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.146.0_oxc-parser@0.146.0_rolldown@1.2.3/node_modules/oxc-walker/dist/index.mjs
|
|
623
623
|
function isNode(v) {
|
|
624
624
|
return v !== null && typeof v === "object" && typeof v.type === "string";
|
|
625
625
|
}
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_context = require("./context-
|
|
2
|
+
const require_context = require("./context-DTLRADfE.cjs");
|
|
3
3
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
4
4
|
//#region src/core.ts
|
|
5
5
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
3
3
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
4
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
-
const require_wxml = require("./wxml-
|
|
6
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
7
|
-
const require_context = require("./context-
|
|
4
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
5
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
6
|
+
const require_hmr_timing = require("./hmr-timing-Cvh5UgnM.cjs");
|
|
7
|
+
const require_context = require("./context-DTLRADfE.cjs");
|
|
8
8
|
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
9
9
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Pt as getTailwindV4IncrementalGenerateCacheStats, Q as hasTailwindRootDirectives, _ as upsertTailwindV4CssSource, et as normalizeTailwindConfigDirectives, g as removeTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, nt as normalizeTailwindSourceForGenerator, vt as prependConfigDirective } from "./generator-EnTXLBlK.js";
|
|
2
2
|
import { f as resolveSourceScanEntries, l as getRuntimeClassSetSignature } from "./tailwindcss-ChnpCv25.js";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as AssetEmissionPlan, B as rewriteLocalCssImportRequestsForOutput, E as hasBundlerGeneratedCssMarker, F as processCachedTask, G as createRuntimeCompilationBuildState, H as finalizeCompilerShadowRun, I as createRuntimeClassSetManager, J as updateRuntimeCompilationBuildState, K as removeRuntimeCompilationBuildStateFiles, M as createCssSourceTraceCacheSignature, N as createCssTokenSourceMap, O as stripBundlerGeneratedCssMarkers, Q as getCompilerShadowRunSnapshot, T as createBundlerGeneratedCssMarker, U as buildRuntimeCompilationSnapshot, V as splitLocalCssImports, X as disposeCompilerOwner, Y as createRuntimeAffectingSourceSignature, Z as beginCompilerShadowRun, b as finalizeMiniProgramGeneratorCss, et as getCompilationScopeDependencyRevision, it as createSourceCandidateCollector, j as annotateCssSourceTrace, k as finalizeMiniProgramCssStructure, n as emitHmrTiming, nt as recordCompilationDependencyChanges, r as generateTailwindV4Css, rt as createCompilationDependencyChanges, tt as invalidateCompilationScope } from "./hmr-timing-utmOgn6p.js";
|
|
4
4
|
import { m as createDebug } from "./wxml-B7OAVpXJ.js";
|
|
5
5
|
import { l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-4ittVpgt.js";
|
|
6
6
|
import fs from "node:fs";
|
package/dist/gulp.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_gulp = require("./gulp-
|
|
2
|
+
const require_gulp = require("./gulp-CUysZjW3.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
4
|
exports.createPlugins = require_gulp.createPlugins;
|
|
5
5
|
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPlugins } from "./gulp-
|
|
1
|
+
import { t as createPlugins } from "./gulp-DwtrU4V1.js";
|
|
2
2
|
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
4
|
-
const require_wxml = require("./wxml-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
4
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
5
5
|
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
6
6
|
let node_process = require("node:process");
|
|
7
7
|
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
@@ -2632,9 +2632,12 @@ function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
|
2632
2632
|
//#endregion
|
|
2633
2633
|
//#region src/bundlers/shared/style-requests.ts
|
|
2634
2634
|
const SOURCE_STYLE_EXT_RE = /\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/i;
|
|
2635
|
+
const SOURCE_PREPROCESSOR_EXT_RE = /\.(?:scss|sass|less|styl|stylus)$/i;
|
|
2636
|
+
const INLINE_PREPROCESSOR_LANG_RE = /(?:^|[.?&])lang\.(?:scss|sass|less|styl|stylus)(?:[.&]|$)/i;
|
|
2635
2637
|
const STYLE_QUERY_RE = /(?:^|&)type=styles?(?:&|$)/;
|
|
2636
2638
|
const VUE_STYLE_QUERY_RE = /(?:^|&)type=style(?:&|$)/;
|
|
2637
2639
|
const STYLE_LANG_QUERY_RE = /(?:^|&)lang(?:[.=](?:css|scss|sass|less|styl|stylus|pcss|postcss))?(?:&|$)/;
|
|
2640
|
+
const PREPROCESSOR_LANG_QUERY_RE = /(?:^|&)lang[.=](?:scss|sass|less|styl|stylus)(?:&|$)/i;
|
|
2638
2641
|
function stripHash(request) {
|
|
2639
2642
|
const hashIndex = request.indexOf("#");
|
|
2640
2643
|
return hashIndex === -1 ? request : request.slice(0, hashIndex);
|
|
@@ -2647,6 +2650,7 @@ function stripRequestQuery(request) {
|
|
|
2647
2650
|
function isSourceStyleRequest(request) {
|
|
2648
2651
|
if (typeof request !== "string" || request.length === 0) return false;
|
|
2649
2652
|
const normalized = stripHash(request);
|
|
2653
|
+
if (INLINE_PREPROCESSOR_LANG_RE.test(normalized)) return true;
|
|
2650
2654
|
const queryIndex = normalized.indexOf("?");
|
|
2651
2655
|
const pathname = queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
|
|
2652
2656
|
if (SOURCE_STYLE_EXT_RE.test(pathname)) return true;
|
|
@@ -2654,6 +2658,16 @@ function isSourceStyleRequest(request) {
|
|
|
2654
2658
|
const query = normalized.slice(queryIndex + 1);
|
|
2655
2659
|
return STYLE_QUERY_RE.test(query) || STYLE_LANG_QUERY_RE.test(query);
|
|
2656
2660
|
}
|
|
2661
|
+
function isSourcePreprocessorRequest(request, lang) {
|
|
2662
|
+
if (typeof lang === "string" && SOURCE_PREPROCESSOR_EXT_RE.test(`.${lang}`)) return true;
|
|
2663
|
+
if (typeof request !== "string" || request.length === 0) return false;
|
|
2664
|
+
const normalized = stripHash(request);
|
|
2665
|
+
if (INLINE_PREPROCESSOR_LANG_RE.test(normalized)) return true;
|
|
2666
|
+
const queryIndex = normalized.indexOf("?");
|
|
2667
|
+
const pathname = queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
|
|
2668
|
+
if (SOURCE_PREPROCESSOR_EXT_RE.test(pathname)) return true;
|
|
2669
|
+
return queryIndex !== -1 && PREPROCESSOR_LANG_QUERY_RE.test(normalized.slice(queryIndex + 1));
|
|
2670
|
+
}
|
|
2657
2671
|
function isVueScopedStyleRequest(request) {
|
|
2658
2672
|
if (typeof request !== "string" || request.length === 0) return false;
|
|
2659
2673
|
const normalized = stripHash(request);
|
|
@@ -5851,4 +5865,4 @@ function createHmrTimingRecorder(bundler) {
|
|
|
5851
5865
|
};
|
|
5852
5866
|
}
|
|
5853
5867
|
//#endregion
|
|
5854
|
-
export {
|
|
5868
|
+
export { AssetEmissionPlan as $, hasEmptyAtRuleBlockCandidate as A, rewriteLocalCssImportRequestsForOutput as B, isSourceStyleRequest as C, parseBundlerGeneratedCssMarkerBlocks as D, hasBundlerGeneratedCssMarker as E, processCachedTask as F, createRuntimeCompilationBuildState as G, finalizeCompilerShadowRun as H, createRuntimeClassSetManager as I, updateRuntimeCompilationBuildState as J, removeRuntimeCompilationBuildStateFiles as K, collectStrictEscapedRuntimeCandidates as L, createCssSourceTraceCacheSignature as M, createCssTokenSourceMap as N, stripBundlerGeneratedCssMarkers as O, isCssSourceTraceEnabled as P, getCompilerShadowRunSnapshot as Q, createEscapeFragments as R, isSourcePreprocessorRequest as S, createBundlerGeneratedCssMarker as T, buildRuntimeCompilationSnapshot as U, splitLocalCssImports as V, createRuntimeCompilationAffectingSignature as W, disposeCompilerOwner as X, createRuntimeAffectingSourceSignature as Y, beginCompilerShadowRun as Z, captureResolvedFrameworkPostcssOptions as _, extractMarkedUserLayerComponentsCss as a, createSourceCandidateStore as at, finalizeMiniProgramGeneratorCss as b, collectRawSourceClassSelectors as c, createSourceCandidateEligibilityMatcher as ct, runWithConcurrency as d, getCompilationScopeDependencyRevision as et, normalizeMiniProgramGeneratorCssSource as f, captureFrameworkPostcssOptions as g, removeGeneratedSelectorCompatCss as h, validateCandidatesByGenerator as i, createSourceCandidateCollector as it, annotateCssSourceTrace as j, finalizeMiniProgramCssStructure as k, pushConcurrentTaskFactories as l, resolveSourceCandidateScanFiles as lt, scoreTailwindV4CssSourceFileMatch as m, emitHmrTiming as n, recordCompilationDependencyChanges as nt, mergeMarkedUserLayerComponentsCss as o, isSourceCandidateRequest as ot, normalizeMiniProgramImportShell as p, resetRuntimeCompilationBuildState as q, generateTailwindV4Css as r, createCompilationDependencyChanges as rt, collectGeneratedRawSourceCandidatesFromCss as s, extractCandidatesFromSource as st, createHmrTimingRecorder as t, invalidateCompilationScope as tt, resolveTaskConcurrency as u, collectFrameworkPostcssOptionsFromLoaderEntries as v, stripRequestQuery as w, hasMiniProgramTailwindV4PreflightReset as x, createCssSourceOrderAppend as y, isPureLocalCssImportWrapper as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
3
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
4
|
-
const require_gulp = require("./gulp-
|
|
4
|
+
const require_gulp = require("./gulp-CUysZjW3.cjs");
|
|
5
5
|
const require_postcss = require("./postcss.cjs");
|
|
6
|
-
const require_vite = require("./vite-
|
|
7
|
-
const require_webpack = require("./webpack-
|
|
6
|
+
const require_vite = require("./vite-qxEVovZD.cjs");
|
|
7
|
+
const require_webpack = require("./webpack-Cpy_yggg.cjs");
|
|
8
8
|
require("./webpack.cjs");
|
|
9
9
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
10
10
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.js";
|
|
2
2
|
import { t as createWeappTailwindcssGenerator } from "./generator-EnTXLBlK.js";
|
|
3
|
-
import { t as createPlugins } from "./gulp-
|
|
3
|
+
import { t as createPlugins } from "./gulp-DwtrU4V1.js";
|
|
4
4
|
import weappTailwindcssPostcssPlugin from "./postcss.js";
|
|
5
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
6
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-mWyHvLB0.js";
|
|
6
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-CzhrD9p3.js";
|
|
7
7
|
import "./webpack.js";
|
|
8
8
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
9
9
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
4
4
|
const require_defaults = require("./defaults.cjs");
|
|
5
5
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
6
6
|
let node_path = require("node:path");
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
4
|
-
const require_webpack = require("./webpack-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
4
|
+
const require_webpack = require("./webpack-Cpy_yggg.cjs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
7
|
//#region src/bundlers/rspack/rule-match.ts
|
package/dist/rspack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { C as isSourceStyleRequest } from "./hmr-timing-utmOgn6p.js";
|
|
2
|
+
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-CzhrD9p3.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
//#region src/bundlers/rspack/rule-match.ts
|
|
5
5
|
const STYLE_RULE_PROBES = [
|
|
@@ -3,7 +3,7 @@ const require_framework = require("./framework.cjs");
|
|
|
3
3
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
4
4
|
require("./auto-DtU6f3X6.cjs");
|
|
5
5
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
6
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
9
|
let node_module = require("node:module");
|
|
@@ -2,7 +2,7 @@ import { detectAppType } from "./framework.js";
|
|
|
2
2
|
import { At as toPosixPath } from "./generator-EnTXLBlK.js";
|
|
3
3
|
import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-2dg_uhEJ.js";
|
|
4
4
|
import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-ChnpCv25.js";
|
|
5
|
-
import {
|
|
5
|
+
import { C as isSourceStyleRequest } from "./hmr-timing-utmOgn6p.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { weappStyleInjector } from "weapp-style-injector/vite";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_object = require("./object-DbHtAXRk.cjs");
|
|
2
|
-
const require_wxml = require("./wxml-
|
|
2
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
3
3
|
const require_local_style_matcher = require("./local-style-matcher-DRpFEu1s.cjs");
|
|
4
4
|
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
5
5
|
let _vue_compiler_dom = require("@vue/compiler-dom");
|
|
@@ -461,12 +461,12 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
if (descriptor.script) {
|
|
464
|
+
if (descriptor.script && descriptor.script.start < descriptor.script.end) {
|
|
465
465
|
localStyleCollector?.collectRuntimeClasses(descriptor.script.content);
|
|
466
466
|
const { code } = jsHandler(descriptor.script.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
|
|
467
467
|
ms.update(descriptor.script.start, descriptor.script.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
|
|
468
468
|
}
|
|
469
|
-
if (descriptor.scriptSetup) {
|
|
469
|
+
if (descriptor.scriptSetup && descriptor.scriptSetup.start < descriptor.scriptSetup.end) {
|
|
470
470
|
localStyleCollector?.collectRuntimeClasses(descriptor.scriptSetup.content);
|
|
471
471
|
const { code } = jsHandler(descriptor.scriptSetup.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
|
|
472
472
|
ms.update(descriptor.scriptSetup.start, descriptor.scriptSetup.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
|
|
@@ -462,12 +462,12 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
if (descriptor.script) {
|
|
465
|
+
if (descriptor.script && descriptor.script.start < descriptor.script.end) {
|
|
466
466
|
localStyleCollector?.collectRuntimeClasses(descriptor.script.content);
|
|
467
467
|
const { code } = jsHandler(descriptor.script.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
|
|
468
468
|
ms.update(descriptor.script.start, descriptor.script.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
|
|
469
469
|
}
|
|
470
|
-
if (descriptor.scriptSetup) {
|
|
470
|
+
if (descriptor.scriptSetup && descriptor.scriptSetup.start < descriptor.scriptSetup.end) {
|
|
471
471
|
localStyleCollector?.collectRuntimeClasses(descriptor.scriptSetup.content);
|
|
472
472
|
const { code } = jsHandler(descriptor.scriptSetup.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
|
|
473
473
|
ms.update(descriptor.scriptSetup.start, descriptor.scriptSetup.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
|
|
@@ -5,7 +5,6 @@ export declare function normalizeRelativeTailwindReferences(code: string, id: st
|
|
|
5
5
|
interface ResolvePreprocessorTransformOptions {
|
|
6
6
|
isIosPlatform: boolean;
|
|
7
7
|
isNativeAppStyleTarget: boolean;
|
|
8
|
-
isWebGeneratorTarget: boolean;
|
|
9
8
|
}
|
|
10
9
|
export declare function resolvePreprocessorTransform(code: string, id: string, lang: string | undefined, options: ResolvePreprocessorTransformOptions): {
|
|
11
10
|
result: {
|
|
@@ -3,7 +3,7 @@ const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
|
3
3
|
require("./auto-DtU6f3X6.cjs");
|
|
4
4
|
const require_object = require("./object-DbHtAXRk.cjs");
|
|
5
5
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
6
|
-
const require_wxml = require("./wxml-
|
|
6
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
7
7
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -2233,9 +2233,12 @@ function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
|
2233
2233
|
//#endregion
|
|
2234
2234
|
//#region src/bundlers/shared/style-requests.ts
|
|
2235
2235
|
const SOURCE_STYLE_EXT_RE = /\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/i;
|
|
2236
|
+
const SOURCE_PREPROCESSOR_EXT_RE = /\.(?:scss|sass|less|styl|stylus)$/i;
|
|
2237
|
+
const INLINE_PREPROCESSOR_LANG_RE = /(?:^|[.?&])lang\.(?:scss|sass|less|styl|stylus)(?:[.&]|$)/i;
|
|
2236
2238
|
const STYLE_QUERY_RE = /(?:^|&)type=styles?(?:&|$)/;
|
|
2237
2239
|
const VUE_STYLE_QUERY_RE = /(?:^|&)type=style(?:&|$)/;
|
|
2238
2240
|
const STYLE_LANG_QUERY_RE = /(?:^|&)lang(?:[.=](?:css|scss|sass|less|styl|stylus|pcss|postcss))?(?:&|$)/;
|
|
2241
|
+
const PREPROCESSOR_LANG_QUERY_RE = /(?:^|&)lang[.=](?:scss|sass|less|styl|stylus)(?:&|$)/i;
|
|
2239
2242
|
function stripHash(request) {
|
|
2240
2243
|
const hashIndex = request.indexOf("#");
|
|
2241
2244
|
return hashIndex === -1 ? request : request.slice(0, hashIndex);
|
|
@@ -2248,6 +2251,7 @@ function stripRequestQuery(request) {
|
|
|
2248
2251
|
function isSourceStyleRequest(request) {
|
|
2249
2252
|
if (typeof request !== "string" || request.length === 0) return false;
|
|
2250
2253
|
const normalized = stripHash(request);
|
|
2254
|
+
if (INLINE_PREPROCESSOR_LANG_RE.test(normalized)) return true;
|
|
2251
2255
|
const queryIndex = normalized.indexOf("?");
|
|
2252
2256
|
const pathname = queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
|
|
2253
2257
|
if (SOURCE_STYLE_EXT_RE.test(pathname)) return true;
|
|
@@ -2255,6 +2259,16 @@ function isSourceStyleRequest(request) {
|
|
|
2255
2259
|
const query = normalized.slice(queryIndex + 1);
|
|
2256
2260
|
return STYLE_QUERY_RE.test(query) || STYLE_LANG_QUERY_RE.test(query);
|
|
2257
2261
|
}
|
|
2262
|
+
function isSourcePreprocessorRequest(request, lang) {
|
|
2263
|
+
if (typeof lang === "string" && SOURCE_PREPROCESSOR_EXT_RE.test(`.${lang}`)) return true;
|
|
2264
|
+
if (typeof request !== "string" || request.length === 0) return false;
|
|
2265
|
+
const normalized = stripHash(request);
|
|
2266
|
+
if (INLINE_PREPROCESSOR_LANG_RE.test(normalized)) return true;
|
|
2267
|
+
const queryIndex = normalized.indexOf("?");
|
|
2268
|
+
const pathname = queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
|
|
2269
|
+
if (SOURCE_PREPROCESSOR_EXT_RE.test(pathname)) return true;
|
|
2270
|
+
return queryIndex !== -1 && PREPROCESSOR_LANG_QUERY_RE.test(normalized.slice(queryIndex + 1));
|
|
2271
|
+
}
|
|
2258
2272
|
function isVueScopedStyleRequest(request) {
|
|
2259
2273
|
if (typeof request !== "string" || request.length === 0) return false;
|
|
2260
2274
|
const normalized = stripHash(request);
|
|
@@ -5584,6 +5598,12 @@ Object.defineProperty(exports, "isSourceCandidateRequest", {
|
|
|
5584
5598
|
return isSourceCandidateRequest;
|
|
5585
5599
|
}
|
|
5586
5600
|
});
|
|
5601
|
+
Object.defineProperty(exports, "isSourcePreprocessorRequest", {
|
|
5602
|
+
enumerable: true,
|
|
5603
|
+
get: function() {
|
|
5604
|
+
return isSourcePreprocessorRequest;
|
|
5605
|
+
}
|
|
5606
|
+
});
|
|
5587
5607
|
Object.defineProperty(exports, "isSourceStyleRequest", {
|
|
5588
5608
|
enumerable: true,
|
|
5589
5609
|
get: function() {
|
|
@@ -3,10 +3,10 @@ import { $ as hasTailwindSourceDirectives, B as stripMiniProgramCssSpecificityPl
|
|
|
3
3
|
import { t as omitUndefined } from "./object-B-8IHefx.js";
|
|
4
4
|
import { a as findTailwindConfig, f as resolveSourceScanEntries, g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions, l as getRuntimeClassSetSignature, m as resolveTailwindV4CssDependencies, p as discoverTailwindV4CssEntries, r as isUniAppXEnabled } from "./tailwindcss-ChnpCv25.js";
|
|
5
5
|
import "./utils-MVwpU07P.js";
|
|
6
|
-
import { A as
|
|
6
|
+
import { $ as AssetEmissionPlan, A as hasEmptyAtRuleBlockCandidate, C as isSourceStyleRequest, D as parseBundlerGeneratedCssMarkerBlocks, E as hasBundlerGeneratedCssMarker, F as processCachedTask, G as createRuntimeCompilationBuildState, H as finalizeCompilerShadowRun, I as createRuntimeClassSetManager, J as updateRuntimeCompilationBuildState, M as createCssSourceTraceCacheSignature, N as createCssTokenSourceMap, O as stripBundlerGeneratedCssMarkers, P as isCssSourceTraceEnabled, S as isSourcePreprocessorRequest, T as createBundlerGeneratedCssMarker, U as buildRuntimeCompilationSnapshot, X as disposeCompilerOwner, Y as createRuntimeAffectingSourceSignature, Z as beginCompilerShadowRun, a as extractMarkedUserLayerComponentsCss, ct as createSourceCandidateEligibilityMatcher, d as runWithConcurrency, f as normalizeMiniProgramGeneratorCssSource, g as captureFrameworkPostcssOptions, i as validateCandidatesByGenerator, it as createSourceCandidateCollector, j as annotateCssSourceTrace, k as finalizeMiniProgramCssStructure, m as scoreTailwindV4CssSourceFileMatch, nt as recordCompilationDependencyChanges, o as mergeMarkedUserLayerComponentsCss, ot as isSourceCandidateRequest, p as normalizeMiniProgramImportShell, r as generateTailwindV4Css, rt as createCompilationDependencyChanges, s as collectGeneratedRawSourceCandidatesFromCss, st as extractCandidatesFromSource, t as createHmrTimingRecorder, w as stripRequestQuery, z as isPureLocalCssImportWrapper } from "./hmr-timing-utmOgn6p.js";
|
|
7
7
|
import { m as createDebug, p as replaceWxml } from "./wxml-B7OAVpXJ.js";
|
|
8
8
|
import { a as vitePluginName, c as collectRuntimeClassSet, d as refreshTailwindRuntimeState, f as normalizeFrameworkStylePlatform, l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, s as toCustomAttributesEntities, t as getCompilerContext } from "./context-4ittVpgt.js";
|
|
9
|
-
import { _ as createBuiltinViteStyleInjectorPlugins, a as createCandidateSignature, c as getSnapshotHash, d as classifyRuntimeEntry, f as resolvePackageDir, g as toAbsoluteOutputPath, h as resolveOutputSpecifier, i as createScopedGeneratorSourceTraceMap, l as hasRuntimeAffectingSourceChanges, m as normalizeOutputPathKey, n as createScopedGeneratorCandidateSignature, o as createJsHashSalt, p as resolvePluginDisabledState, r as createScopedGeneratorRuntime, s as createLinkedImpactSignature, t as createSourceCandidateScanSignature, u as summarizeStringDiff, x as resolveViteFrameworkProfile, y as viteStyleInjectorDelegates } from "./source-candidate-scan-signature
|
|
9
|
+
import { _ as createBuiltinViteStyleInjectorPlugins, a as createCandidateSignature, c as getSnapshotHash, d as classifyRuntimeEntry, f as resolvePackageDir, g as toAbsoluteOutputPath, h as resolveOutputSpecifier, i as createScopedGeneratorSourceTraceMap, l as hasRuntimeAffectingSourceChanges, m as normalizeOutputPathKey, n as createScopedGeneratorCandidateSignature, o as createJsHashSalt, p as resolvePluginDisabledState, r as createScopedGeneratorRuntime, s as createLinkedImpactSignature, t as createSourceCandidateScanSignature, u as summarizeStringDiff, x as resolveViteFrameworkProfile, y as viteStyleInjectorDelegates } from "./source-candidate-scan-signature-CDrLxVKu.js";
|
|
10
10
|
import { n as shouldEnableComponentLocalStyle, r as shouldEnablePageLocalStyle, t as normalizeUniAppXLocalStyleId } from "./local-style-matcher-DsiI2wIc.js";
|
|
11
11
|
import { t as logger$1 } from "./logger-BNzxZbZj.js";
|
|
12
12
|
import fs, { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
@@ -2092,17 +2092,17 @@ function extractSfcStyleSources(source) {
|
|
|
2092
2092
|
function hasSfcStyleSources(source) {
|
|
2093
2093
|
return extractSfcStyleSources(source).length > 0;
|
|
2094
2094
|
}
|
|
2095
|
+
function resolveSfcStyleBlockLang(attrs) {
|
|
2096
|
+
const match = SFC_LANG_STYLE_ATTR_RE.exec(attrs);
|
|
2097
|
+
return match?.[1] ?? match?.[2] ?? match?.[3];
|
|
2098
|
+
}
|
|
2095
2099
|
function resolveSfcStyleHandlerSourceFile(sourceFile, styleBlocks) {
|
|
2096
2100
|
const scopedStyleBlock = styleBlocks.find((style) => style.scoped);
|
|
2097
|
-
return scopedStyleBlock ? `${sourceFile}?vue&type=style&index=${scopedStyleBlock.index}&scoped=true` : sourceFile;
|
|
2101
|
+
return scopedStyleBlock ? [`${sourceFile}?vue&type=style&index=${scopedStyleBlock.index}&scoped=true`, ...resolveSfcStyleBlockLang(scopedStyleBlock.attrs) ? [`lang=${encodeURIComponent(resolveSfcStyleBlockLang(scopedStyleBlock.attrs))}`] : []].join("&") : sourceFile;
|
|
2098
2102
|
}
|
|
2099
2103
|
function normalizeSfcStyleSourceForCompare(source) {
|
|
2100
2104
|
return source.replace(/\r\n?/g, "\n").trim();
|
|
2101
2105
|
}
|
|
2102
|
-
function resolveSfcStyleBlockLang(attrs) {
|
|
2103
|
-
const match = SFC_LANG_STYLE_ATTR_RE.exec(attrs);
|
|
2104
|
-
return match?.[1] ?? match?.[2] ?? match?.[3];
|
|
2105
|
-
}
|
|
2106
2106
|
function createSfcStyleRequest(sourceFile, styleBlock) {
|
|
2107
2107
|
const params = new URLSearchParams();
|
|
2108
2108
|
params.set("vue", "");
|
|
@@ -6242,25 +6242,12 @@ function createUniAppXNativeBuildTargetResolver(getResolvedConfig) {
|
|
|
6242
6242
|
}
|
|
6243
6243
|
//#endregion
|
|
6244
6244
|
//#region src/uni-app-x/vite/style-request.ts
|
|
6245
|
-
const preprocessorLangs = /* @__PURE__ */ new Set([
|
|
6246
|
-
"scss",
|
|
6247
|
-
"sass",
|
|
6248
|
-
"less",
|
|
6249
|
-
"styl",
|
|
6250
|
-
"stylus"
|
|
6251
|
-
]);
|
|
6252
|
-
const INLINE_LANG_RE = /lang\.([a-z]+)/i;
|
|
6253
|
-
const PREPROCESSOR_EXT_RE = /\.(?:scss|sass|less|styl|stylus)(?:\?|$)/i;
|
|
6254
6245
|
const UVUE_NVUE_RE$1 = /\.(?:uvue|nvue)$/;
|
|
6255
6246
|
const CSS_MODULE_EXPORT_RE = /^\s*export\s+default\s+(?:\{|\w|\[\])/;
|
|
6256
6247
|
const RELATIVE_REFERENCE_RE = /@reference\s+(["'])(\.\.?[\\/][^"']+)\1\s*;?/g;
|
|
6257
6248
|
const WINDOWS_ABSOLUTE_PATH_RE = /^[a-z]:[\\/]/i;
|
|
6258
6249
|
function isPreprocessorRequest(id, lang) {
|
|
6259
|
-
|
|
6260
|
-
if (normalizedLang && preprocessorLangs.has(normalizedLang)) return true;
|
|
6261
|
-
const inlineLang = id.match(INLINE_LANG_RE)?.[1];
|
|
6262
|
-
if (inlineLang && preprocessorLangs.has(inlineLang.toLowerCase())) return true;
|
|
6263
|
-
return PREPROCESSOR_EXT_RE.test(id);
|
|
6250
|
+
return isSourcePreprocessorRequest(id, lang);
|
|
6264
6251
|
}
|
|
6265
6252
|
function resolveUniAppXCssTarget(id) {
|
|
6266
6253
|
return UVUE_NVUE_RE$1.test(cleanUrl$1(id)) ? "uvue" : void 0;
|
|
@@ -6286,7 +6273,7 @@ function resolvePreprocessorTransform(code, id, lang, options) {
|
|
|
6286
6273
|
map: null
|
|
6287
6274
|
} };
|
|
6288
6275
|
}
|
|
6289
|
-
if (
|
|
6276
|
+
if (!options.isNativeAppStyleTarget) return { result: void 0 };
|
|
6290
6277
|
}
|
|
6291
6278
|
//#endregion
|
|
6292
6279
|
//#region src/uni-app-x/vite/web-local-style.ts
|
|
@@ -6318,7 +6305,7 @@ function createUniAppXWebLocalStyleBridge(isEnabled) {
|
|
|
6318
6305
|
//#region src/uni-app-x/vite.ts
|
|
6319
6306
|
let transformUVuePromise;
|
|
6320
6307
|
function loadTransformUVue() {
|
|
6321
|
-
transformUVuePromise ?? (transformUVuePromise = import("./transform-
|
|
6308
|
+
transformUVuePromise ?? (transformUVuePromise = import("./transform-BMPNt_vj.js").then((mod) => mod.transformUVue));
|
|
6322
6309
|
return transformUVuePromise;
|
|
6323
6310
|
}
|
|
6324
6311
|
const UVUE_NVUE_QUERY_RE = /\.(?:uvue|nvue)(?:\?.*)?$/;
|
|
@@ -6448,8 +6435,7 @@ function createUniAppXPlugins(options) {
|
|
|
6448
6435
|
const styleCode = query.vue && query.type === "style" ? webLocalStyle.appendToStyle(code, id) : code;
|
|
6449
6436
|
const preprocessor = resolvePreprocessorTransform(styleCode, id, query.lang, {
|
|
6450
6437
|
isIosPlatform,
|
|
6451
|
-
isNativeAppStyleTarget: isNativeAppStyleTarget()
|
|
6452
|
-
isWebGeneratorTarget: isWebGeneratorTarget()
|
|
6438
|
+
isNativeAppStyleTarget: isNativeAppStyleTarget()
|
|
6453
6439
|
});
|
|
6454
6440
|
if (preprocessor) return preprocessor.result ?? (styleCode !== code ? {
|
|
6455
6441
|
code: styleCode,
|
|
@@ -6748,7 +6734,7 @@ function logBundleProcessPlan(options) {
|
|
|
6748
6734
|
//#region src/bundlers/vite/generate-bundle/remembered-css-replay.ts
|
|
6749
6735
|
function shouldSkipRawRememberedCssSource(rawSource, sourceFile) {
|
|
6750
6736
|
const cleanSourceFile = sourceFile.replace(/[?#].*$/, "");
|
|
6751
|
-
return SOURCE_STYLE_OUTPUT_EXT_RE.test(cleanSourceFile) && !canProcessViteSourceStyleAsCss(rawSource, sourceFile);
|
|
6737
|
+
return (SOURCE_STYLE_OUTPUT_EXT_RE.test(cleanSourceFile) || isSourcePreprocessorRequest(sourceFile)) && !canProcessViteSourceStyleAsCss(rawSource, sourceFile);
|
|
6752
6738
|
}
|
|
6753
6739
|
function resolveRememberedCssReplayOutputFile(outputFile, targetByFile) {
|
|
6754
6740
|
const outputKey = normalizeOutputPathKey(outputFile);
|
|
@@ -8152,10 +8138,28 @@ function createGenerateBundleHook(context) {
|
|
|
8152
8138
|
//#endregion
|
|
8153
8139
|
//#region src/bundlers/vite/shared/generic-web-production-fast-path.ts
|
|
8154
8140
|
/**
|
|
8141
|
+
* Generic Web 非 watch 生产构建由 Tailwind Scanner 直接提供候选,不需要重复维护小程序候选状态。
|
|
8142
|
+
*/
|
|
8143
|
+
function shouldSkipGenericWebProductionSourceCandidates(options) {
|
|
8144
|
+
return options.frameworkName === "generic" && options.command === "build" && options.watch == null && options.isWebGeneratorTarget && options.requiresSourceCandidateState !== true;
|
|
8145
|
+
}
|
|
8146
|
+
/**
|
|
8147
|
+
* 在 Vite 解析插件列表时排除无需维护的候选层,避免其 hooks 进入模块图。
|
|
8148
|
+
*/
|
|
8149
|
+
function createGenericWebProductionSourceCandidatesApply(options) {
|
|
8150
|
+
return (config, env) => !shouldSkipGenericWebProductionSourceCandidates({
|
|
8151
|
+
command: env.command,
|
|
8152
|
+
frameworkName: options.frameworkName,
|
|
8153
|
+
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
8154
|
+
requiresSourceCandidateState: options.requiresSourceCandidateState,
|
|
8155
|
+
watch: config.build?.watch
|
|
8156
|
+
});
|
|
8157
|
+
}
|
|
8158
|
+
/**
|
|
8155
8159
|
* Generic Web 生产构建的 CSS 已在 Vite transform 阶段生成时,不需要再建立面向小程序的完整产物快照。
|
|
8156
8160
|
*/
|
|
8157
8161
|
function shouldUseGenericWebProductionFastPath(options) {
|
|
8158
|
-
return options
|
|
8162
|
+
return shouldSkipGenericWebProductionSourceCandidates(options) && options.hasProcessedCss;
|
|
8159
8163
|
}
|
|
8160
8164
|
/**
|
|
8161
8165
|
* Finalizer fast path 只处理无小程序结构语义的 Generic Web 生产产物。
|
|
@@ -9750,7 +9754,7 @@ function sameStringList(first, second) {
|
|
|
9750
9754
|
}
|
|
9751
9755
|
//#endregion
|
|
9752
9756
|
//#region src/bundlers/vite/shared/framework-source-candidates-plugin.ts
|
|
9753
|
-
function createFrameworkSourceCandidatesPlugin(options) {
|
|
9757
|
+
function createFrameworkSourceCandidatesPlugin(options, apply) {
|
|
9754
9758
|
const hasDifferentHotModules = (left, right) => left.length !== right.length || left.some((mod, index) => mod !== right[index]);
|
|
9755
9759
|
const hasTemplateHotSourceModule = (modules) => modules.some((mod) => {
|
|
9756
9760
|
const request = mod.url ?? mod.id;
|
|
@@ -9781,6 +9785,7 @@ function createFrameworkSourceCandidatesPlugin(options) {
|
|
|
9781
9785
|
};
|
|
9782
9786
|
return {
|
|
9783
9787
|
name: `${vitePluginName}:source-candidates`,
|
|
9788
|
+
apply,
|
|
9784
9789
|
enforce: "pre",
|
|
9785
9790
|
async load(id) {
|
|
9786
9791
|
if (!options.shouldOwnTailwindGeneration || options.isWebOrNativeAppPlatform(options.resolveViteStylePlatform()) || !isCSSRequest(id) || !shouldCollectTransformedSourceCandidates(id)) return;
|
|
@@ -10918,7 +10923,11 @@ ${tracedCss}`;
|
|
|
10918
10923
|
tailwindRootCssModuleIds,
|
|
10919
10924
|
transformEarlyMiniProgramCss,
|
|
10920
10925
|
viteProcessedCssSourceFiles: processedCssRegistry.sourceFiles
|
|
10921
|
-
}
|
|
10926
|
+
}, createGenericWebProductionSourceCandidatesApply({
|
|
10927
|
+
frameworkName: frameworkBranch.frameworkName,
|
|
10928
|
+
getIsWebGeneratorTarget: () => resolveCurrentGeneratorBranch().isWeb,
|
|
10929
|
+
requiresSourceCandidateState: isCssSourceTraceEnabled(opts)
|
|
10930
|
+
}));
|
|
10922
10931
|
const postPlugin = createFrameworkPostPlugin({
|
|
10923
10932
|
api: { registerProcessedCssAsset(entry) {
|
|
10924
10933
|
markViteProcessedCssSource(entry.sourceFile);
|
|
@@ -4,13 +4,13 @@ const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
|
4
4
|
const require_object = require("./object-DbHtAXRk.cjs");
|
|
5
5
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
6
6
|
require("./utils-CuKLf1Zv.cjs");
|
|
7
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
8
|
-
const require_wxml = require("./wxml-
|
|
9
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
10
|
-
const require_context = require("./context-
|
|
7
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
8
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
9
|
+
const require_hmr_timing = require("./hmr-timing-Cvh5UgnM.cjs");
|
|
10
|
+
const require_context = require("./context-DTLRADfE.cjs");
|
|
11
11
|
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
12
12
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
13
|
-
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-
|
|
13
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-BNt7NrrI.cjs");
|
|
14
14
|
const require_local_style_matcher = require("./local-style-matcher-DRpFEu1s.cjs");
|
|
15
15
|
require("./logger-TlKT3xmR.cjs");
|
|
16
16
|
const require_css_imports = require("./css-imports-BFMU7Hpd.cjs");
|
|
@@ -2101,17 +2101,17 @@ function extractSfcStyleSources(source) {
|
|
|
2101
2101
|
function hasSfcStyleSources(source) {
|
|
2102
2102
|
return extractSfcStyleSources(source).length > 0;
|
|
2103
2103
|
}
|
|
2104
|
+
function resolveSfcStyleBlockLang(attrs) {
|
|
2105
|
+
const match = SFC_LANG_STYLE_ATTR_RE.exec(attrs);
|
|
2106
|
+
return match?.[1] ?? match?.[2] ?? match?.[3];
|
|
2107
|
+
}
|
|
2104
2108
|
function resolveSfcStyleHandlerSourceFile(sourceFile, styleBlocks) {
|
|
2105
2109
|
const scopedStyleBlock = styleBlocks.find((style) => style.scoped);
|
|
2106
|
-
return scopedStyleBlock ? `${sourceFile}?vue&type=style&index=${scopedStyleBlock.index}&scoped=true` : sourceFile;
|
|
2110
|
+
return scopedStyleBlock ? [`${sourceFile}?vue&type=style&index=${scopedStyleBlock.index}&scoped=true`, ...resolveSfcStyleBlockLang(scopedStyleBlock.attrs) ? [`lang=${encodeURIComponent(resolveSfcStyleBlockLang(scopedStyleBlock.attrs))}`] : []].join("&") : sourceFile;
|
|
2107
2111
|
}
|
|
2108
2112
|
function normalizeSfcStyleSourceForCompare(source) {
|
|
2109
2113
|
return source.replace(/\r\n?/g, "\n").trim();
|
|
2110
2114
|
}
|
|
2111
|
-
function resolveSfcStyleBlockLang(attrs) {
|
|
2112
|
-
const match = SFC_LANG_STYLE_ATTR_RE.exec(attrs);
|
|
2113
|
-
return match?.[1] ?? match?.[2] ?? match?.[3];
|
|
2114
|
-
}
|
|
2115
2115
|
function createSfcStyleRequest(sourceFile, styleBlock) {
|
|
2116
2116
|
const params = new URLSearchParams();
|
|
2117
2117
|
params.set("vue", "");
|
|
@@ -6251,25 +6251,12 @@ function createUniAppXNativeBuildTargetResolver(getResolvedConfig) {
|
|
|
6251
6251
|
}
|
|
6252
6252
|
//#endregion
|
|
6253
6253
|
//#region src/uni-app-x/vite/style-request.ts
|
|
6254
|
-
const preprocessorLangs = /* @__PURE__ */ new Set([
|
|
6255
|
-
"scss",
|
|
6256
|
-
"sass",
|
|
6257
|
-
"less",
|
|
6258
|
-
"styl",
|
|
6259
|
-
"stylus"
|
|
6260
|
-
]);
|
|
6261
|
-
const INLINE_LANG_RE = /lang\.([a-z]+)/i;
|
|
6262
|
-
const PREPROCESSOR_EXT_RE = /\.(?:scss|sass|less|styl|stylus)(?:\?|$)/i;
|
|
6263
6254
|
const UVUE_NVUE_RE$1 = /\.(?:uvue|nvue)$/;
|
|
6264
6255
|
const CSS_MODULE_EXPORT_RE = /^\s*export\s+default\s+(?:\{|\w|\[\])/;
|
|
6265
6256
|
const RELATIVE_REFERENCE_RE = /@reference\s+(["'])(\.\.?[\\/][^"']+)\1\s*;?/g;
|
|
6266
6257
|
const WINDOWS_ABSOLUTE_PATH_RE = /^[a-z]:[\\/]/i;
|
|
6267
6258
|
function isPreprocessorRequest(id, lang) {
|
|
6268
|
-
|
|
6269
|
-
if (normalizedLang && preprocessorLangs.has(normalizedLang)) return true;
|
|
6270
|
-
const inlineLang = id.match(INLINE_LANG_RE)?.[1];
|
|
6271
|
-
if (inlineLang && preprocessorLangs.has(inlineLang.toLowerCase())) return true;
|
|
6272
|
-
return PREPROCESSOR_EXT_RE.test(id);
|
|
6259
|
+
return require_v4_generation_core.isSourcePreprocessorRequest(id, lang);
|
|
6273
6260
|
}
|
|
6274
6261
|
function resolveUniAppXCssTarget(id) {
|
|
6275
6262
|
return UVUE_NVUE_RE$1.test((0, _weapp_tailwindcss_shared.cleanUrl)(id)) ? "uvue" : void 0;
|
|
@@ -6295,7 +6282,7 @@ function resolvePreprocessorTransform(code, id, lang, options) {
|
|
|
6295
6282
|
map: null
|
|
6296
6283
|
} };
|
|
6297
6284
|
}
|
|
6298
|
-
if (
|
|
6285
|
+
if (!options.isNativeAppStyleTarget) return { result: void 0 };
|
|
6299
6286
|
}
|
|
6300
6287
|
//#endregion
|
|
6301
6288
|
//#region src/uni-app-x/vite/web-local-style.ts
|
|
@@ -6327,7 +6314,7 @@ function createUniAppXWebLocalStyleBridge(isEnabled) {
|
|
|
6327
6314
|
//#region src/uni-app-x/vite.ts
|
|
6328
6315
|
let transformUVuePromise;
|
|
6329
6316
|
function loadTransformUVue() {
|
|
6330
|
-
transformUVuePromise ?? (transformUVuePromise = Promise.resolve().then(() => require("./transform-
|
|
6317
|
+
transformUVuePromise ?? (transformUVuePromise = Promise.resolve().then(() => require("./transform-AfnwH_yx.cjs")).then((mod) => mod.transformUVue));
|
|
6331
6318
|
return transformUVuePromise;
|
|
6332
6319
|
}
|
|
6333
6320
|
const UVUE_NVUE_QUERY_RE = /\.(?:uvue|nvue)(?:\?.*)?$/;
|
|
@@ -6457,8 +6444,7 @@ function createUniAppXPlugins(options) {
|
|
|
6457
6444
|
const styleCode = query.vue && query.type === "style" ? webLocalStyle.appendToStyle(code, id) : code;
|
|
6458
6445
|
const preprocessor = resolvePreprocessorTransform(styleCode, id, query.lang, {
|
|
6459
6446
|
isIosPlatform,
|
|
6460
|
-
isNativeAppStyleTarget: isNativeAppStyleTarget()
|
|
6461
|
-
isWebGeneratorTarget: isWebGeneratorTarget()
|
|
6447
|
+
isNativeAppStyleTarget: isNativeAppStyleTarget()
|
|
6462
6448
|
});
|
|
6463
6449
|
if (preprocessor) return preprocessor.result ?? (styleCode !== code ? {
|
|
6464
6450
|
code: styleCode,
|
|
@@ -6757,7 +6743,7 @@ function logBundleProcessPlan(options) {
|
|
|
6757
6743
|
//#region src/bundlers/vite/generate-bundle/remembered-css-replay.ts
|
|
6758
6744
|
function shouldSkipRawRememberedCssSource(rawSource, sourceFile) {
|
|
6759
6745
|
const cleanSourceFile = sourceFile.replace(/[?#].*$/, "");
|
|
6760
|
-
return SOURCE_STYLE_OUTPUT_EXT_RE.test(cleanSourceFile) && !canProcessViteSourceStyleAsCss(rawSource, sourceFile);
|
|
6746
|
+
return (SOURCE_STYLE_OUTPUT_EXT_RE.test(cleanSourceFile) || require_v4_generation_core.isSourcePreprocessorRequest(sourceFile)) && !canProcessViteSourceStyleAsCss(rawSource, sourceFile);
|
|
6761
6747
|
}
|
|
6762
6748
|
function resolveRememberedCssReplayOutputFile(outputFile, targetByFile) {
|
|
6763
6749
|
const outputKey = require_source_candidate_scan_signature.normalizeOutputPathKey(outputFile);
|
|
@@ -8161,10 +8147,28 @@ function createGenerateBundleHook(context) {
|
|
|
8161
8147
|
//#endregion
|
|
8162
8148
|
//#region src/bundlers/vite/shared/generic-web-production-fast-path.ts
|
|
8163
8149
|
/**
|
|
8150
|
+
* Generic Web 非 watch 生产构建由 Tailwind Scanner 直接提供候选,不需要重复维护小程序候选状态。
|
|
8151
|
+
*/
|
|
8152
|
+
function shouldSkipGenericWebProductionSourceCandidates(options) {
|
|
8153
|
+
return options.frameworkName === "generic" && options.command === "build" && options.watch == null && options.isWebGeneratorTarget && options.requiresSourceCandidateState !== true;
|
|
8154
|
+
}
|
|
8155
|
+
/**
|
|
8156
|
+
* 在 Vite 解析插件列表时排除无需维护的候选层,避免其 hooks 进入模块图。
|
|
8157
|
+
*/
|
|
8158
|
+
function createGenericWebProductionSourceCandidatesApply(options) {
|
|
8159
|
+
return (config, env) => !shouldSkipGenericWebProductionSourceCandidates({
|
|
8160
|
+
command: env.command,
|
|
8161
|
+
frameworkName: options.frameworkName,
|
|
8162
|
+
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
8163
|
+
requiresSourceCandidateState: options.requiresSourceCandidateState,
|
|
8164
|
+
watch: config.build?.watch
|
|
8165
|
+
});
|
|
8166
|
+
}
|
|
8167
|
+
/**
|
|
8164
8168
|
* Generic Web 生产构建的 CSS 已在 Vite transform 阶段生成时,不需要再建立面向小程序的完整产物快照。
|
|
8165
8169
|
*/
|
|
8166
8170
|
function shouldUseGenericWebProductionFastPath(options) {
|
|
8167
|
-
return options
|
|
8171
|
+
return shouldSkipGenericWebProductionSourceCandidates(options) && options.hasProcessedCss;
|
|
8168
8172
|
}
|
|
8169
8173
|
/**
|
|
8170
8174
|
* Finalizer fast path 只处理无小程序结构语义的 Generic Web 生产产物。
|
|
@@ -9731,7 +9735,7 @@ function sameStringList(first, second) {
|
|
|
9731
9735
|
}
|
|
9732
9736
|
//#endregion
|
|
9733
9737
|
//#region src/bundlers/vite/shared/framework-source-candidates-plugin.ts
|
|
9734
|
-
function createFrameworkSourceCandidatesPlugin(options) {
|
|
9738
|
+
function createFrameworkSourceCandidatesPlugin(options, apply) {
|
|
9735
9739
|
const hasDifferentHotModules = (left, right) => left.length !== right.length || left.some((mod, index) => mod !== right[index]);
|
|
9736
9740
|
const hasTemplateHotSourceModule = (modules) => modules.some((mod) => {
|
|
9737
9741
|
const request = mod.url ?? mod.id;
|
|
@@ -9762,6 +9766,7 @@ function createFrameworkSourceCandidatesPlugin(options) {
|
|
|
9762
9766
|
};
|
|
9763
9767
|
return {
|
|
9764
9768
|
name: `${require_context.vitePluginName}:source-candidates`,
|
|
9769
|
+
apply,
|
|
9765
9770
|
enforce: "pre",
|
|
9766
9771
|
async load(id) {
|
|
9767
9772
|
if (!options.shouldOwnTailwindGeneration || options.isWebOrNativeAppPlatform(options.resolveViteStylePlatform()) || !isCSSRequest(id) || !shouldCollectTransformedSourceCandidates(id)) return;
|
|
@@ -10899,7 +10904,11 @@ ${tracedCss}`;
|
|
|
10899
10904
|
tailwindRootCssModuleIds,
|
|
10900
10905
|
transformEarlyMiniProgramCss,
|
|
10901
10906
|
viteProcessedCssSourceFiles: processedCssRegistry.sourceFiles
|
|
10902
|
-
}
|
|
10907
|
+
}, createGenericWebProductionSourceCandidatesApply({
|
|
10908
|
+
frameworkName: frameworkBranch.frameworkName,
|
|
10909
|
+
getIsWebGeneratorTarget: () => resolveCurrentGeneratorBranch().isWeb,
|
|
10910
|
+
requiresSourceCandidateState: require_v4_generation_core.isCssSourceTraceEnabled(opts)
|
|
10911
|
+
}));
|
|
10903
10912
|
const postPlugin = createFrameworkPostPlugin({
|
|
10904
10913
|
api: { registerProcessedCssAsset(entry) {
|
|
10905
10914
|
markViteProcessedCssSource(entry.sourceFile);
|
package/dist/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_vite = require("./vite-
|
|
2
|
+
const require_vite = require("./vite-qxEVovZD.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/vite.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
1
|
+
import { t as WeappTailwindcss } from "./vite-mWyHvLB0.js";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
|
@@ -5,10 +5,10 @@ Object.defineProperties(exports, {
|
|
|
5
5
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
6
6
|
const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
7
7
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
8
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
8
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
9
9
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
10
10
|
const require_css_imports = require("./css-imports-BFMU7Hpd.cjs");
|
|
11
|
-
const require_pipeline_helpers = require("./pipeline-helpers-
|
|
11
|
+
const require_pipeline_helpers = require("./pipeline-helpers-CyVXL3h6.cjs");
|
|
12
12
|
const require_runtime_registry = require("./runtime-registry-BlIjpImP.cjs");
|
|
13
13
|
const require_watch_dependencies = require("./watch-dependencies-DLZDrWdH.cjs");
|
|
14
14
|
let node_path = require("node:path");
|
|
@@ -3,14 +3,14 @@ const require_generator = require("./generator-DKiYbTFR.cjs");
|
|
|
3
3
|
const require_object = require("./object-DbHtAXRk.cjs");
|
|
4
4
|
const require_options = require("./options-BJrtIQbH.cjs");
|
|
5
5
|
const require_utils = require("./utils-CuKLf1Zv.cjs");
|
|
6
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
7
|
-
const require_wxml = require("./wxml-
|
|
8
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
9
|
-
const require_context = require("./context-
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-Dhsu9Deu.cjs");
|
|
7
|
+
const require_wxml = require("./wxml-PrK-8ARX.cjs");
|
|
8
|
+
const require_hmr_timing = require("./hmr-timing-Cvh5UgnM.cjs");
|
|
9
|
+
const require_context = require("./context-DTLRADfE.cjs");
|
|
10
10
|
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
11
11
|
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
12
|
-
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-
|
|
13
|
-
const require_pipeline_helpers = require("./pipeline-helpers-
|
|
12
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-BNt7NrrI.cjs");
|
|
13
|
+
const require_pipeline_helpers = require("./pipeline-helpers-CyVXL3h6.cjs");
|
|
14
14
|
const require_css_loader_runtime = require("./css-loader-runtime-CSv0lKqV.cjs");
|
|
15
15
|
const require_runtime_registry = require("./runtime-registry-BlIjpImP.cjs");
|
|
16
16
|
let node_fs = require("node:fs");
|
|
@@ -2,11 +2,11 @@ import { $ as hasTailwindSourceDirectives, B as stripMiniProgramCssSpecificityPl
|
|
|
2
2
|
import { n as _defineProperty } from "./object-B-8IHefx.js";
|
|
3
3
|
import { f as resolveSourceScanEntries, g as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature } from "./tailwindcss-ChnpCv25.js";
|
|
4
4
|
import { r as getGroupedEntries } from "./utils-MVwpU07P.js";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as AssetEmissionPlan, C as isSourceStyleRequest, E as hasBundlerGeneratedCssMarker, F as processCachedTask, G as createRuntimeCompilationBuildState, H as finalizeCompilerShadowRun, I as createRuntimeClassSetManager, J as updateRuntimeCompilationBuildState, L as collectStrictEscapedRuntimeCandidates, M as createCssSourceTraceCacheSignature, N as createCssTokenSourceMap, O as stripBundlerGeneratedCssMarkers, P as isCssSourceTraceEnabled, R as createEscapeFragments, U as buildRuntimeCompilationSnapshot, W as createRuntimeCompilationAffectingSignature, X as disposeCompilerOwner, Y as createRuntimeAffectingSourceSignature, Z as beginCompilerShadowRun, _ as captureResolvedFrameworkPostcssOptions, at as createSourceCandidateStore, c as collectRawSourceClassSelectors, et as getCompilationScopeDependencyRevision, h as removeGeneratedSelectorCompatCss, j as annotateCssSourceTrace, k as finalizeMiniProgramCssStructure, l as pushConcurrentTaskFactories, lt as resolveSourceCandidateScanFiles, m as scoreTailwindV4CssSourceFileMatch, n as emitHmrTiming, nt as recordCompilationDependencyChanges, ot as isSourceCandidateRequest, q as resetRuntimeCompilationBuildState, r as generateTailwindV4Css, rt as createCompilationDependencyChanges, u as resolveTaskConcurrency, v as collectFrameworkPostcssOptionsFromLoaderEntries, w as stripRequestQuery, x as hasMiniProgramTailwindV4PreflightReset, y as createCssSourceOrderAppend, z as isPureLocalCssImportWrapper } from "./hmr-timing-utmOgn6p.js";
|
|
6
6
|
import { _ as md5Hash, m as createDebug } from "./wxml-B7OAVpXJ.js";
|
|
7
7
|
import { d as refreshTailwindRuntimeState, i as pluginName, l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, r as resolveStyleOptionsFromContext, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-4ittVpgt.js";
|
|
8
8
|
import { getDefaultCssPreflight } from "./defaults.js";
|
|
9
|
-
import { S as resolveWebpackFrameworkProfile, a as createCandidateSignature, b as webpackStyleInjectorDelegates, d as classifyRuntimeEntry, f as resolvePackageDir, g as toAbsoluteOutputPath, h as resolveOutputSpecifier, p as resolvePluginDisabledState, r as createScopedGeneratorRuntime, t as createSourceCandidateScanSignature, v as createBuiltinWebpackStyleInjectorPlugin } from "./source-candidate-scan-signature
|
|
9
|
+
import { S as resolveWebpackFrameworkProfile, a as createCandidateSignature, b as webpackStyleInjectorDelegates, d as classifyRuntimeEntry, f as resolvePackageDir, g as toAbsoluteOutputPath, h as resolveOutputSpecifier, p as resolvePluginDisabledState, r as createScopedGeneratorRuntime, t as createSourceCandidateScanSignature, v as createBuiltinWebpackStyleInjectorPlugin } from "./source-candidate-scan-signature-CDrLxVKu.js";
|
|
10
10
|
import Module, { createRequire } from "node:module";
|
|
11
11
|
import fs from "node:fs";
|
|
12
12
|
import path from "node:path";
|
|
@@ -2497,7 +2497,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2497
2497
|
});
|
|
2498
2498
|
}
|
|
2499
2499
|
//#endregion
|
|
2500
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@volar+typescript@2.4.28_typescript@6.0.3__oxc-resolver@11.
|
|
2500
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@volar+typescript@2.4.28_typescript@6.0.3__oxc-resolver@11.21.2_tsx@4.23_4ea9b490ca7666240853ecf36690c5e2/node_modules/tsdown/esm-shims.js
|
|
2501
2501
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
2502
2502
|
const getDirname = () => path.dirname(getFilename());
|
|
2503
2503
|
const __dirname = /* @__PURE__ */ getDirname();
|
package/dist/webpack.cjs
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-Cpy_yggg.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.js
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-CzhrD9p3.js";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
|
@@ -35772,7 +35772,7 @@ function babelParse(code, opts = {}) {
|
|
|
35772
35772
|
return result;
|
|
35773
35773
|
}
|
|
35774
35774
|
//#endregion
|
|
35775
|
-
//#region ../../node_modules/.pnpm/magic-string@1.
|
|
35775
|
+
//#region ../../node_modules/.pnpm/magic-string@1.2.2/node_modules/magic-string/dist/index.mjs
|
|
35776
35776
|
var BitSet = class BitSet {
|
|
35777
35777
|
constructor(arg) {
|
|
35778
35778
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -35910,12 +35910,24 @@ var Chunk = class Chunk {
|
|
|
35910
35910
|
}
|
|
35911
35911
|
}
|
|
35912
35912
|
};
|
|
35913
|
+
/**
|
|
35914
|
+
* The single error type thrown by MagicString.
|
|
35915
|
+
*
|
|
35916
|
+
* Every message is prefixed with `[MagicString]` so its source is obvious at a
|
|
35917
|
+
* glance, and is kept short and consistent in tone.
|
|
35918
|
+
*/
|
|
35919
|
+
var MagicStringError = class extends Error {
|
|
35920
|
+
constructor(message, options) {
|
|
35921
|
+
super(`[MagicString] ${message}`, options);
|
|
35922
|
+
require_object._defineProperty(this, "name", "MagicStringError");
|
|
35923
|
+
}
|
|
35924
|
+
};
|
|
35913
35925
|
function getBtoa() {
|
|
35914
35926
|
if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
|
35915
35927
|
const buffer = globalThis["Buffer"];
|
|
35916
35928
|
if (buffer) return (str) => buffer.from(str, "utf-8").toString("base64");
|
|
35917
35929
|
return () => {
|
|
35918
|
-
throw new
|
|
35930
|
+
throw new MagicStringError("unsupported environment: `btoa` or `Buffer` is required");
|
|
35919
35931
|
};
|
|
35920
35932
|
}
|
|
35921
35933
|
const btoa = /* #__PURE__ */ getBtoa();
|
|
@@ -36132,11 +36144,11 @@ var MagicString = class MagicString {
|
|
|
36132
36144
|
},
|
|
36133
36145
|
byStart: {
|
|
36134
36146
|
writable: true,
|
|
36135
|
-
value:
|
|
36147
|
+
value: /* @__PURE__ */ new Map([[0, chunk]])
|
|
36136
36148
|
},
|
|
36137
36149
|
byEnd: {
|
|
36138
36150
|
writable: true,
|
|
36139
|
-
value:
|
|
36151
|
+
value: /* @__PURE__ */ new Map([[string.length, chunk]])
|
|
36140
36152
|
},
|
|
36141
36153
|
filename: {
|
|
36142
36154
|
writable: true,
|
|
@@ -36165,10 +36177,12 @@ var MagicString = class MagicString {
|
|
|
36165
36177
|
offset: {
|
|
36166
36178
|
writable: true,
|
|
36167
36179
|
value: options.offset || 0
|
|
36180
|
+
},
|
|
36181
|
+
hasMovedChunks: {
|
|
36182
|
+
writable: true,
|
|
36183
|
+
value: false
|
|
36168
36184
|
}
|
|
36169
36185
|
});
|
|
36170
|
-
this.byStart = /* @__PURE__ */ new Map([[0, chunk]]);
|
|
36171
|
-
this.byEnd = /* @__PURE__ */ new Map([[string.length, chunk]]);
|
|
36172
36186
|
}
|
|
36173
36187
|
/**
|
|
36174
36188
|
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
|
|
@@ -36180,7 +36194,7 @@ var MagicString = class MagicString {
|
|
|
36180
36194
|
* Appends the specified content to the end of the string.
|
|
36181
36195
|
*/
|
|
36182
36196
|
append(content) {
|
|
36183
|
-
if (typeof content !== "string") throw new
|
|
36197
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36184
36198
|
this.outro += content;
|
|
36185
36199
|
return this;
|
|
36186
36200
|
}
|
|
@@ -36191,7 +36205,7 @@ var MagicString = class MagicString {
|
|
|
36191
36205
|
*/
|
|
36192
36206
|
appendLeft(index, content) {
|
|
36193
36207
|
index = index + this.offset;
|
|
36194
|
-
if (typeof content !== "string") throw new
|
|
36208
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36195
36209
|
this._split(index);
|
|
36196
36210
|
const chunk = this.byEnd.get(index);
|
|
36197
36211
|
if (chunk) chunk.appendLeft(content);
|
|
@@ -36205,7 +36219,7 @@ var MagicString = class MagicString {
|
|
|
36205
36219
|
*/
|
|
36206
36220
|
appendRight(index, content) {
|
|
36207
36221
|
index = index + this.offset;
|
|
36208
|
-
if (typeof content !== "string") throw new
|
|
36222
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36209
36223
|
this._split(index);
|
|
36210
36224
|
const chunk = this.byStart.get(index);
|
|
36211
36225
|
if (chunk) chunk.appendRight(content);
|
|
@@ -36218,6 +36232,7 @@ var MagicString = class MagicString {
|
|
|
36218
36232
|
clone() {
|
|
36219
36233
|
const cloned = new MagicString(this.original, {
|
|
36220
36234
|
filename: this.filename,
|
|
36235
|
+
ignoreList: this.ignoreList,
|
|
36221
36236
|
offset: this.offset
|
|
36222
36237
|
});
|
|
36223
36238
|
let originalChunk = this.firstChunk;
|
|
@@ -36237,8 +36252,10 @@ var MagicString = class MagicString {
|
|
|
36237
36252
|
cloned.lastChunk = clonedChunk;
|
|
36238
36253
|
if (this.indentExclusionRanges) cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
|
|
36239
36254
|
cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
|
|
36255
|
+
cloned.storedNames = { ...this.storedNames };
|
|
36240
36256
|
cloned.intro = this.intro;
|
|
36241
36257
|
cloned.outro = this.outro;
|
|
36258
|
+
cloned.hasMovedChunks = this.hasMovedChunks;
|
|
36242
36259
|
return cloned;
|
|
36243
36260
|
}
|
|
36244
36261
|
/**
|
|
@@ -36367,7 +36384,7 @@ var MagicString = class MagicString {
|
|
|
36367
36384
|
}
|
|
36368
36385
|
/** @internal */
|
|
36369
36386
|
insert() {
|
|
36370
|
-
throw new
|
|
36387
|
+
throw new MagicStringError("insert() is deprecated, use appendLeft() or prependRight()");
|
|
36371
36388
|
}
|
|
36372
36389
|
/** @internal */
|
|
36373
36390
|
insertLeft(index, content) {
|
|
@@ -36393,12 +36410,19 @@ var MagicString = class MagicString {
|
|
|
36393
36410
|
end = end + this.offset;
|
|
36394
36411
|
index = index + this.offset;
|
|
36395
36412
|
if (start === end) return this;
|
|
36396
|
-
if (index >= start && index <= end) throw new
|
|
36413
|
+
if (index >= start && index <= end) throw new MagicStringError("cannot move a selection inside itself");
|
|
36397
36414
|
this._split(start);
|
|
36398
36415
|
this._split(end);
|
|
36399
36416
|
this._split(index);
|
|
36400
36417
|
const first = this.byStart.get(start);
|
|
36401
36418
|
const last = this.byEnd.get(end);
|
|
36419
|
+
if (this.hasMovedChunks) {
|
|
36420
|
+
let cursor = first;
|
|
36421
|
+
while (cursor !== last) {
|
|
36422
|
+
cursor = cursor.next;
|
|
36423
|
+
if (!cursor || cursor.start < start || cursor.end > end) throw new MagicStringError(`cannot move ${start} to ${end} because an earlier move split that range`);
|
|
36424
|
+
}
|
|
36425
|
+
}
|
|
36402
36426
|
const oldLeft = first.previous;
|
|
36403
36427
|
const oldRight = last.next;
|
|
36404
36428
|
const newRight = this.byStart.get(index);
|
|
@@ -36417,6 +36441,7 @@ var MagicString = class MagicString {
|
|
|
36417
36441
|
last.next = newRight || null;
|
|
36418
36442
|
if (!newLeft) this.firstChunk = first;
|
|
36419
36443
|
if (!newRight) this.lastChunk = last;
|
|
36444
|
+
this.hasMovedChunks = true;
|
|
36420
36445
|
return this;
|
|
36421
36446
|
}
|
|
36422
36447
|
/**
|
|
@@ -36446,13 +36471,15 @@ var MagicString = class MagicString {
|
|
|
36446
36471
|
update(start, end, content, options) {
|
|
36447
36472
|
start = start + this.offset;
|
|
36448
36473
|
end = end + this.offset;
|
|
36449
|
-
if (typeof content !== "string") throw new
|
|
36474
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36450
36475
|
if (this.original.length !== 0) {
|
|
36451
36476
|
while (start < 0) start += this.original.length;
|
|
36452
36477
|
while (end < 0) end += this.original.length;
|
|
36453
36478
|
}
|
|
36454
|
-
if (
|
|
36455
|
-
if (
|
|
36479
|
+
if (start < 0) throw new MagicStringError(`start ${start} is out of bounds`);
|
|
36480
|
+
if (end > this.original.length) throw new MagicStringError(`end ${end} is out of bounds`);
|
|
36481
|
+
if (start === end) throw new MagicStringError(`cannot overwrite a zero-length range at ${start}, use appendLeft() or prependRight()`);
|
|
36482
|
+
if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
|
|
36456
36483
|
this._split(start);
|
|
36457
36484
|
this._split(end);
|
|
36458
36485
|
if (options === true) {
|
|
@@ -36478,7 +36505,7 @@ var MagicString = class MagicString {
|
|
|
36478
36505
|
if (first) {
|
|
36479
36506
|
let chunk = first;
|
|
36480
36507
|
while (chunk !== last) {
|
|
36481
|
-
if (chunk.next !== this.byStart.get(chunk.end)) throw new
|
|
36508
|
+
if (chunk.next !== this.byStart.get(chunk.end)) throw new MagicStringError("cannot overwrite across a split point");
|
|
36482
36509
|
chunk = chunk.next;
|
|
36483
36510
|
chunk.edit("", false);
|
|
36484
36511
|
}
|
|
@@ -36494,7 +36521,7 @@ var MagicString = class MagicString {
|
|
|
36494
36521
|
* Prepends the string with the specified content.
|
|
36495
36522
|
*/
|
|
36496
36523
|
prepend(content) {
|
|
36497
|
-
if (typeof content !== "string") throw new
|
|
36524
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36498
36525
|
this.intro = content + this.intro;
|
|
36499
36526
|
return this;
|
|
36500
36527
|
}
|
|
@@ -36503,7 +36530,7 @@ var MagicString = class MagicString {
|
|
|
36503
36530
|
*/
|
|
36504
36531
|
prependLeft(index, content) {
|
|
36505
36532
|
index = index + this.offset;
|
|
36506
|
-
if (typeof content !== "string") throw new
|
|
36533
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36507
36534
|
this._split(index);
|
|
36508
36535
|
const chunk = this.byEnd.get(index);
|
|
36509
36536
|
if (chunk) chunk.prependLeft(content);
|
|
@@ -36515,7 +36542,7 @@ var MagicString = class MagicString {
|
|
|
36515
36542
|
*/
|
|
36516
36543
|
prependRight(index, content) {
|
|
36517
36544
|
index = index + this.offset;
|
|
36518
|
-
if (typeof content !== "string") throw new
|
|
36545
|
+
if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
|
|
36519
36546
|
this._split(index);
|
|
36520
36547
|
const chunk = this.byStart.get(index);
|
|
36521
36548
|
if (chunk) chunk.prependRight(content);
|
|
@@ -36534,8 +36561,8 @@ var MagicString = class MagicString {
|
|
|
36534
36561
|
while (end < 0) end += this.original.length;
|
|
36535
36562
|
}
|
|
36536
36563
|
if (start === end) return this;
|
|
36537
|
-
if (start < 0 || end > this.original.length) throw new
|
|
36538
|
-
if (start > end) throw new
|
|
36564
|
+
if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
|
|
36565
|
+
if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
|
|
36539
36566
|
this._split(start);
|
|
36540
36567
|
this._split(end);
|
|
36541
36568
|
let chunk = this.byStart.get(start);
|
|
@@ -36558,8 +36585,8 @@ var MagicString = class MagicString {
|
|
|
36558
36585
|
while (end < 0) end += this.original.length;
|
|
36559
36586
|
}
|
|
36560
36587
|
if (start === end) return this;
|
|
36561
|
-
if (start < 0 || end > this.original.length) throw new
|
|
36562
|
-
if (start > end) throw new
|
|
36588
|
+
if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
|
|
36589
|
+
if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
|
|
36563
36590
|
this._split(start);
|
|
36564
36591
|
this._split(end);
|
|
36565
36592
|
let chunk = this.byStart.get(start);
|
|
@@ -36625,12 +36652,12 @@ var MagicString = class MagicString {
|
|
|
36625
36652
|
if (chunk.start < end && chunk.end >= end) return result;
|
|
36626
36653
|
chunk = chunk.next;
|
|
36627
36654
|
}
|
|
36628
|
-
if (chunk && chunk.edited && chunk.start !== start) throw new
|
|
36655
|
+
if (chunk && chunk.edited && chunk.start !== start) throw new MagicStringError(`cannot use edited character ${start} as slice start anchor`);
|
|
36629
36656
|
const startChunk = chunk;
|
|
36630
36657
|
while (chunk) {
|
|
36631
36658
|
if (chunk.intro && (startChunk !== chunk || chunk.start === start)) result += chunk.intro;
|
|
36632
36659
|
const containsEnd = chunk.start < end && chunk.end >= end;
|
|
36633
|
-
if (containsEnd && chunk.edited && chunk.end !== end) throw new
|
|
36660
|
+
if (containsEnd && chunk.edited && chunk.end !== end) throw new MagicStringError(`cannot use edited character ${end} as slice end anchor`);
|
|
36634
36661
|
const sliceStart = startChunk === chunk ? start - chunk.start : 0;
|
|
36635
36662
|
const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
|
|
36636
36663
|
result += chunk.content.slice(sliceStart, sliceEnd);
|
|
@@ -36666,7 +36693,7 @@ var MagicString = class MagicString {
|
|
|
36666
36693
|
_splitChunk(chunk, index) {
|
|
36667
36694
|
if (chunk.edited && chunk.content.length) {
|
|
36668
36695
|
const loc = getLocator(this.original)(index);
|
|
36669
|
-
throw new
|
|
36696
|
+
throw new MagicStringError(`cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
|
|
36670
36697
|
}
|
|
36671
36698
|
const newChunk = chunk.split(index);
|
|
36672
36699
|
this.byEnd.set(index, chunk);
|
|
@@ -36778,7 +36805,19 @@ var MagicString = class MagicString {
|
|
|
36778
36805
|
* Indicates if the string has been changed.
|
|
36779
36806
|
*/
|
|
36780
36807
|
hasChanged() {
|
|
36781
|
-
|
|
36808
|
+
if (this.intro || this.outro) return true;
|
|
36809
|
+
let outputIndex = 0;
|
|
36810
|
+
let chunk = this.firstChunk;
|
|
36811
|
+
while (chunk) {
|
|
36812
|
+
if (chunk.intro || chunk.outro) return true;
|
|
36813
|
+
if (!chunk.edited && chunk.start === outputIndex) outputIndex = chunk.end;
|
|
36814
|
+
else {
|
|
36815
|
+
if (!this.original.startsWith(chunk.content, outputIndex)) return true;
|
|
36816
|
+
outputIndex += chunk.content.length;
|
|
36817
|
+
}
|
|
36818
|
+
chunk = chunk.next;
|
|
36819
|
+
}
|
|
36820
|
+
return outputIndex !== this.original.length;
|
|
36782
36821
|
}
|
|
36783
36822
|
/** @internal */
|
|
36784
36823
|
_replaceRegexp(searchValue, replacement) {
|
|
@@ -36848,7 +36887,7 @@ var MagicString = class MagicString {
|
|
|
36848
36887
|
*/
|
|
36849
36888
|
replaceAll(searchValue, replacement) {
|
|
36850
36889
|
if (typeof searchValue === "string") return this._replaceAllString(searchValue, replacement);
|
|
36851
|
-
if (!searchValue.global) throw new
|
|
36890
|
+
if (!searchValue.global) throw new MagicStringError("replaceAll() requires a global RegExp");
|
|
36852
36891
|
return this._replaceRegexp(searchValue, replacement);
|
|
36853
36892
|
}
|
|
36854
36893
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.3.
|
|
4
|
+
"version": "5.3.5",
|
|
5
5
|
"description": "Bring Tailwind CSS to every platform! 把 Tailwind CSS 的原子化开发体验带到全端!",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -205,17 +205,17 @@
|
|
|
205
205
|
"lightningcss": "^1.33.0",
|
|
206
206
|
"local-pkg": "^1.2.1",
|
|
207
207
|
"lru-cache": "11.5.2",
|
|
208
|
-
"magic-string": "^1.
|
|
208
|
+
"magic-string": "^1.2.2",
|
|
209
209
|
"micromatch": "^4.0.8",
|
|
210
|
-
"oxc-parser": "^0.
|
|
210
|
+
"oxc-parser": "^0.146.0",
|
|
211
211
|
"oxc-walker": "^1.1.1",
|
|
212
212
|
"semver": "~7.8.5",
|
|
213
213
|
"yaml": "^2.9.0",
|
|
214
214
|
"@weapp-tailwindcss/logger": "2.0.2",
|
|
215
|
-
"tailwindcss-config": "2.0.3",
|
|
216
|
-
"@weapp-tailwindcss/shared": "2.0.2",
|
|
217
215
|
"@weapp-tailwindcss/postcss": "3.2.11",
|
|
216
|
+
"@weapp-tailwindcss/shared": "2.0.2",
|
|
218
217
|
"weapp-style-injector": "1.0.3",
|
|
218
|
+
"tailwindcss-config": "2.0.3",
|
|
219
219
|
"@weapp-tailwindcss/reset": "0.1.3"
|
|
220
220
|
},
|
|
221
221
|
"devDependencies": {
|