weapp-tailwindcss 5.5.5 → 5.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -4
- package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/framework-css-composition.d.ts +1 -0
- package/dist/bundlers/shared/framework-postcss.d.ts +2 -1
- package/dist/bundlers/shared/framework-user-css.d.ts +1 -0
- package/dist/bundlers/shared/generated-css-marker.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +5 -7
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +4 -1
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +4 -2
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +6 -3
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +3 -1
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +3 -0
- package/dist/bundlers/shared/style-handler-options.d.ts +7 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +0 -1
- package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +3 -0
- package/dist/bundlers/vite/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/frameworks/generic/web.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/finalize/sync-processed-css.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/framework-style-memory.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/web-css-module.d.ts +1 -0
- package/dist/bundlers/vite/plugin-hook.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +3 -1
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -1
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +3 -1
- package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +2 -1
- package/dist/bundlers/vite/shared/framework-runtime-configuration.d.ts +3 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +9 -0
- package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +6 -5
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +3 -3
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +3 -1
- package/dist/bundlers/vite/shared/hmr-source.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +2 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +1 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/semantic-css.d.ts +1 -1
- package/dist/compiler/types.d.ts +1 -1
- package/dist/{compiler-Cc0JXfbw.cjs → compiler-C8FqI-P3.cjs} +17378 -40552
- package/dist/{compiler-D_vxtEdw.js → compiler-D3GBwxoa.js} +32 -23
- package/dist/core/compiler/transforms.d.ts +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{css-imports-FRZwX4P6.cjs → css-imports-XvtI1zCY.cjs} +2 -3
- package/dist/css-macro.cjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/{defaults-CKx-4LcW.js → defaults-AQuvJS-h.js} +4 -2
- package/dist/{defaults-CiGsr8Xq.cjs → defaults-CyX5iO9y.cjs} +4 -2
- package/dist/defaults.cjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/final-css-cleanup-CDTmVAye.cjs +1 -0
- package/dist/{final-css-cleanup-B0HUBtiE.js → final-css-cleanup-u_sI2p56.js} +1 -126
- package/dist/framework/index.d.ts +1 -1
- package/dist/framework/platform.d.ts +2 -2
- package/dist/{generator-BdSIvFEO.cjs → generator-Bvr4WmuF.cjs} +135 -149
- package/dist/{generator-CAOx1Sqm.js → generator-C0BJjyLM.js} +116 -130
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-Dnt8VL8D.cjs → gulp-BExe5RBF.cjs} +8 -8
- package/dist/{gulp-B1mPTMqw.js → gulp-BhkIIk7J.js} +5 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-wAt0LavM.js → hmr-timing-B9Yt86-U.js} +299 -404
- package/dist/{hmr-timing-qpX410qU.cjs → hmr-timing-CoiJIqDu.cjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/js/NodePathWalker.d.ts +1 -1
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/node-path-walker/import-tokens.d.ts +1 -1
- package/dist/{pipeline-helpers-BHagysZY.cjs → pipeline-helpers-BOjTEmMi.cjs} +6 -6
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -2
- package/dist/presets.js +2 -2
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{scoped-generator-BqxVxNp9.js → scoped-generator-B6Y1bxzM.js} +46 -31
- package/dist/{scoped-generator-CtetE5rm.cjs → scoped-generator-BUBls_oM.cjs} +46 -31
- package/dist/{source-candidate-scan-signature-BDGB9nKZ.cjs → source-candidate-scan-signature-BtJZp28T.cjs} +32 -3
- package/dist/{source-candidate-scan-signature-Lm32zKVA.js → source-candidate-scan-signature-DNuGKTqf.js} +21 -4
- package/dist/style-injector/internal.d.ts +118 -8
- package/dist/style-injector/options.d.ts +5 -1
- package/dist/tailwindcss/runtime-options.d.ts +5 -0
- package/dist/tailwindcss/v4/preflight.d.ts +0 -1
- package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +1 -3
- package/dist/{tailwindcss-DTV9MoJT.js → tailwindcss-B_4E52WF.js} +7 -13
- package/dist/{tailwindcss-9e6ZuYgS.cjs → tailwindcss-CBYjzRmV.cjs} +4 -10
- package/dist/{transform-BbbZvFQq.js → transform-CkEnJYIP.js} +18 -12
- package/dist/{transform-D21f8Dm8.cjs → transform-FkqbTBJR.cjs} +17 -11
- package/dist/types/index.d.ts +3 -2
- package/dist/uni-app-x/border-preflight.d.ts +1 -2
- package/dist/uni-app-x/component-local-style.d.ts +2 -1
- package/dist/uni-app-x/transform.d.ts +4 -2
- package/dist/uni-app-x/vite/author-apply.d.ts +3 -1
- package/dist/uni-app-x/vite/native-hmr.d.ts +1 -1
- package/dist/uni-app-x/vite/style-result.d.ts +5 -0
- package/dist/{v4-generation-core-DJBWZ_D0.cjs → v4-generation-core-Cz1D7wm1.cjs} +313 -418
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-CaH7WjX6.cjs → vite-DxuKPZlp.cjs} +565 -592
- package/dist/{vite-CuYntLZP.js → vite-lP35OguX.js} +558 -578
- package/dist/vite-web.d.ts +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +2 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +7 -7
- package/dist/{web-CdXkY_VO.js → web-Dfz_jpNj.js} +144 -107
- package/dist/{web-CYs2Kcaa.cjs → web-DhDxhlkq.cjs} +156 -107
- package/dist/{webpack-BnCSOUuu.js → webpack-D6jp1o3m.js} +18 -17
- package/dist/{webpack-BQNnpQPC.cjs → webpack-R2Sbggiy.cjs} +20 -20
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/custom-template.d.ts +1 -1
- package/package.json +8 -10
- package/dist/final-css-cleanup-DSjczga3.cjs +0 -138
- package/dist/tailwindcss/v4-engine/css-import.d.ts +0 -14
- package/dist/uni-app-x/style-asset/source-parser.d.ts +0 -2
package/dist/vite-web.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { UserDefinedOptions } from './types/index.js';
|
|
2
|
-
export declare function WeappTailwindcssWeb(options?: UserDefinedOptions): any[] | undefined;
|
|
2
|
+
export declare function WeappTailwindcssWeb(options?: UserDefinedOptions): import("vite").Plugin<any>[] | undefined;
|
|
3
3
|
export declare const weappTailwindcssWeb: typeof WeappTailwindcssWeb;
|
|
4
4
|
export type { UserDefinedOptions };
|
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-DxuKPZlp.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-lP35OguX.js";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_generator = require("./generator-
|
|
2
|
-
const require_css_imports = require("./css-imports-
|
|
1
|
+
const require_generator = require("./generator-Bvr4WmuF.cjs");
|
|
2
|
+
const require_css_imports = require("./css-imports-XvtI1zCY.cjs");
|
|
3
3
|
const require_weapp_tw_css_import_rewrite_loader = require("./weapp-tw-css-import-rewrite-loader.cjs");
|
|
4
4
|
let node_buffer = require("node:buffer");
|
|
5
5
|
//#region src/bundlers/webpack/loaders/weapp-tw-css-generation-loader.ts
|
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
6
|
-
const require_generator = require("./generator-
|
|
7
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
8
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
9
|
-
const require_compiler = require("./compiler-
|
|
10
|
-
const require_css_imports = require("./css-imports-
|
|
11
|
-
const require_pipeline_helpers = require("./pipeline-helpers-
|
|
6
|
+
const require_generator = require("./generator-Bvr4WmuF.cjs");
|
|
7
|
+
const require_tailwindcss = require("./tailwindcss-CBYjzRmV.cjs");
|
|
8
|
+
const require_v4_generation_core = require("./v4-generation-core-Cz1D7wm1.cjs");
|
|
9
|
+
const require_compiler = require("./compiler-C8FqI-P3.cjs");
|
|
10
|
+
const require_css_imports = require("./css-imports-XvtI1zCY.cjs");
|
|
11
|
+
const require_pipeline_helpers = require("./pipeline-helpers-BOjTEmMi.cjs");
|
|
12
12
|
const require_runtime_registry = require("./runtime-registry-BlIjpImP.cjs");
|
|
13
13
|
const require_watch_dependencies = require("./watch-dependencies-GbC14Rlt.cjs");
|
|
14
14
|
let node_path = require("node:path");
|
|
@@ -53,7 +53,7 @@ function normalizeCssConfigDirectives(source, resourcePath) {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
function createCssHandlerOptions(options, majorVersion, file, appType) {
|
|
56
|
-
const tailwindOptions = require_generator.resolveTailwindcssOptions(options.
|
|
56
|
+
const tailwindOptions = require_generator.resolveTailwindcssOptions(options.tailwindcssRuntimeOptions);
|
|
57
57
|
const cssEntries = [...options.cssEntries ?? [], ...tailwindOptions?.v4?.cssEntries ?? []].filter((entry) => typeof entry === "string" && entry.length > 0).map((entry) => node_path.default.resolve(entry));
|
|
58
58
|
const resolvedFile = node_path.default.resolve(file);
|
|
59
59
|
const matchedCssEntryIndex = cssEntries.findIndex((entry) => entry === resolvedFile);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { resolveImplicitAppTypeFromViteRoot } from "./framework.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as findTailwindConfig, f as resolveSourceScanEntries, l as getRuntimeClassSetSignature } from "./tailwindcss-
|
|
4
|
-
import { B as
|
|
5
|
-
import { C as createTailwindRuntimeReadyPromise, K as createDebug, S as collectRuntimeClassSet, T as refreshTailwindRuntimeState, f as getCompilerContext, g as vitePluginName, i as disposeCompilerOwner, n as createRuntimeAffectingSourceSignature, p as normalizeStyleHandlerMajorVersion, t as createCompilerRuntimeState } from "./compiler-
|
|
6
|
-
import { n as resolvePackageDir, o as normalizeStyleInjectorOptions, r as normalizeOutputPathKey, t as createSourceCandidateScanSignature } from "./source-candidate-scan-signature-
|
|
2
|
+
import { $ as hasTailwindApplyDirective, K as normalizeEmptyTailwindCustomVariants, Q as hasLocalCssImport, S as findNearestPackageRoot, Y as hasUserCssLayerBlocks, _t as stripGeneratorPlaceholderMarkers, a as resolveGeneratorRuntimeBranch, at as normalizeTailwindSourceForGenerator, b as isTailwindV4CssEntry, et as hasTailwindNonRootGenerationDirectives, ft as hasTailwindGeneratedCss, i as normalizeWeappTailwindcssGeneratorOptions, jt as resolveSourceScanPath, k as resolveTailwindcssOptions, nt as hasTailwindSourceDirectives, pt as hasTailwindGeneratedCssMarkers, rt as normalizeTailwindConfigDirectives, st as removeTailwindSourceDirectives, tt as hasTailwindRootDirectives } from "./generator-C0BJjyLM.js";
|
|
3
|
+
import { a as findTailwindConfig, f as resolveSourceScanEntries, l as getRuntimeClassSetSignature } from "./tailwindcss-B_4E52WF.js";
|
|
4
|
+
import { A as annotateCssSourceTrace, B as finalizeCompilerShadowRun, C as isSourceStyleRequest, E as createBundlerGeneratedCssMarker, G as createSourceCandidateEligibilityMatcher, M as createCssTokenSourceMap, N as isCssSourceTraceEnabled, O as parseBundlerGeneratedCssMarkerBlocks, P as createRuntimeClassSetManager, U as isSourceCandidateRequest, V as createSourceCandidateCollector, f as scoreTailwindV4CssSourceFileMatch, g as captureFrameworkPostcssOptions, k as stripBundlerGeneratedCssMarkers, r as generateTailwindV4Css, t as createHmrTimingRecorder, w as stripRequestQuery } from "./hmr-timing-B9Yt86-U.js";
|
|
5
|
+
import { C as createTailwindRuntimeReadyPromise, K as createDebug, S as collectRuntimeClassSet, T as refreshTailwindRuntimeState, f as getCompilerContext, g as vitePluginName, i as disposeCompilerOwner, n as createRuntimeAffectingSourceSignature, p as normalizeStyleHandlerMajorVersion, t as createCompilerRuntimeState } from "./compiler-D3GBwxoa.js";
|
|
6
|
+
import { c as getViteHookHandler, n as resolvePackageDir, o as normalizeStyleInjectorOptions, r as normalizeOutputPathKey, t as createSourceCandidateScanSignature } from "./source-candidate-scan-signature-DNuGKTqf.js";
|
|
7
7
|
import { existsSync, realpathSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import process$1 from "node:process";
|
|
10
|
-
import { collectCssImportRequestsRoot, isMiniProgramLocalCssImportRequest, parseTailwindCssDirectiveRequest, postcss, removeTailwindPostcssPlugins, removeTailwindSourceDirectivesRoot, removeUnsupportedMiniProgramCssImportsRoot, resolvePostcssConfig, transformWebCssCompat } from "@weapp-tailwindcss/postcss";
|
|
10
|
+
import { applyConfiguredCssCalc, collectCssImportRequestsRoot, isMiniProgramLocalCssImportRequest, parseTailwindCssDirectiveRequest, postcss, removeTailwindPostcssPlugins, removeTailwindSourceDirectivesRoot, removeUnsupportedMiniProgramCssImportsRoot, resolvePostcssConfig, transformWebCssCompat } from "@weapp-tailwindcss/postcss";
|
|
11
11
|
import { LRUCache } from "lru-cache";
|
|
12
12
|
import { readFile } from "node:fs/promises";
|
|
13
13
|
import { cleanUrl as cleanUrl$1, ensurePosix } from "@weapp-tailwindcss/shared";
|
|
@@ -202,6 +202,19 @@ function createViteCssAssetIdentityResolver(options) {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
|
+
//#region src/bundlers/vite/processed-css-assets/style-files.ts
|
|
206
|
+
const CSS_OUTPUT_FILE_RE = /\.(?:css|wxss|acss|ttss|qss|jxss|tyss)(?:$|[?#])/i;
|
|
207
|
+
function isCssOutputFile(file) {
|
|
208
|
+
return CSS_OUTPUT_FILE_RE.test(file);
|
|
209
|
+
}
|
|
210
|
+
function isRootStyleOutputFile(file) {
|
|
211
|
+
const normalized = normalizeOutputPathKey(file.replace(/[?#].*$/, ""));
|
|
212
|
+
return isCssOutputFile(normalized) && !normalized.includes("/");
|
|
213
|
+
}
|
|
214
|
+
function isMiniProgramStyleOutputFile(file) {
|
|
215
|
+
return /\.(?:wxss|acss|ttss|qss|jxss|tyss)(?:$|[?#])/i.test(file);
|
|
216
|
+
}
|
|
217
|
+
//#endregion
|
|
205
218
|
//#region src/bundlers/vite/css-handler-options.ts
|
|
206
219
|
function resolveViteCssHandlerExtraOptions(file) {
|
|
207
220
|
return normalizeOutputPathKey(file.replace(/[?#].*$/, "")).includes("/") ? { isMainChunk: false } : {};
|
|
@@ -914,19 +927,6 @@ const mix = (del = delimiter) => {
|
|
|
914
927
|
const posix = /* @__PURE__ */ mix(":");
|
|
915
928
|
const win32 = /* @__PURE__ */ mix(";");
|
|
916
929
|
//#endregion
|
|
917
|
-
//#region src/bundlers/vite/processed-css-assets/style-files.ts
|
|
918
|
-
const CSS_OUTPUT_FILE_RE = /\.(?:css|wxss|acss|ttss|qss|jxss|tyss)(?:$|[?#])/i;
|
|
919
|
-
function isCssOutputFile(file) {
|
|
920
|
-
return CSS_OUTPUT_FILE_RE.test(file);
|
|
921
|
-
}
|
|
922
|
-
function isRootStyleOutputFile(file) {
|
|
923
|
-
const normalized = normalizeOutputPathKey(file.replace(/[?#].*$/, ""));
|
|
924
|
-
return isCssOutputFile(normalized) && !normalized.includes("/");
|
|
925
|
-
}
|
|
926
|
-
function isMiniProgramStyleOutputFile(file) {
|
|
927
|
-
return /\.(?:wxss|acss|ttss|qss|jxss|tyss)(?:$|[?#])/i.test(file);
|
|
928
|
-
}
|
|
929
|
-
//#endregion
|
|
930
930
|
//#region src/bundlers/vite/processed-css-assets/markers-imports.ts
|
|
931
931
|
function createCssAssetPipelineContext(options, file, bundle) {
|
|
932
932
|
const context = options.createCssPipelineContext?.(file);
|
|
@@ -980,15 +980,16 @@ function removeTailwindSourceMediaWrappersRoot(root) {
|
|
|
980
980
|
function removeTailwindSourceMediaWrappersFallback(css) {
|
|
981
981
|
return css.replace(/@media\s+source\([^)]*\)\s*\{\s*\/\*!\s*weapp-tailwindcss generator-placeholder\s*\*\/?\s*\}/gi, "").replace(/@media\s+source\([^)]*\)\s*\{\s*\}/gi, "");
|
|
982
982
|
}
|
|
983
|
-
function removeTailwindEntryDirectivesFromCss(css) {
|
|
983
|
+
function removeTailwindEntryDirectivesFromCss(css, preserveCssLayers = false) {
|
|
984
984
|
try {
|
|
985
985
|
const source = stripGeneratorPlaceholderMarkers(css);
|
|
986
986
|
const root = postcss.parse(source);
|
|
987
987
|
const removedMediaWrappers = removeTailwindSourceMediaWrappersRoot(root);
|
|
988
|
-
const removedTailwindDirectives = removeTailwindSourceDirectivesRoot(root);
|
|
988
|
+
const removedTailwindDirectives = removeTailwindSourceDirectivesRoot(root, { preserveCssLayers });
|
|
989
989
|
return removedMediaWrappers || removedTailwindDirectives ? root.toString() : source;
|
|
990
990
|
} catch {
|
|
991
|
-
|
|
991
|
+
const source = removeTailwindSourceMediaWrappersFallback(css);
|
|
992
|
+
return preserveCssLayers ? source : removeTailwindSourceDirectives(source);
|
|
992
993
|
}
|
|
993
994
|
}
|
|
994
995
|
function removeUnsupportedMiniProgramCssImportsFallback(css, file) {
|
|
@@ -1619,7 +1620,7 @@ async function resolveHotTailwindCssModules(ctx, tailwindRootCssModuleIds, selec
|
|
|
1619
1620
|
const root = ctx.server.config?.root ?? process$1.cwd();
|
|
1620
1621
|
const outDir = ctx.server.config?.build?.outDir ? resolveViteModuleIdentity(ctx.server.config.build.outDir, root) : void 0;
|
|
1621
1622
|
const isHotSourceStyleModule = (id) => {
|
|
1622
|
-
if (!isSourceStyleRequest(id)) return false;
|
|
1623
|
+
if (typeof id !== "string" || !isSourceStyleRequest(id)) return false;
|
|
1623
1624
|
const file = cleanUrl$1(id);
|
|
1624
1625
|
if (isRootMiniProgramStyleUrl(file) || !isAbsoluteFilePath(file) && !file.startsWith("/")) return false;
|
|
1625
1626
|
if (outDir) {
|
|
@@ -1800,59 +1801,6 @@ function sendFullReloadForUnresolvedHotUpdate(ctx) {
|
|
|
1800
1801
|
});
|
|
1801
1802
|
}
|
|
1802
1803
|
//#endregion
|
|
1803
|
-
//#region src/bundlers/vite/shared/generic-web-production-fast-path.ts
|
|
1804
|
-
/**
|
|
1805
|
-
* Generic Web 非 watch 生产构建由 Tailwind Scanner 直接提供候选,不需要重复维护小程序候选状态。
|
|
1806
|
-
*/
|
|
1807
|
-
function shouldSkipGenericWebProductionSourceCandidates(options) {
|
|
1808
|
-
return options.frameworkName === "generic" && options.command === "build" && options.watch == null && options.isWebGeneratorTarget && options.requiresSourceCandidateState !== true;
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* 在 Vite 解析插件列表时排除无需维护的候选层,避免其 hooks 进入模块图。
|
|
1812
|
-
*/
|
|
1813
|
-
function createGenericWebProductionSourceCandidatesApply(options) {
|
|
1814
|
-
return (config, env) => !shouldSkipGenericWebProductionSourceCandidates({
|
|
1815
|
-
command: env.command,
|
|
1816
|
-
frameworkName: options.frameworkName,
|
|
1817
|
-
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
1818
|
-
requiresSourceCandidateState: options.requiresSourceCandidateState,
|
|
1819
|
-
watch: config.build?.watch
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* Generic Web 生产构建的 CSS 已在 Vite transform 阶段生成时,不需要再建立面向小程序的完整产物快照。
|
|
1824
|
-
*/
|
|
1825
|
-
function shouldUseGenericWebProductionFastPath(options) {
|
|
1826
|
-
return shouldSkipGenericWebProductionSourceCandidates(options) && options.hasProcessedCss;
|
|
1827
|
-
}
|
|
1828
|
-
/**
|
|
1829
|
-
* Finalizer fast path 只处理无小程序结构语义的 Generic Web 生产产物。
|
|
1830
|
-
*/
|
|
1831
|
-
function shouldUseGenericWebFinalizerFastPath(options) {
|
|
1832
|
-
return shouldUseGenericWebProductionFastPath(options) && !options.hasFrameworkRootImportShells && !options.isHarmonyAppStyleTarget && !options.isNativeAppStyleTarget;
|
|
1833
|
-
}
|
|
1834
|
-
/**
|
|
1835
|
-
* 将 Generic Web fast path 的判定和跳过生命周期集中起来,供 generateBundle hook 直接消费。
|
|
1836
|
-
*/
|
|
1837
|
-
function createGenericWebProductionBundleHooks(options) {
|
|
1838
|
-
return {
|
|
1839
|
-
onSkipProcessBundle: () => {
|
|
1840
|
-
options.onStart();
|
|
1841
|
-
options.onEnd();
|
|
1842
|
-
},
|
|
1843
|
-
shouldProcessBundle: () => {
|
|
1844
|
-
const config = options.getResolvedConfig();
|
|
1845
|
-
return !shouldUseGenericWebProductionFastPath({
|
|
1846
|
-
command: config?.command,
|
|
1847
|
-
frameworkName: options.frameworkName,
|
|
1848
|
-
hasProcessedCss: options.getHasProcessedCss(),
|
|
1849
|
-
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
1850
|
-
watch: config?.build?.watch
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
};
|
|
1854
|
-
}
|
|
1855
|
-
//#endregion
|
|
1856
1804
|
//#region src/bundlers/vite/css-finalizer/options.ts
|
|
1857
1805
|
function inferPlatformFromViteOutDir(outDir) {
|
|
1858
1806
|
const segment = outDir ? path.basename(path.normalize(outDir)) : void 0;
|
|
@@ -1916,6 +1864,84 @@ function finalizeWebCss(css, context, cssPipelineStrategy) {
|
|
|
1916
1864
|
}) ?? (shouldApplyWebCssCompat ? defaultWebCssCompat(css) : css);
|
|
1917
1865
|
}
|
|
1918
1866
|
//#endregion
|
|
1867
|
+
//#region src/bundlers/vite/css-finalizer/css-calc.ts
|
|
1868
|
+
/** 在所有 CSS 资产完成组装后,为普通 Web 样式补齐显式启用的 calc 计算。 */
|
|
1869
|
+
async function finalizeWebCssCalc(bundle, context) {
|
|
1870
|
+
const cssCalc = context.opts.cssOptions?.cssCalc ?? context.opts.cssCalc;
|
|
1871
|
+
if (!cssCalc) return;
|
|
1872
|
+
const pending = Object.values(bundle).filter((output) => output.type === "asset" && context.opts.cssMatcher(output.fileName) && !context.opts.htmlMatcher(output.fileName)).map((asset) => ({
|
|
1873
|
+
asset,
|
|
1874
|
+
original: typeof asset.source === "string" ? asset.source : new TextDecoder().decode(asset.source)
|
|
1875
|
+
})).filter(({ original }) => original.includes("calc("));
|
|
1876
|
+
if (pending.length === 0) return;
|
|
1877
|
+
const sources = new Set(collectViteProcessedCssSources(context.getViteProcessedCssAssetResults));
|
|
1878
|
+
const contextCss = sources.size === 1 ? sources.values().next().value : void 0;
|
|
1879
|
+
for (const { asset, original } of pending) {
|
|
1880
|
+
const css = await applyConfiguredCssCalc(original, {
|
|
1881
|
+
cssCalc,
|
|
1882
|
+
contextCss
|
|
1883
|
+
});
|
|
1884
|
+
if (css !== original) {
|
|
1885
|
+
asset.source = css;
|
|
1886
|
+
context.recordCssAssetResult?.(asset.fileName, css);
|
|
1887
|
+
context.opts.onUpdate(asset.fileName, original, css);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
//#endregion
|
|
1892
|
+
//#region src/bundlers/vite/shared/generic-web-production-fast-path.ts
|
|
1893
|
+
/**
|
|
1894
|
+
* Generic Web 非 watch 生产构建由 Tailwind Scanner 直接提供候选,不需要重复维护小程序候选状态。
|
|
1895
|
+
*/
|
|
1896
|
+
function shouldSkipGenericWebProductionSourceCandidates(options) {
|
|
1897
|
+
return options.frameworkName === "generic" && options.command === "build" && options.watch == null && options.isWebGeneratorTarget && options.requiresSourceCandidateState !== true;
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* 在 Vite 解析插件列表时排除无需维护的候选层,避免其 hooks 进入模块图。
|
|
1901
|
+
*/
|
|
1902
|
+
function createGenericWebProductionSourceCandidatesApply(options) {
|
|
1903
|
+
return (config, env) => !shouldSkipGenericWebProductionSourceCandidates({
|
|
1904
|
+
command: env.command,
|
|
1905
|
+
frameworkName: options.frameworkName,
|
|
1906
|
+
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
1907
|
+
requiresSourceCandidateState: options.requiresSourceCandidateState,
|
|
1908
|
+
watch: config.build?.watch
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Generic Web 生产构建的 CSS 已在 Vite transform 阶段生成时,不需要再建立面向小程序的完整产物快照。
|
|
1913
|
+
*/
|
|
1914
|
+
function shouldUseGenericWebProductionFastPath(options) {
|
|
1915
|
+
return shouldSkipGenericWebProductionSourceCandidates(options) && options.hasProcessedCss;
|
|
1916
|
+
}
|
|
1917
|
+
/**
|
|
1918
|
+
* Finalizer fast path 只处理无小程序结构语义的 Generic Web 生产产物。
|
|
1919
|
+
*/
|
|
1920
|
+
function shouldUseGenericWebFinalizerFastPath(options) {
|
|
1921
|
+
return shouldUseGenericWebProductionFastPath(options) && !options.hasFrameworkRootImportShells && !options.isHarmonyAppStyleTarget && !options.isNativeAppStyleTarget;
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* 将 Generic Web fast path 的判定和跳过生命周期集中起来,供 generateBundle hook 直接消费。
|
|
1925
|
+
*/
|
|
1926
|
+
function createGenericWebProductionBundleHooks(options) {
|
|
1927
|
+
return {
|
|
1928
|
+
onSkipProcessBundle: () => {
|
|
1929
|
+
options.onStart();
|
|
1930
|
+
options.onEnd();
|
|
1931
|
+
},
|
|
1932
|
+
shouldProcessBundle: () => {
|
|
1933
|
+
const config = options.getResolvedConfig();
|
|
1934
|
+
return !shouldUseGenericWebProductionFastPath({
|
|
1935
|
+
command: config?.command,
|
|
1936
|
+
frameworkName: options.frameworkName,
|
|
1937
|
+
hasProcessedCss: options.getHasProcessedCss(),
|
|
1938
|
+
isWebGeneratorTarget: options.getIsWebGeneratorTarget(),
|
|
1939
|
+
watch: config?.build?.watch
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
//#endregion
|
|
1919
1945
|
//#region src/bundlers/vite/css-finalizer/generic-web-fast-path.ts
|
|
1920
1946
|
function readAssetSource(asset) {
|
|
1921
1947
|
return typeof asset.source === "string" ? asset.source : asset.source.toString();
|
|
@@ -1958,7 +1984,7 @@ function resolveProcessedCssAssets(cssAssets, records, options, bundleFiles) {
|
|
|
1958
1984
|
useAssetSource = true;
|
|
1959
1985
|
}
|
|
1960
1986
|
}
|
|
1961
|
-
if (!output && records.length === 1 && htmlOwnedAssets.length === 1) {
|
|
1987
|
+
if (!output && records.length === 1 && htmlOwnedAssets.length === 1 && htmlOwnedAssets[0]) {
|
|
1962
1988
|
output = htmlOwnedAssets[0];
|
|
1963
1989
|
useAssetSource = hasTailwindGeneratedCss(output.original) || hasTailwindGeneratedCssMarkers(output.original);
|
|
1964
1990
|
}
|
|
@@ -2020,8 +2046,8 @@ function tryFinalizeGenericWebCss(options) {
|
|
|
2020
2046
|
/**
|
|
2021
2047
|
* Generic Web 专用 CSS finalizer。
|
|
2022
2048
|
*
|
|
2023
|
-
*
|
|
2024
|
-
* HTML、JavaScript、模板和小程序分包产物。
|
|
2049
|
+
* 该插件复用 CSS transform 阶段记录的 CSS asset,显式开启 cssCalc 时也处理
|
|
2050
|
+
* 最终资产中的普通 CSS;不扫描或改写 HTML、JavaScript、模板和小程序分包产物。
|
|
2025
2051
|
*/
|
|
2026
2052
|
function createViteWebCssFinalizerOutputPlugin(context) {
|
|
2027
2053
|
return {
|
|
@@ -2070,6 +2096,7 @@ function createViteWebCssFinalizerOutputPlugin(context) {
|
|
|
2070
2096
|
rootDir,
|
|
2071
2097
|
sourceRoot: void 0
|
|
2072
2098
|
})) context.debug("Generic Web CSS finalizer skipped: no unique processed CSS asset");
|
|
2099
|
+
await finalizeWebCssCalc(bundle, context);
|
|
2073
2100
|
finalizeCompilerShadowRun(context.runtimeState);
|
|
2074
2101
|
context.hmrTimingRecorder?.record("webCssFinalizer.total", performance.now() - startedAt);
|
|
2075
2102
|
}
|
|
@@ -3145,6 +3172,16 @@ function createFrameworkProcessedCssRegistry() {
|
|
|
3145
3172
|
};
|
|
3146
3173
|
}
|
|
3147
3174
|
//#endregion
|
|
3175
|
+
//#region src/bundlers/vite/shared/hmr-source.ts
|
|
3176
|
+
/** 兼容 Vite 同步或异步的 HMR 源码读取,并沿用读取失败后的候选扫描。 */
|
|
3177
|
+
async function readViteHmrSource(context) {
|
|
3178
|
+
try {
|
|
3179
|
+
return await context.read?.();
|
|
3180
|
+
} catch {
|
|
3181
|
+
return;
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
//#endregion
|
|
3148
3185
|
//#region src/bundlers/vite/shared/framework-hmr-runtime-signature.ts
|
|
3149
3186
|
const WEB_HMR_RUNTIME_AFFECTING_DIRECTIVE_RE = /@(?:theme|source|config|plugin|apply)\b/;
|
|
3150
3187
|
function createFrameworkHmrRuntimeSignature(file, source) {
|
|
@@ -3159,7 +3196,7 @@ function hasFrameworkHmrRuntimeSourceChange(file, previousSource, nextSource) {
|
|
|
3159
3196
|
const SOURCE_CANDIDATE_SCAN_CACHE_MAX = 8;
|
|
3160
3197
|
const sourceCandidateScanSnapshotCache = new LRUCache({ max: SOURCE_CANDIDATE_SCAN_CACHE_MAX });
|
|
3161
3198
|
async function syncFrameworkSourceCandidatesForHotUpdate(sourceScanSession, ctx) {
|
|
3162
|
-
const source = typeof ctx.read === "function" ? await ctx
|
|
3199
|
+
const source = typeof ctx.read === "function" ? await readViteHmrSource(ctx) : void 0;
|
|
3163
3200
|
await sourceScanSession.syncChangedFile(ctx.file, source);
|
|
3164
3201
|
await sourceScanSession.waitForPendingSyncs();
|
|
3165
3202
|
}
|
|
@@ -3488,26 +3525,22 @@ function createFrameworkTailwindRootCss(options) {
|
|
|
3488
3525
|
}
|
|
3489
3526
|
//#endregion
|
|
3490
3527
|
//#region src/style-injector/vite-web.ts
|
|
3491
|
-
function getHandler(hook) {
|
|
3492
|
-
if (typeof hook === "function") return hook;
|
|
3493
|
-
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
3494
|
-
}
|
|
3495
3528
|
/** Generic Web 专用 style injector,避免引入其他构建器和框架适配。 */
|
|
3496
3529
|
function createBuiltinViteWebStyleInjectorPlugins(options) {
|
|
3497
3530
|
const normalized = normalizeStyleInjectorOptions(options);
|
|
3498
3531
|
if (!normalized) return [];
|
|
3499
3532
|
const injector = weappStyleInjector(normalized);
|
|
3500
|
-
const transform =
|
|
3501
|
-
const generateBundle =
|
|
3533
|
+
const transform = getViteHookHandler(injector.transform);
|
|
3534
|
+
const generateBundle = getViteHookHandler(injector.generateBundle);
|
|
3502
3535
|
return [{
|
|
3503
3536
|
name: "weapp-tailwindcss:web-style-injector-pre",
|
|
3504
3537
|
apply: "build",
|
|
3505
3538
|
enforce: "pre",
|
|
3506
3539
|
configResolved(config) {
|
|
3507
|
-
injector.configResolved?.(config);
|
|
3540
|
+
return getViteHookHandler(injector.configResolved)?.call(this, config);
|
|
3508
3541
|
},
|
|
3509
|
-
async buildStart() {
|
|
3510
|
-
await injector.buildStart?.call(this,
|
|
3542
|
+
async buildStart(buildOptions) {
|
|
3543
|
+
await getViteHookHandler(injector.buildStart)?.call(this, buildOptions);
|
|
3511
3544
|
},
|
|
3512
3545
|
async transform(code, id, options2) {
|
|
3513
3546
|
return transform?.call(this, code, id, options2);
|
|
@@ -3517,7 +3550,7 @@ function createBuiltinViteWebStyleInjectorPlugins(options) {
|
|
|
3517
3550
|
apply: "build",
|
|
3518
3551
|
enforce: "post",
|
|
3519
3552
|
configResolved(config) {
|
|
3520
|
-
injector.configResolved?.(config);
|
|
3553
|
+
return getViteHookHandler(injector.configResolved)?.call(this, config);
|
|
3521
3554
|
},
|
|
3522
3555
|
async generateBundle(outputOptions, bundle, isWrite) {
|
|
3523
3556
|
await generateBundle?.call(this, outputOptions, bundle, isWrite);
|
|
@@ -3562,7 +3595,7 @@ function createCssOnlyVitePlugins(options = {}) {
|
|
|
3562
3595
|
});
|
|
3563
3596
|
const hmrCssModuleVersions = createViteHmrCssModuleVersionTracker();
|
|
3564
3597
|
const hmrTimingRecorder = createHmrTimingRecorder("vite");
|
|
3565
|
-
const { runtimeState,
|
|
3598
|
+
const { runtimeState, refreshRuntimeState } = createViteRuntimeClassSet({
|
|
3566
3599
|
opts,
|
|
3567
3600
|
initialTailwindRuntime: opts.tailwindRuntime,
|
|
3568
3601
|
refreshTailwindcssRuntime: opts.refreshTailwindcssRuntime,
|
|
@@ -3582,7 +3615,6 @@ function createCssOnlyVitePlugins(options = {}) {
|
|
|
3582
3615
|
let recordedCandidates;
|
|
3583
3616
|
const processedCssRegistry = createFrameworkProcessedCssRegistry();
|
|
3584
3617
|
const processedCssAssets = /* @__PURE__ */ new WeakSet();
|
|
3585
|
-
const tailwindRootCssModuleIds = /* @__PURE__ */ new Set();
|
|
3586
3618
|
const sourceScanSession = createFrameworkSourceScanSession({
|
|
3587
3619
|
cssMemory,
|
|
3588
3620
|
debug,
|
|
@@ -3595,7 +3627,12 @@ function createCssOnlyVitePlugins(options = {}) {
|
|
|
3595
3627
|
shouldOwnTailwindGeneration: shouldGenerate,
|
|
3596
3628
|
sourceCandidateCollector
|
|
3597
3629
|
});
|
|
3598
|
-
|
|
3630
|
+
async function collectCssSourceCandidates() {
|
|
3631
|
+
await runtimeState.readyPromise;
|
|
3632
|
+
await sourceScanSession.waitForPendingSyncs();
|
|
3633
|
+
return sourceCandidateCollector.values();
|
|
3634
|
+
}
|
|
3635
|
+
const { moduleIds: tailwindRootCssModuleIds, refreshSource: refreshTailwindRootCssSource, register: registerTailwindRootCss, rememberModule: rememberTailwindRootCssModule } = createFrameworkTailwindRootCss({
|
|
3599
3636
|
getImportFallback: () => resolveWebGeneratorOptions(opts).importFallback,
|
|
3600
3637
|
refreshRuntimeState: async () => {
|
|
3601
3638
|
await refreshRuntimeState(true);
|
|
@@ -3619,7 +3656,7 @@ function createCssOnlyVitePlugins(options = {}) {
|
|
|
3619
3656
|
await sourceScanSession.waitForPendingSyncs();
|
|
3620
3657
|
const file = cleanUrl$1(id);
|
|
3621
3658
|
const outputFile = resolveViteCssPipelineOutputFile(file, opts, resolvedConfig?.root ?? process$1.cwd(), true, false, void 0);
|
|
3622
|
-
const runtime = hookContext?.sourceCandidates ? new Set(hookContext.sourceCandidates) : await
|
|
3659
|
+
const runtime = hookContext?.sourceCandidates ? new Set(hookContext.sourceCandidates) : await collectCssSourceCandidates();
|
|
3623
3660
|
const generated = await generateTailwindV4Css({
|
|
3624
3661
|
opts,
|
|
3625
3662
|
runtimeState,
|
|
@@ -3714,7 +3751,7 @@ function createCssOnlyVitePlugins(options = {}) {
|
|
|
3714
3751
|
const finalizer = createViteWebCssFinalizerOutputPlugin({
|
|
3715
3752
|
opts,
|
|
3716
3753
|
runtimeState,
|
|
3717
|
-
ensureRuntimeClassSet,
|
|
3754
|
+
ensureRuntimeClassSet: collectCssSourceCandidates,
|
|
3718
3755
|
debug,
|
|
3719
3756
|
frameworkName: "generic",
|
|
3720
3757
|
getResolvedConfig: () => resolvedConfig,
|
|
@@ -3789,11 +3826,12 @@ function createFrameworkSourceCandidatesPluginForCssOnly(options) {
|
|
|
3789
3826
|
function createGenericWebVitePlugins(options = {}) {
|
|
3790
3827
|
const capability = createGenericWebViteCapabilityProfile(options);
|
|
3791
3828
|
const owner = createViteSourceOutputRelationOwner();
|
|
3792
|
-
const
|
|
3829
|
+
const runtimeOptions = {
|
|
3793
3830
|
...options,
|
|
3794
3831
|
__internalViteCapabilityProfile: capability,
|
|
3795
3832
|
__internalViteWebStyleInjectorFactory: createBuiltinViteWebStyleInjectorPlugins
|
|
3796
|
-
}
|
|
3833
|
+
};
|
|
3834
|
+
const plugins = withViteSourceOutputRelationOwner(owner, () => createCssOnlyVitePlugins(runtimeOptions));
|
|
3797
3835
|
if (!plugins) {
|
|
3798
3836
|
owner.dispose();
|
|
3799
3837
|
return;
|
|
@@ -3802,26 +3840,25 @@ function createGenericWebVitePlugins(options = {}) {
|
|
|
3802
3840
|
const wrapped = { ...plugin };
|
|
3803
3841
|
if (plugin.watchChange) {
|
|
3804
3842
|
const hook = plugin.watchChange;
|
|
3805
|
-
wrapped.watchChange = async function(
|
|
3806
|
-
|
|
3807
|
-
if (args[1]?.event === "delete") owner.removeSource(id);
|
|
3843
|
+
wrapped.watchChange = async function(id, change) {
|
|
3844
|
+
if (change?.event === "delete") owner.removeSource(id);
|
|
3808
3845
|
else if (typeof id === "string") owner.observeSource(id);
|
|
3809
|
-
return typeof hook === "function" ? hook.
|
|
3846
|
+
return typeof hook === "function" ? hook.call(this, id, change) : hook.handler.call(this, id, change);
|
|
3810
3847
|
};
|
|
3811
3848
|
}
|
|
3812
3849
|
if (plugin.handleHotUpdate) {
|
|
3813
3850
|
const hook = plugin.handleHotUpdate;
|
|
3814
|
-
wrapped.handleHotUpdate = async function(
|
|
3815
|
-
const file =
|
|
3851
|
+
wrapped.handleHotUpdate = async function(context) {
|
|
3852
|
+
const file = context.file;
|
|
3816
3853
|
if (typeof file === "string") owner.observeSource(file);
|
|
3817
|
-
return typeof hook === "function" ? hook.
|
|
3854
|
+
return typeof hook === "function" ? hook.call(this, context) : hook.handler.call(this, context);
|
|
3818
3855
|
};
|
|
3819
3856
|
}
|
|
3820
3857
|
if (plugin.closeBundle) {
|
|
3821
3858
|
const hook = plugin.closeBundle;
|
|
3822
|
-
wrapped.closeBundle = async function(
|
|
3859
|
+
wrapped.closeBundle = async function() {
|
|
3823
3860
|
try {
|
|
3824
|
-
return typeof hook === "function" ? await hook.
|
|
3861
|
+
return typeof hook === "function" ? await hook.call(this) : await hook.handler.call(this);
|
|
3825
3862
|
} finally {
|
|
3826
3863
|
owner.dispose();
|
|
3827
3864
|
}
|
|
@@ -3831,4 +3868,4 @@ function createGenericWebVitePlugins(options = {}) {
|
|
|
3831
3868
|
});
|
|
3832
3869
|
}
|
|
3833
3870
|
//#endregion
|
|
3834
|
-
export {
|
|
3871
|
+
export { resolveSourceStyleSourceFromOutputFile as $, finalizeWebCss as A, cleanUrl$1 as At, sendSupplementalCssHotUpdates as B, isMiniProgramStyleOutputFile as Bt, tryFinalizeGenericWebCss as C, canProcessViteSourceStyleAsCss as Ct, finalizeWebCssCalc as D, resolveViteCssOutputFile as Dt, shouldSkipGenericWebProductionSourceCandidates as E, resolveReplayCssOutputFile as Et, mergeHotModulesByIdentity as F, resolveViteCssPipelineRequestFile as Ft, collectChunkModuleIds as G, withViteSourceOutputRelationOwner as Gt, parseVueRequest as H, createViteCssAssetIdentityResolver as Ht, resolveHotSourceModules as I, slash as It, hasTailwindGenerationSource as J, extractSfcStyleBlocks as K, createGenericWebViteCapabilityProfile as Kt, resolveHotSourceModulesByIds as L, createCssHandlerOptionsCache as Lt, registerGeneratorDependencies as M, isCSSRequest as Mt, shouldGenerateCssByGenerator as N, isHTMLRequest as Nt, collectViteProcessedCssSources as O, resolveViteCssPipelineOutputFile as Ot, hasSelfAcceptingNonStyleHotModule as P, normalizePath as Pt, resolveSfcStyleSourceFromOutputFile as Q, resolveHotTailwindCssModules as R, resolveViteCssHandlerExtraOptions as Rt, createViteWebCssFinalizerOutputPlugin as S, SOURCE_STYLE_OUTPUT_EXT_RE as St, createGenericWebProductionSourceCandidatesApply as T, resolveMiniProgramStyleOutputExtension as Tt, resolveViteWebCssCompatOptions as U, createViteSourceOutputRelationOwner as Ut, resolveViteModuleIdentity as V, isRootStyleOutputFile as Vt, shouldApplyViteWebCssCompat as W, getActiveViteSourceOutputRelationOwner as Wt, normalizeSfcSourceFileForCompare as X, isSfcStyleSourceFile as Y, resolveSfcStyleRequestFromKnownSource as Z, normalizeVitePersistentCacheKey as _, removeDuplicateUnlinkedRootCssAssetsReferencedByHtml as _t, readViteHmrSource as a, collectMatchingGeneratedCssMarkerFiles as at, shouldCollectTransformedSourceCandidates as b, posix as bt, createViteHmrCssModuleVersionFilterPlugin as c, dedupeViteCssResults as ct, createFrameworkCssGenerationQueue as d, isMatchingGeneratedCssMarkerFile as dt, hasMatchingStyleFileBase as et, createViteCssGenerationPlugins as f, isStyleImportRequest as ft, isMissingInternalCssSource as g, readAssetSource$1 as gt, hasVitePipelineTailwindGenerationDirective as h, normalizeMarkerOutputFile as ht, syncFrameworkSourceCandidatesForHotUpdate as i, collectImportedStyleFiles as it, inferPlatformFromViteOutDir as j, formatPostcssSourceMap as jt, createCssHandlerOptions as k, resolveViteCssPipelineOutputFileFromSourceFile as kt, createViteHmrCssModuleVersionTracker as l, getAssetFile as lt, createRewriteCssImportsPlugins as m, normalizeInjectableCssForTargetWithImports as mt, createFrameworkTailwindRootCss as n, appendCss as nt, createFrameworkProcessedCssRegistry as o, collectRootStyleBundleCssSources as ot, createViteRuntimeClassSet as p, normalizeInjectableCssForTarget as pt, hasSfcStyleSources as q, frameworkViteCapabilityProfile as qt, createFrameworkSourceScanSession as r, clearAssetSource as rt, createFrameworkPostPlugin as s, createCssAssetPipelineContext as st, createGenericWebVitePlugins as t, isMatchingCssSourceFile as tt, createViteHmrCandidateState as u, hasNonCommentCss as ut, summarizeStringCache as v, removeTailwindEntryDirectivesFromCss as vt, createGenericWebProductionBundleHooks as w, normalizeCssSourceForCompare as wt, touchMapEntry as x, CSS_SOURCE_OUTPUT_EXT_RE as xt, createViteCssMemory as y, resolveViteProcessedCssAssetSource as yt, sendFullReloadForUnresolvedHotUpdate as z, isCssOutputFile as zt };
|