weapp-tailwindcss 5.0.0-next.3 → 5.0.0-next.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -7
- package/bin/weapp-tailwindcss.js +1 -21
- package/dist/auto-TH1jG2UW.js +115 -0
- package/dist/auto-XyKTOP7B.mjs +78 -0
- package/dist/bundle-state-Bi-cQua6.mjs +413 -0
- package/dist/bundle-state-Ct_8GcSR.js +529 -0
- package/dist/bundlers/shared/cache.d.ts +6 -6
- package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -4
- package/dist/bundlers/shared/css-imports.d.ts +3 -3
- package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +21 -0
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/markers.d.ts +28 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +14 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +24 -0
- package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +10 -0
- package/dist/bundlers/shared/generator-css.d.ts +16 -22
- package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
- package/dist/bundlers/shared/style-requests.d.ts +2 -0
- package/dist/bundlers/vite/bundle-state.d.ts +1 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +7 -1
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +24 -0
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
- package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +14 -2
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
- package/dist/bundlers/vite/index.d.ts +5 -2
- package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
- package/dist/bundlers/vite/postcss-config.d.ts +6 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -3
- package/dist/bundlers/vite/runtime-class-set.d.ts +25 -0
- package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
- package/dist/bundlers/vite/source-candidates.d.ts +19 -1
- package/dist/bundlers/vite/source-scan.d.ts +26 -0
- package/dist/bundlers/vite/static-config-content.d.ts +5 -0
- package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +6 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +6 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +9 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -1
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
- package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -6
- package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
- package/dist/cache/index.d.ts +6 -6
- package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
- package/dist/cli/context.d.ts +1 -14
- package/dist/cli/doctor/types.d.ts +11 -11
- package/dist/cli/helpers.d.ts +1 -2
- package/dist/cli/mount-options.d.ts +2 -0
- package/dist/cli/types.d.ts +0 -2
- package/dist/cli/vscode-entry.d.ts +3 -3
- package/dist/cli.js +758 -604
- package/dist/cli.mjs +766 -612
- package/dist/constants.d.ts +1 -2
- package/dist/context/runtime-package-replacements.d.ts +2 -0
- package/dist/context/style-options.d.ts +3 -0
- package/dist/core.js +12 -20
- package/dist/core.mjs +8 -14
- package/dist/css-macro/auto.d.ts +10 -0
- package/dist/css-macro/constants.d.ts +5 -2
- package/dist/css-macro/postcss.d.ts +1 -0
- package/dist/css-macro/postcss.js +7 -46
- package/dist/css-macro/postcss.mjs +2 -46
- package/dist/css-macro.d.ts +1 -0
- package/dist/css-macro.js +16 -7
- package/dist/css-macro.mjs +15 -6
- package/dist/defaults-8xrgzxFY.mjs +151 -0
- package/dist/defaults-zKUH2mDe.js +193 -0
- package/dist/defaults.d.ts +15 -1
- package/dist/defaults.js +6 -131
- package/dist/defaults.mjs +2 -129
- package/dist/escape.js +10 -2
- package/dist/escape.mjs +10 -2
- package/dist/generator/index.d.ts +1 -1
- package/dist/generator/options.d.ts +9 -8
- package/dist/generator/types.d.ts +3 -3
- package/dist/generator-CrU-Ghc1.js +90 -0
- package/dist/generator-Qw-tZ0Z2.mjs +65 -0
- package/dist/generator.js +12 -12
- package/dist/generator.mjs +2 -1
- package/dist/gulp.js +187 -48
- package/dist/gulp.mjs +180 -41
- package/dist/incremental-runtime-class-set-Boqi1QlB.mjs +2224 -0
- package/dist/incremental-runtime-class-set-FAOHZmzh.js +2293 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +19 -7
- package/dist/index.mjs +6 -5
- package/dist/js/babel/cache-options.d.ts +3 -0
- package/dist/js/babel/parse.d.ts +7 -4
- package/dist/js/index.d.ts +1 -0
- package/dist/js/literal-transform.d.ts +2 -0
- package/dist/js/precheck.d.ts +2 -2
- package/dist/logger-BNzxZbZj.mjs +2 -0
- package/dist/logger-TlKT3xmR.js +1 -0
- package/dist/postcss/config-directive.d.ts +1 -0
- package/dist/postcss/context.d.ts +9 -0
- package/dist/postcss/source-files.d.ts +8 -0
- package/dist/postcss/tailwind-version.d.ts +3 -0
- package/dist/postcss-C6zOQqlL.mjs +228 -0
- package/dist/postcss-C7BMYpEF.mjs +169 -0
- package/dist/postcss-CiYLsqZn.js +192 -0
- package/dist/postcss-DAWf9D3C.js +237 -0
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss.d.ts +2 -2
- package/dist/postcss.js +3 -276
- package/dist/postcss.mjs +1 -269
- package/dist/precheck-D7K12zeX.mjs +4716 -0
- package/dist/precheck-D7gJSmJz.js +4842 -0
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/uni-app-x.d.ts +1 -0
- package/dist/presets.js +29 -13
- package/dist/presets.mjs +25 -11
- package/dist/reset.d.ts +1 -0
- package/dist/reset.js +1 -1
- package/dist/runtime-registry-DpcR3IHI.js +5496 -0
- package/dist/shared/mpx.d.ts +1 -0
- package/dist/source-candidates-CX2ozpKM.mjs +322 -0
- package/dist/source-candidates-DNM8iwXW.js +335 -0
- package/dist/tailwindcss/miniprogram.d.ts +1 -1
- package/dist/tailwindcss/patcher-options.d.ts +3 -51
- package/dist/tailwindcss/patcher.d.ts +1 -2
- package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
- package/dist/tailwindcss/runtime/cache.d.ts +4 -3
- package/dist/tailwindcss/runtime-patch.d.ts +5 -0
- package/dist/tailwindcss/runtime.d.ts +11 -12
- package/dist/tailwindcss/source-scan.d.ts +35 -0
- package/dist/tailwindcss/targets.d.ts +1 -5
- package/dist/tailwindcss/v3-engine/types.d.ts +17 -14
- package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
- package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
- package/dist/tailwindcss/v4/patcher-options.d.ts +1 -23
- package/dist/tailwindcss/v4/patcher.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/types.d.ts +17 -5
- package/dist/tailwindcss/version.d.ts +4 -0
- package/dist/tailwindcss-B-e2RiXr.js +642 -0
- package/dist/tailwindcss-C7dJHZ0G.mjs +591 -0
- package/dist/typedoc.export.d.ts +0 -2
- package/dist/types/index.d.ts +52 -49
- package/dist/types/shared.d.ts +6 -0
- package/dist/types/user-defined-options/general.d.ts +25 -24
- package/dist/types/user-defined-options/important.d.ts +33 -28
- package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
- package/dist/types/user-defined-options/matcher.d.ts +6 -6
- package/dist/uni-app-x/vite.d.ts +1 -1
- package/dist/unocss/index.d.ts +2 -0
- package/dist/utils/disabled.d.ts +2 -3
- package/dist/utils/object.d.ts +9 -0
- package/dist/utils/options.d.ts +2 -0
- package/dist/utils/regex.d.ts +1 -0
- package/dist/{utils-DmC9_In3.js → utils-D7Ygohep.js} +2 -2
- package/dist/{utils-7DUGTFED.mjs → utils-DsaS975I.mjs} +1 -1
- package/dist/v3-engine-CHItlVq5.js +3616 -0
- package/dist/v3-engine-DcvCCHfs.mjs +3321 -0
- package/dist/vite-BgTPSkQS.js +24446 -0
- package/dist/vite-fFRpSvyz.mjs +24432 -0
- package/dist/vite.d.ts +1 -2
- package/dist/vite.js +3 -4
- package/dist/vite.mjs +2 -2
- package/dist/weapp-tw-css-import-rewrite-loader.js +5227 -18
- package/dist/weapp-tw-runtime-classset-loader.js +32 -9
- package/dist/webpack-BXSWVdXh.js +851 -0
- package/dist/webpack-Dx2AZpGU.mjs +841 -0
- package/dist/webpack.d.ts +1 -3
- package/dist/webpack.js +3 -4
- package/dist/webpack.mjs +2 -2
- package/package.json +38 -48
- package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-assets.d.ts +0 -14
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-loaders.d.ts +0 -15
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -9
- package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
- package/dist/cli/config.d.ts +0 -5
- package/dist/cli/helpers/patch-cwd.d.ts +0 -1
- package/dist/cli/mount-options/patch-status.d.ts +0 -2
- package/dist/cli/patch-options.d.ts +0 -6
- package/dist/cli/tokens.d.ts +0 -4
- package/dist/cli/workspace/package-dirs.d.ts +0 -3
- package/dist/cli/workspace/patch-package.d.ts +0 -3
- package/dist/cli/workspace/patch-utils.d.ts +0 -3
- package/dist/cli/workspace/types.d.ts +0 -11
- package/dist/cli/workspace/workspace-globs.d.ts +0 -2
- package/dist/cli/workspace/workspace-io.d.ts +0 -1
- package/dist/cli/workspace/workspace-lock.d.ts +0 -1
- package/dist/cli/workspace.d.ts +0 -2
- package/dist/constants-B-_T5UnW.mjs +0 -44
- package/dist/constants-p1dyh1x1.js +0 -73
- package/dist/css-imports-BbrbluP9.js +0 -177
- package/dist/css-imports-CSdPq_Sc.mjs +0 -128
- package/dist/experimental/index.d.ts +0 -2
- package/dist/experimental/oxc/ast-utils.d.ts +0 -30
- package/dist/experimental/oxc/index.d.ts +0 -2
- package/dist/experimental/oxc/module-specifiers.d.ts +0 -2
- package/dist/experimental/shared/cache.d.ts +0 -3
- package/dist/experimental/shared/transform.d.ts +0 -3
- package/dist/experimental/shared.d.ts +0 -8
- package/dist/experimental/swc/ast-utils.d.ts +0 -30
- package/dist/experimental/swc/index.d.ts +0 -2
- package/dist/experimental/swc/module-specifiers.d.ts +0 -2
- package/dist/generator-Y-Ikv4Fu.mjs +0 -1177
- package/dist/generator-css-Bwy_Uz89.mjs +0 -1097
- package/dist/generator-css-CRLrHW4F.js +0 -1124
- package/dist/generator-mmhXzZnv.js +0 -1276
- package/dist/js/syntax.d.ts +0 -10
- package/dist/lightningcss/index.d.ts +0 -8
- package/dist/lightningcss/style-handler/options.d.ts +0 -3
- package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
- package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
- package/dist/lightningcss/style-handler.d.ts +0 -17
- package/dist/loader-anchors-1MumTAtA.mjs +0 -205
- package/dist/loader-anchors-TrFvT6g1.js +0 -273
- package/dist/logger-BZ45DZJT.js +0 -1003
- package/dist/logger-BoVx1Dbt.mjs +0 -935
- package/dist/patcher-options-6gJN2EXy.js +0 -115
- package/dist/patcher-options-DQfR5xxT.mjs +0 -92
- package/dist/recorder-GdTJ3QqX.js +0 -2878
- package/dist/recorder-XdFvVASS.mjs +0 -2763
- package/dist/tailwindcss/recorder.d.ts +0 -13
- package/dist/tailwindcss/targets/paths.d.ts +0 -13
- package/dist/tailwindcss/targets/record-io.d.ts +0 -5
- package/dist/tailwindcss/targets/recorder.d.ts +0 -3
- package/dist/tailwindcss/targets/types.d.ts +0 -35
- package/dist/types/disabled-options.d.ts +0 -4
- package/dist/vite-BDywuCjn.mjs +0 -2186
- package/dist/vite-DgRh_GXn.js +0 -2199
- package/dist/webpack-CAJR4hhP.js +0 -456
- package/dist/webpack-CiHqVZTg.mjs +0 -441
- package/dist/webpack4.d.ts +0 -4
- package/dist/webpack4.js +0 -387
- package/dist/webpack4.mjs +0 -379
- package/scripts/postinstall.mjs +0 -59
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DcvCCHfs.mjs";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
//#region src/generator/options.ts
|
|
4
|
+
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
5
|
+
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
6
|
+
const mpxWebPlatformEnvKeys = ["MPX_CLI_MODE", "MPX_CURRENT_TARGET_MODE"];
|
|
7
|
+
function getEnvValue(key) {
|
|
8
|
+
return typeof process === "undefined" ? void 0 : process.env[key];
|
|
9
|
+
}
|
|
10
|
+
function normalizeGeneratorTargetValue(value) {
|
|
11
|
+
return value === "weapp" || value === "web" || value === "tailwind" ? value : void 0;
|
|
12
|
+
}
|
|
13
|
+
function isUniWebPlatform(value) {
|
|
14
|
+
const normalized = value?.trim().toLowerCase();
|
|
15
|
+
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
16
|
+
}
|
|
17
|
+
function isUniAppWebViewPlatform(value) {
|
|
18
|
+
const normalized = value?.trim().toLowerCase();
|
|
19
|
+
return normalized === "app" || normalized === "app-plus";
|
|
20
|
+
}
|
|
21
|
+
function isUniNativeAppPlatform(value) {
|
|
22
|
+
return (value?.trim().toLowerCase())?.startsWith("app-") === true;
|
|
23
|
+
}
|
|
24
|
+
function isMpxWebPlatform(value) {
|
|
25
|
+
return value?.trim().toLowerCase() === "web";
|
|
26
|
+
}
|
|
27
|
+
function inferGeneratorTargetFromEnv() {
|
|
28
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
29
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
30
|
+
if (target !== void 0) return target;
|
|
31
|
+
}
|
|
32
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || isUniAppWebViewPlatform(getEnvValue("UNI_PLATFORM")) && !isUniNativeAppPlatform(getEnvValue("UNI_UTS_PLATFORM")) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
33
|
+
return "weapp";
|
|
34
|
+
}
|
|
35
|
+
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
36
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
37
|
+
if (options == null) return {
|
|
38
|
+
target,
|
|
39
|
+
importFallback: true,
|
|
40
|
+
tailwindcssV3Compatibility: target === "weapp"
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
target,
|
|
44
|
+
config: options.config,
|
|
45
|
+
styleOptions: options.styleOptions,
|
|
46
|
+
importFallback: options.importFallback ?? true,
|
|
47
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/generator/index.ts
|
|
52
|
+
function isTailwindV3Source(source) {
|
|
53
|
+
return "version" in source && source.version === 3;
|
|
54
|
+
}
|
|
55
|
+
function createWeappTailwindcssGenerator(source) {
|
|
56
|
+
return isTailwindV3Source(source) ? createTailwindV3Engine(source) : createTailwindV4Engine(source);
|
|
57
|
+
}
|
|
58
|
+
async function resolveTailwindSourceFromPatcher(patcher) {
|
|
59
|
+
return patcher.majorVersion === 3 ? resolveTailwindV3SourceFromPatcher(patcher) : resolveTailwindV4SourceFromPatcher(patcher);
|
|
60
|
+
}
|
|
61
|
+
async function createWeappTailwindcssGeneratorFromPatcher(patcher) {
|
|
62
|
+
return createWeappTailwindcssGenerator(await resolveTailwindSourceFromPatcher(patcher));
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { normalizeWeappTailwindcssGeneratorOptions as i, createWeappTailwindcssGeneratorFromPatcher as n, resolveTailwindSourceFromPatcher as r, createWeappTailwindcssGenerator as t };
|
package/dist/generator.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./
|
|
3
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CHItlVq5.js");
|
|
3
|
+
const require_generator = require("./generator-CrU-Ghc1.js");
|
|
4
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
5
5
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
6
6
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
|
7
7
|
exports.normalizeWeappTailwindcssGeneratorOptions = require_generator.normalizeWeappTailwindcssGeneratorOptions;
|
|
8
8
|
exports.resolveTailwindSourceFromPatcher = require_generator.resolveTailwindSourceFromPatcher;
|
|
9
|
-
exports.resolveTailwindV3Source =
|
|
10
|
-
exports.resolveTailwindV3SourceFromPatcher =
|
|
11
|
-
exports.resolveTailwindV3SourceOptionsFromPatcher =
|
|
12
|
-
exports.resolveTailwindV4Source =
|
|
9
|
+
exports.resolveTailwindV3Source = require_v3_engine.resolveTailwindV3Source;
|
|
10
|
+
exports.resolveTailwindV3SourceFromPatcher = require_v3_engine.resolveTailwindV3SourceFromPatcher;
|
|
11
|
+
exports.resolveTailwindV3SourceOptionsFromPatcher = require_v3_engine.resolveTailwindV3SourceOptionsFromPatcher;
|
|
12
|
+
exports.resolveTailwindV4Source = require_v3_engine.resolveTailwindV4Source;
|
|
13
13
|
exports.resolveTailwindV4SourceFromPatchOptions = tailwindcss_patch.resolveTailwindV4SourceFromPatchOptions;
|
|
14
|
-
exports.resolveTailwindV4SourceFromPatcher =
|
|
15
|
-
exports.resolveTailwindV4SourceOptionsFromPatcher =
|
|
16
|
-
exports.transformTailwindV3CssByTarget =
|
|
17
|
-
exports.transformTailwindV3CssToWeapp =
|
|
18
|
-
exports.transformTailwindV4CssByTarget =
|
|
19
|
-
exports.transformTailwindV4CssToWeapp =
|
|
14
|
+
exports.resolveTailwindV4SourceFromPatcher = require_v3_engine.resolveTailwindV4SourceFromPatcher;
|
|
15
|
+
exports.resolveTailwindV4SourceOptionsFromPatcher = require_v3_engine.resolveTailwindV4SourceOptionsFromPatcher;
|
|
16
|
+
exports.transformTailwindV3CssByTarget = require_v3_engine.transformTailwindV3CssByTarget;
|
|
17
|
+
exports.transformTailwindV3CssToWeapp = require_v3_engine.transformTailwindV3CssToWeapp;
|
|
18
|
+
exports.transformTailwindV4CssByTarget = require_v3_engine.transformTailwindV4CssByTarget;
|
|
19
|
+
exports.transformTailwindV4CssToWeapp = require_v3_engine.transformTailwindV4CssToWeapp;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-DcvCCHfs.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-Qw-tZ0Z2.mjs";
|
|
2
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_chunk = require("./chunk-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CHItlVq5.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-FAOHZmzh.js");
|
|
5
|
+
const require_precheck = require("./precheck-D7gJSmJz.js");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-B-e2RiXr.js");
|
|
7
|
+
const require_source_candidates = require("./source-candidates-DNM8iwXW.js");
|
|
8
|
+
let node_fs = require("node:fs");
|
|
9
|
+
node_fs = require_chunk.__toESM(node_fs);
|
|
5
10
|
let node_path = require("node:path");
|
|
6
11
|
node_path = require_chunk.__toESM(node_path);
|
|
7
12
|
let node_process = require("node:process");
|
|
8
13
|
node_process = require_chunk.__toESM(node_process);
|
|
9
14
|
let node_buffer = require("node:buffer");
|
|
10
|
-
let node_fs = require("node:fs");
|
|
11
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
12
15
|
let node_stream = require("node:stream");
|
|
13
16
|
node_stream = require_chunk.__toESM(node_stream);
|
|
14
17
|
//#region src/bundlers/gulp/index.ts
|
|
15
|
-
const debug =
|
|
18
|
+
const debug = require_v3_engine.createDebug();
|
|
16
19
|
const Transform = node_stream.default.Transform;
|
|
17
20
|
/**
|
|
18
21
|
* @name weapp-tw-gulp
|
|
@@ -20,18 +23,18 @@ const Transform = node_stream.default.Transform;
|
|
|
20
23
|
* @link https://tw.icebreaker.top/docs/quick-start/frameworks/native
|
|
21
24
|
*/
|
|
22
25
|
function createPlugins(options = {}) {
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
cwd: opts.tailwindcssBasedir ?? node_process.default.cwd()
|
|
26
|
+
const hasInitialTailwindCssRoots = require_tailwindcss.hasConfiguredTailwindV4CssRoots(options);
|
|
27
|
+
const opts = require_precheck.getCompilerContext({
|
|
28
|
+
...options,
|
|
29
|
+
__internalDeferMissingCssEntriesWarning: true
|
|
28
30
|
});
|
|
31
|
+
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
32
|
+
const readyPromise = require_precheck.createTailwindRuntimeReadyPromise(initialTwPatcher);
|
|
29
33
|
let runtimeSet = /* @__PURE__ */ new Set();
|
|
30
34
|
const runtimeState = {
|
|
31
35
|
twPatcher: initialTwPatcher,
|
|
32
|
-
|
|
33
|
-
refreshTailwindcssPatcher
|
|
34
|
-
onPatchCompleted: patchRecorderState.onPatchCompleted
|
|
36
|
+
readyPromise,
|
|
37
|
+
refreshTailwindcssPatcher
|
|
35
38
|
};
|
|
36
39
|
const defaultStyleHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
37
40
|
let cachedDefaultTemplateHandlerOptions;
|
|
@@ -46,20 +49,138 @@ function createPlugins(options = {}) {
|
|
|
46
49
|
".jsx"
|
|
47
50
|
];
|
|
48
51
|
let runtimeSetInitialized = false;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
let runtimeSetDirty = false;
|
|
53
|
+
const runtimeSourceHashByFile = /* @__PURE__ */ new Map();
|
|
54
|
+
const runtimeSourcesByFile = /* @__PURE__ */ new Map();
|
|
55
|
+
let cachedGulpSourceCandidates;
|
|
56
|
+
let cachedGulpSourceCandidateSignature;
|
|
57
|
+
const bundleRuntimeClassSetManager = options.__internalGulpRuntimeClassSetManager ?? require_incremental_runtime_class_set.createBundleRuntimeClassSetManager();
|
|
58
|
+
async function refreshRuntimeSet(options = false) {
|
|
59
|
+
const normalizedOptions = typeof options === "boolean" ? {
|
|
60
|
+
forceRefresh: options,
|
|
61
|
+
forceCollect: options,
|
|
62
|
+
clearCache: options
|
|
63
|
+
} : options;
|
|
64
|
+
const forceRefresh = normalizedOptions.forceRefresh === true;
|
|
65
|
+
const shouldForceCollect = normalizedOptions.forceCollect === true || runtimeSetDirty;
|
|
66
|
+
const clearCache = normalizedOptions.clearCache === true || runtimeSetDirty;
|
|
67
|
+
if (!forceRefresh && !shouldForceCollect && runtimeSetInitialized) return runtimeSet;
|
|
68
|
+
runtimeSet = await require_precheck.ensureRuntimeClassSet(runtimeState, {
|
|
69
|
+
forceRefresh,
|
|
70
|
+
forceCollect: shouldForceCollect,
|
|
71
|
+
clearCache,
|
|
58
72
|
allowEmpty: false
|
|
59
73
|
});
|
|
60
74
|
runtimeSetInitialized = true;
|
|
75
|
+
runtimeSetDirty = false;
|
|
61
76
|
return runtimeSet;
|
|
62
77
|
}
|
|
78
|
+
function createRuntimeSnapshot(changedFiles) {
|
|
79
|
+
const runtimeAffectingChangedByType = {
|
|
80
|
+
html: /* @__PURE__ */ new Set(),
|
|
81
|
+
js: /* @__PURE__ */ new Set(),
|
|
82
|
+
css: /* @__PURE__ */ new Set(),
|
|
83
|
+
other: /* @__PURE__ */ new Set()
|
|
84
|
+
};
|
|
85
|
+
for (const file of changedFiles) {
|
|
86
|
+
const entry = runtimeSourcesByFile.get(file);
|
|
87
|
+
if (entry) runtimeAffectingChangedByType[entry.type].add(file);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
entries: [...runtimeSourcesByFile.entries()].map(([file, entry]) => ({
|
|
91
|
+
file,
|
|
92
|
+
output: {
|
|
93
|
+
fileName: file,
|
|
94
|
+
source: entry.source,
|
|
95
|
+
type: "asset"
|
|
96
|
+
},
|
|
97
|
+
source: entry.source,
|
|
98
|
+
type: entry.type
|
|
99
|
+
})),
|
|
100
|
+
jsEntries: /* @__PURE__ */ new Map(),
|
|
101
|
+
sourceHashByFile: /* @__PURE__ */ new Map(),
|
|
102
|
+
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
103
|
+
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
104
|
+
changedByType: {
|
|
105
|
+
html: /* @__PURE__ */ new Set(),
|
|
106
|
+
js: /* @__PURE__ */ new Set(),
|
|
107
|
+
css: /* @__PURE__ */ new Set(),
|
|
108
|
+
other: /* @__PURE__ */ new Set()
|
|
109
|
+
},
|
|
110
|
+
runtimeAffectingChangedByType,
|
|
111
|
+
processFiles: {
|
|
112
|
+
html: /* @__PURE__ */ new Set(),
|
|
113
|
+
js: /* @__PURE__ */ new Set(),
|
|
114
|
+
css: /* @__PURE__ */ new Set()
|
|
115
|
+
},
|
|
116
|
+
linkedImpactsByEntry: /* @__PURE__ */ new Map()
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
async function refreshRuntimeSetForSource(file, rawSource, type) {
|
|
120
|
+
const filename = node_path.default.resolve(file.path);
|
|
121
|
+
const hash = cache.computeHash(rawSource);
|
|
122
|
+
const changed = runtimeSourceHashByFile.get(filename) !== hash;
|
|
123
|
+
runtimeSourceHashByFile.set(filename, hash);
|
|
124
|
+
runtimeSourcesByFile.set(filename, {
|
|
125
|
+
source: rawSource,
|
|
126
|
+
type
|
|
127
|
+
});
|
|
128
|
+
if (!changed && runtimeSetInitialized) return runtimeSet;
|
|
129
|
+
if (runtimeState.twPatcher.majorVersion === 4 && !runtimeSetDirty) try {
|
|
130
|
+
runtimeSet = await bundleRuntimeClassSetManager.sync(runtimeState.twPatcher, createRuntimeSnapshot([filename]));
|
|
131
|
+
runtimeSetInitialized = true;
|
|
132
|
+
return runtimeSet;
|
|
133
|
+
} catch (error) {
|
|
134
|
+
debug("gulp incremental runtime set sync failed, fallback to collect: %O", error);
|
|
135
|
+
await bundleRuntimeClassSetManager.reset();
|
|
136
|
+
}
|
|
137
|
+
return refreshRuntimeSet({ forceCollect: true });
|
|
138
|
+
}
|
|
139
|
+
async function refreshGulpSourceCandidates(forceRefresh = false) {
|
|
140
|
+
if (runtimeState.twPatcher.majorVersion !== 3) return /* @__PURE__ */ new Set();
|
|
141
|
+
const root = opts.tailwindcssBasedir ?? node_process.default.cwd();
|
|
142
|
+
const sourceScan = await require_v3_engine.resolveViteSourceScanEntries(opts, runtimeState.twPatcher, { root });
|
|
143
|
+
const nextSignature = cache.computeHash(JSON.stringify({
|
|
144
|
+
root,
|
|
145
|
+
entries: sourceScan?.entries,
|
|
146
|
+
inlineCandidates: sourceScan?.inlineCandidates ? {
|
|
147
|
+
included: [...sourceScan.inlineCandidates.included].sort(),
|
|
148
|
+
excluded: [...sourceScan.inlineCandidates.excluded].sort()
|
|
149
|
+
} : void 0,
|
|
150
|
+
explicit: sourceScan?.explicit ?? false,
|
|
151
|
+
dependencies: [...sourceScan?.dependencies ?? []].sort()
|
|
152
|
+
}));
|
|
153
|
+
if (!forceRefresh && cachedGulpSourceCandidateSignature === nextSignature && cachedGulpSourceCandidates) return cachedGulpSourceCandidates;
|
|
154
|
+
const collector = require_source_candidates.createSourceCandidateCollector();
|
|
155
|
+
await collector.scanRoot({
|
|
156
|
+
entries: sourceScan?.entries,
|
|
157
|
+
root
|
|
158
|
+
});
|
|
159
|
+
collector.syncInline(sourceScan?.inlineCandidates);
|
|
160
|
+
cachedGulpSourceCandidateSignature = nextSignature;
|
|
161
|
+
cachedGulpSourceCandidates = sourceScan?.entries ? collector.valuesForEntries(sourceScan.entries) : collector.values();
|
|
162
|
+
return cachedGulpSourceCandidates;
|
|
163
|
+
}
|
|
164
|
+
function createRuntimeSetHash(rawSource, nextRuntimeSet) {
|
|
165
|
+
return cache.computeHash([
|
|
166
|
+
rawSource,
|
|
167
|
+
require_v3_engine.getRuntimeClassSetSignature(runtimeState.twPatcher),
|
|
168
|
+
[...nextRuntimeSet].sort().join("\n")
|
|
169
|
+
].join("\n\n"));
|
|
170
|
+
}
|
|
171
|
+
async function registerAutoCssSource(file, rawSource) {
|
|
172
|
+
if (hasInitialTailwindCssRoots || (runtimeState.twPatcher.majorVersion ?? 0) < 4 || !file.path || !require_incremental_runtime_class_set.hasTailwindRootDirectives(rawSource)) return false;
|
|
173
|
+
const sourceCss = require_incremental_runtime_class_set.normalizeTailwindSourceForGenerator(rawSource, { importFallback: true });
|
|
174
|
+
if (!require_tailwindcss.upsertTailwindV4CssSource(opts, {
|
|
175
|
+
file: node_path.default.resolve(file.path),
|
|
176
|
+
css: sourceCss
|
|
177
|
+
})) return false;
|
|
178
|
+
runtimeSetInitialized = false;
|
|
179
|
+
runtimeSetDirty = true;
|
|
180
|
+
await bundleRuntimeClassSetManager.reset();
|
|
181
|
+
debug("detected tailwindcss v4 css source from gulp css file: %s", file.path);
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
63
184
|
function resolveWithExtensions(base) {
|
|
64
185
|
for (const ext of MODULE_EXTENSIONS) {
|
|
65
186
|
const candidate = `${base}${ext}`;
|
|
@@ -106,12 +227,14 @@ function createPlugins(options = {}) {
|
|
|
106
227
|
if (!cachedDefaultModuleGraphOptions) cachedDefaultModuleGraphOptions = createModuleGraphOptionsFor();
|
|
107
228
|
return cachedDefaultModuleGraphOptions;
|
|
108
229
|
}
|
|
109
|
-
function createVinylTransform(handler) {
|
|
230
|
+
function createVinylTransform(phase, handler) {
|
|
110
231
|
return new Transform({
|
|
111
232
|
objectMode: true,
|
|
112
233
|
async transform(file, _encoding, callback) {
|
|
234
|
+
const hmrTimingStartedAt = performance.now();
|
|
113
235
|
try {
|
|
114
236
|
await handler(file);
|
|
237
|
+
require_incremental_runtime_class_set.emitHmrTiming("gulp", phase, performance.now() - hmrTimingStartedAt, { file: file.relative || node_path.default.basename(file.path) });
|
|
115
238
|
callback(null, file);
|
|
116
239
|
} catch (error) {
|
|
117
240
|
callback(error, file);
|
|
@@ -124,12 +247,12 @@ function createPlugins(options = {}) {
|
|
|
124
247
|
if (!options || Object.keys(options).length === 0) {
|
|
125
248
|
let cached = defaultStyleHandlerOptionsCache.get(majorVersion);
|
|
126
249
|
if (!cached) {
|
|
127
|
-
cached = { majorVersion: runtimeState.twPatcher.majorVersion };
|
|
250
|
+
cached = runtimeState.twPatcher.majorVersion === void 0 ? {} : { majorVersion: runtimeState.twPatcher.majorVersion };
|
|
128
251
|
defaultStyleHandlerOptionsCache.set(majorVersion, cached);
|
|
129
252
|
}
|
|
130
253
|
return cached;
|
|
131
254
|
}
|
|
132
|
-
return {
|
|
255
|
+
return runtimeState.twPatcher.majorVersion === void 0 ? { ...options } : {
|
|
133
256
|
majorVersion: runtimeState.twPatcher.majorVersion,
|
|
134
257
|
...options
|
|
135
258
|
};
|
|
@@ -164,15 +287,28 @@ function createPlugins(options = {}) {
|
|
|
164
287
|
...options
|
|
165
288
|
};
|
|
166
289
|
}
|
|
167
|
-
const transformWxss = (options = {}) => createVinylTransform(async (file) => {
|
|
290
|
+
const transformWxss = (options = {}) => createVinylTransform("css", async (file) => {
|
|
168
291
|
if (!file.contents) return;
|
|
169
|
-
await refreshRuntimeState(true);
|
|
170
|
-
await runtimeState.patchPromise;
|
|
171
292
|
const rawSource = file.contents.toString();
|
|
172
|
-
await
|
|
293
|
+
const cssSourceChanged = await registerAutoCssSource(file, rawSource);
|
|
294
|
+
const isMainChunk = opts.mainCssChunkMatcher(resolveGulpMatcherName(file), opts.appType);
|
|
295
|
+
const shouldUseGenerator = runtimeState.twPatcher.majorVersion !== 3 || require_incremental_runtime_class_set.hasTailwindRootDirectives(rawSource);
|
|
296
|
+
let nextRuntimeSet = await refreshRuntimeSet({
|
|
297
|
+
forceRefresh: cssSourceChanged,
|
|
298
|
+
forceCollect: cssSourceChanged || runtimeState.twPatcher.majorVersion !== 4 && isMainChunk,
|
|
299
|
+
clearCache: cssSourceChanged
|
|
300
|
+
});
|
|
301
|
+
if (runtimeState.twPatcher.majorVersion === 3 && isMainChunk && shouldUseGenerator) {
|
|
302
|
+
const sourceCandidates = await refreshGulpSourceCandidates(cssSourceChanged);
|
|
303
|
+
if (sourceCandidates.size > 0) {
|
|
304
|
+
nextRuntimeSet = new Set([...nextRuntimeSet, ...sourceCandidates]);
|
|
305
|
+
runtimeSet = nextRuntimeSet;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
await require_incremental_runtime_class_set.processCachedTask({
|
|
173
309
|
cache,
|
|
174
310
|
cacheKey: file.path,
|
|
175
|
-
rawSource,
|
|
311
|
+
hash: createRuntimeSetHash(rawSource, nextRuntimeSet),
|
|
176
312
|
applyResult(source) {
|
|
177
313
|
file.contents = node_buffer.Buffer.from(source);
|
|
178
314
|
},
|
|
@@ -180,42 +316,42 @@ function createPlugins(options = {}) {
|
|
|
180
316
|
debug("css cache hit: %s", file.path);
|
|
181
317
|
},
|
|
182
318
|
async transform() {
|
|
183
|
-
await runtimeState.
|
|
319
|
+
await runtimeState.readyPromise;
|
|
184
320
|
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, options);
|
|
185
|
-
const css = (await
|
|
321
|
+
const css = (shouldUseGenerator ? await require_incremental_runtime_class_set.generateCssByGenerator({
|
|
186
322
|
opts,
|
|
187
323
|
runtimeState,
|
|
188
|
-
runtime:
|
|
324
|
+
runtime: nextRuntimeSet,
|
|
189
325
|
rawSource,
|
|
190
326
|
file: file.path,
|
|
191
327
|
cssHandlerOptions,
|
|
192
328
|
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
193
329
|
styleHandler,
|
|
194
330
|
debug
|
|
195
|
-
}))?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
331
|
+
}) : void 0)?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
196
332
|
debug("css handle: %s", file.path);
|
|
197
333
|
return { result: css };
|
|
198
334
|
}
|
|
199
335
|
});
|
|
200
336
|
});
|
|
201
|
-
const transformJs = (options = {}) => createVinylTransform(async (file) => {
|
|
337
|
+
const transformJs = (options = {}) => createVinylTransform("js", async (file) => {
|
|
202
338
|
if (!file.contents) return;
|
|
203
|
-
await refreshRuntimeSet(false);
|
|
204
|
-
await runtimeState.patchPromise;
|
|
205
339
|
const filename = node_path.default.resolve(file.path);
|
|
340
|
+
const rawSource = file.contents.toString();
|
|
341
|
+
await refreshRuntimeSetForSource(file, rawSource, "js");
|
|
342
|
+
await runtimeState.readyPromise;
|
|
206
343
|
const moduleGraph = resolveModuleGraphOptions(options.moduleGraph);
|
|
207
344
|
const handlerOptions = {
|
|
208
345
|
...options,
|
|
209
346
|
filename,
|
|
210
347
|
moduleGraph,
|
|
211
|
-
tailwindcssMajorVersion: runtimeState.twPatcher.majorVersion,
|
|
212
348
|
babelParserOptions: {
|
|
213
349
|
...options?.babelParserOptions ?? {},
|
|
214
350
|
sourceFilename: filename
|
|
215
351
|
}
|
|
216
352
|
};
|
|
217
|
-
|
|
218
|
-
await
|
|
353
|
+
if (runtimeState.twPatcher.majorVersion !== void 0) handlerOptions.tailwindcssMajorVersion = runtimeState.twPatcher.majorVersion;
|
|
354
|
+
await require_incremental_runtime_class_set.processCachedTask({
|
|
219
355
|
cache,
|
|
220
356
|
cacheKey: file.path,
|
|
221
357
|
rawSource,
|
|
@@ -226,21 +362,24 @@ function createPlugins(options = {}) {
|
|
|
226
362
|
debug("js cache hit: %s", file.path);
|
|
227
363
|
},
|
|
228
364
|
async transform() {
|
|
229
|
-
await runtimeState.
|
|
365
|
+
await runtimeState.readyPromise;
|
|
230
366
|
const currentSource = file.contents?.toString() ?? rawSource;
|
|
231
|
-
if (
|
|
367
|
+
if (require_precheck.shouldSkipJsTransform(currentSource, {
|
|
368
|
+
...handlerOptions,
|
|
369
|
+
classNameSet: runtimeSet
|
|
370
|
+
})) return { result: currentSource };
|
|
232
371
|
const { code } = await jsHandler(currentSource, runtimeSet, handlerOptions);
|
|
233
372
|
debug("js handle: %s", file.path);
|
|
234
373
|
return { result: code };
|
|
235
374
|
}
|
|
236
375
|
});
|
|
237
376
|
});
|
|
238
|
-
const transformWxml = (options = {}) => createVinylTransform(async (file) => {
|
|
377
|
+
const transformWxml = (options = {}) => createVinylTransform("html", async (file) => {
|
|
239
378
|
if (!file.contents) return;
|
|
240
|
-
await refreshRuntimeSet(false);
|
|
241
|
-
await runtimeState.patchPromise;
|
|
242
379
|
const rawSource = file.contents.toString();
|
|
243
|
-
await
|
|
380
|
+
await refreshRuntimeSetForSource(file, rawSource, "html");
|
|
381
|
+
await runtimeState.readyPromise;
|
|
382
|
+
await require_incremental_runtime_class_set.processCachedTask({
|
|
244
383
|
cache,
|
|
245
384
|
cacheKey: file.path,
|
|
246
385
|
rawSource,
|
|
@@ -251,7 +390,7 @@ function createPlugins(options = {}) {
|
|
|
251
390
|
debug("html cache hit: %s", file.path);
|
|
252
391
|
},
|
|
253
392
|
async transform() {
|
|
254
|
-
await runtimeState.
|
|
393
|
+
await runtimeState.readyPromise;
|
|
255
394
|
const code = await templateHandler(rawSource, resolveWxmlHandlerOptions(options));
|
|
256
395
|
debug("html handle: %s", file.path);
|
|
257
396
|
return { result: code };
|