weapp-tailwindcss 5.0.0-next.21 → 5.0.0-next.22
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/{generator-B4RNgMLx.js → generator-CV_APjnB.js} +32 -4
- package/dist/{generator-DvyhmC76.mjs → generator-DPX8vA2P.mjs} +30 -4
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{incremental-runtime-class-set-DZsbM0-a.js → incremental-runtime-class-set-C6akmwlk.js} +1 -1
- package/dist/{incremental-runtime-class-set-C7Q7fC5u.mjs → incremental-runtime-class-set-Cwpw6aZK.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-CFa6-qO9.js → postcss-Csaggbm7.js} +1 -1
- package/dist/{postcss-Drpy7j-g.mjs → postcss-ioX7S9x5.mjs} +1 -1
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{vite-B8IiXgVD.mjs → vite-BcXuBYy3.mjs} +2 -2
- package/dist/{vite-BcnwgJMt.js → vite-k4Nlk42j.js} +2 -2
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +29 -4
- package/dist/{webpack-DTkshAtp.mjs → webpack-C4pViZ7V.mjs} +1 -1
- package/dist/{webpack-C4zI624R.js → webpack-DC7v6ylA.js} +1 -1
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +7 -7
|
@@ -1,17 +1,45 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-8l464Juk.js");
|
|
1
2
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
3
|
+
let node_process = require("node:process");
|
|
4
|
+
node_process = require_chunk.__toESM(node_process);
|
|
2
5
|
//#region src/generator/options.ts
|
|
6
|
+
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
7
|
+
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
8
|
+
const mpxWebPlatformEnvKeys = ["MPX_CLI_MODE", "MPX_CURRENT_TARGET_MODE"];
|
|
9
|
+
function getEnvValue(key) {
|
|
10
|
+
return typeof node_process.default === "undefined" ? void 0 : node_process.default.env[key];
|
|
11
|
+
}
|
|
12
|
+
function normalizeGeneratorTargetValue(value) {
|
|
13
|
+
return value === "weapp" || value === "web" || value === "tailwind" ? value : void 0;
|
|
14
|
+
}
|
|
15
|
+
function isUniWebPlatform(value) {
|
|
16
|
+
const normalized = value?.trim().toLowerCase();
|
|
17
|
+
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
18
|
+
}
|
|
19
|
+
function isMpxWebPlatform(value) {
|
|
20
|
+
return value?.trim().toLowerCase() === "web";
|
|
21
|
+
}
|
|
22
|
+
function inferGeneratorTargetFromEnv() {
|
|
23
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
24
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
25
|
+
if (target !== void 0) return target;
|
|
26
|
+
}
|
|
27
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
28
|
+
return "weapp";
|
|
29
|
+
}
|
|
3
30
|
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
31
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
4
32
|
if (options == null) return {
|
|
5
|
-
target
|
|
33
|
+
target,
|
|
6
34
|
importFallback: true,
|
|
7
|
-
tailwindcssV3Compatibility:
|
|
35
|
+
tailwindcssV3Compatibility: target === "weapp"
|
|
8
36
|
};
|
|
9
37
|
return {
|
|
10
|
-
target
|
|
38
|
+
target,
|
|
11
39
|
config: options.config,
|
|
12
40
|
styleOptions: options.styleOptions,
|
|
13
41
|
importFallback: options.importFallback ?? true,
|
|
14
|
-
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ??
|
|
42
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
15
43
|
};
|
|
16
44
|
}
|
|
17
45
|
//#endregion
|
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
+
import process from "node:process";
|
|
2
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 isMpxWebPlatform(value) {
|
|
18
|
+
return value?.trim().toLowerCase() === "web";
|
|
19
|
+
}
|
|
20
|
+
function inferGeneratorTargetFromEnv() {
|
|
21
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
22
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
23
|
+
if (target !== void 0) return target;
|
|
24
|
+
}
|
|
25
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
26
|
+
return "weapp";
|
|
27
|
+
}
|
|
3
28
|
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
29
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
4
30
|
if (options == null) return {
|
|
5
|
-
target
|
|
31
|
+
target,
|
|
6
32
|
importFallback: true,
|
|
7
|
-
tailwindcssV3Compatibility:
|
|
33
|
+
tailwindcssV3Compatibility: target === "weapp"
|
|
8
34
|
};
|
|
9
35
|
return {
|
|
10
|
-
target
|
|
36
|
+
target,
|
|
11
37
|
config: options.config,
|
|
12
38
|
styleOptions: options.styleOptions,
|
|
13
39
|
importFallback: options.importFallback ?? true,
|
|
14
|
-
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ??
|
|
40
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
15
41
|
};
|
|
16
42
|
}
|
|
17
43
|
//#endregion
|
package/dist/generator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-8l464Juk.js");
|
|
3
3
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
4
|
-
const require_generator = require("./generator-
|
|
4
|
+
const require_generator = require("./generator-CV_APjnB.js");
|
|
5
5
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
6
6
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
7
7
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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-DyIcbpZm.mjs";
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-DPX8vA2P.mjs";
|
|
3
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
3
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-C6akmwlk.js");
|
|
5
5
|
const require_precheck = require("./precheck-8pQbjqpq.js");
|
|
6
6
|
const require_tailwindcss = require("./tailwindcss-whZE3HpL.js");
|
|
7
7
|
const require_source_candidates = require("./source-candidates-CUTNdsiz.js");
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
-
import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
2
|
+
import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-Cwpw6aZK.mjs";
|
|
3
3
|
import { _ as ensureRuntimeClassSet, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, t as shouldSkipJsTransform } from "./precheck-D1O5AWzy.mjs";
|
|
4
4
|
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-B_JAdOQf.mjs";
|
|
5
5
|
import { t as createSourceCandidateCollector } from "./source-candidates-CnD4vyic.mjs";
|
package/dist/{incremental-runtime-class-set-DZsbM0-a.js → incremental-runtime-class-set-C6akmwlk.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
3
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_generator = require("./generator-CV_APjnB.js");
|
|
4
4
|
const require_precheck = require("./precheck-8pQbjqpq.js");
|
|
5
5
|
const require_tailwindcss = require("./tailwindcss-whZE3HpL.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, G as omitUndefined, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-DPX8vA2P.mjs";
|
|
3
3
|
import { l as replaceWxml } from "./precheck-D1O5AWzy.mjs";
|
|
4
4
|
import { i as resolveUniAppXOptions } from "./tailwindcss-B_JAdOQf.mjs";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-CV_APjnB.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
4
|
+
const require_postcss = require("./postcss-Csaggbm7.js");
|
|
5
|
+
const require_vite = require("./vite-k4Nlk42j.js");
|
|
6
|
+
const require_webpack = require("./webpack-DC7v6ylA.js");
|
|
7
7
|
exports.UnifiedWebpackPluginV5 = require_webpack.UnifiedWebpackPluginV5;
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-DPX8vA2P.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-ioX7S9x5.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-BcXuBYy3.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-C4pViZ7V.mjs";
|
|
6
6
|
export { UnifiedWebpackPluginV5, WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
3
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_generator = require("./generator-CV_APjnB.js");
|
|
4
4
|
let postcss = require("postcss");
|
|
5
5
|
postcss = require_chunk.__toESM(postcss);
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as collectCssInlineSourceCandidates, F as parseConfigParam, H as readInstalledPackageMajorVersion, I as resolveCssSourceEntries, M as expandTailwindSourceEntries, O as DEFAULT_SOURCE_SCAN_EXTENSIONS, P as normalizeLegacyContentEntries, j as createSourceScanPattern, t as resolveTailwindV3Source, y as resolveTailwindV4Source$1 } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-DPX8vA2P.mjs";
|
|
3
3
|
import postcss from "postcss";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
package/dist/postcss.js
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_postcss = require("./postcss-
|
|
5
|
+
const require_postcss = require("./postcss-Csaggbm7.js");
|
|
6
6
|
exports.default = require_postcss.weappTailwindcssPostcssPlugin;
|
|
7
7
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
1
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-ioX7S9x5.mjs";
|
|
2
2
|
export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as createDebug, E as filterUnsupportedMiniProgramTailwindV4Candidates, G as omitUndefined, K as findNearestPackageRoot, U as findTailwindConfig, W as resolveTailwindcssOptions, _ as resolveViteSourceScanEntries, g as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature, m as discoverTailwindV4CssEntries, p as createViteSourceScanMatcher, v as resolveViteTailwindV4CssDependencies } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-
|
|
3
|
-
import { a as validateCandidatesByGenerator, c as hasTailwindSourceDirectives, i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, n as createHmrTimingRecorder, o as processCachedTask, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager, u as hasTailwindGeneratedCssMarkers } from "./incremental-runtime-class-set-
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-DPX8vA2P.mjs";
|
|
3
|
+
import { a as validateCandidatesByGenerator, c as hasTailwindSourceDirectives, i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, n as createHmrTimingRecorder, o as processCachedTask, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager, u as hasTailwindGeneratedCssMarkers } from "./incremental-runtime-class-set-Cwpw6aZK.mjs";
|
|
4
4
|
import { a as analyzeSource, c as isClassContextLiteralPath, g as createTailwindRuntimeReadyPromise, h as collectRuntimeClassSet, i as createAttributeMatcher, l as replaceWxml, m as toCustomAttributesEntities, n as getCompilerContext, o as JsTokenUpdater, p as vitePluginName, r as generateCode, s as _defineProperty, t as shouldSkipJsTransform, u as babelParse, v as refreshTailwindRuntimeState } from "./precheck-D1O5AWzy.mjs";
|
|
5
5
|
import { o as resolveUniUtsPlatform } from "./utils-CGBVVNm6.mjs";
|
|
6
6
|
import { c as upsertTailwindV4CssSource, i as resolveUniAppXOptions, r as isUniAppXEnabled, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-B_JAdOQf.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
3
|
+
const require_generator = require("./generator-CV_APjnB.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-C6akmwlk.js");
|
|
5
5
|
const require_precheck = require("./precheck-8pQbjqpq.js");
|
|
6
6
|
const require_utils = require("./utils-4ODFyoqD.js");
|
|
7
7
|
const require_tailwindcss = require("./tailwindcss-whZE3HpL.js");
|
package/dist/vite.js
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-k4Nlk42j.js");
|
|
3
3
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
1
|
+
import { t as WeappTailwindcss } from "./vite-BcXuBYy3.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
|
@@ -2730,18 +2730,43 @@ function resolveTailwindV3SourceFromPatcher(patcher) {
|
|
|
2730
2730
|
}
|
|
2731
2731
|
//#endregion
|
|
2732
2732
|
//#region src/generator/options.ts
|
|
2733
|
+
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
2734
|
+
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
2735
|
+
const mpxWebPlatformEnvKeys = ["MPX_CLI_MODE", "MPX_CURRENT_TARGET_MODE"];
|
|
2736
|
+
function getEnvValue(key) {
|
|
2737
|
+
return typeof node_process.default === "undefined" ? void 0 : node_process.default.env[key];
|
|
2738
|
+
}
|
|
2739
|
+
function normalizeGeneratorTargetValue(value) {
|
|
2740
|
+
return value === "weapp" || value === "web" || value === "tailwind" ? value : void 0;
|
|
2741
|
+
}
|
|
2742
|
+
function isUniWebPlatform(value) {
|
|
2743
|
+
const normalized = value?.trim().toLowerCase();
|
|
2744
|
+
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
2745
|
+
}
|
|
2746
|
+
function isMpxWebPlatform(value) {
|
|
2747
|
+
return value?.trim().toLowerCase() === "web";
|
|
2748
|
+
}
|
|
2749
|
+
function inferGeneratorTargetFromEnv() {
|
|
2750
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
2751
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
2752
|
+
if (target !== void 0) return target;
|
|
2753
|
+
}
|
|
2754
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
2755
|
+
return "weapp";
|
|
2756
|
+
}
|
|
2733
2757
|
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
2758
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
2734
2759
|
if (options == null) return {
|
|
2735
|
-
target
|
|
2760
|
+
target,
|
|
2736
2761
|
importFallback: true,
|
|
2737
|
-
tailwindcssV3Compatibility:
|
|
2762
|
+
tailwindcssV3Compatibility: target === "weapp"
|
|
2738
2763
|
};
|
|
2739
2764
|
return {
|
|
2740
|
-
target
|
|
2765
|
+
target,
|
|
2741
2766
|
config: options.config,
|
|
2742
2767
|
styleOptions: options.styleOptions,
|
|
2743
2768
|
importFallback: options.importFallback ?? true,
|
|
2744
|
-
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ??
|
|
2769
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp"
|
|
2745
2770
|
};
|
|
2746
2771
|
}
|
|
2747
2772
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
-
import { i as generateCssByGenerator, o as processCachedTask, r as emitHmrTiming, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
2
|
+
import { i as generateCssByGenerator, o as processCachedTask, r as emitHmrTiming, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-Cwpw6aZK.mjs";
|
|
3
3
|
import { _ as ensureRuntimeClassSet, f as pluginName, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, s as _defineProperty, t as shouldSkipJsTransform, v as refreshTailwindRuntimeState } from "./precheck-D1O5AWzy.mjs";
|
|
4
4
|
import { r as getGroupedEntries } from "./utils-CGBVVNm6.mjs";
|
|
5
5
|
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-B_JAdOQf.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
3
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
3
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-C6akmwlk.js");
|
|
4
4
|
const require_precheck = require("./precheck-8pQbjqpq.js");
|
|
5
5
|
const require_utils = require("./utils-4ODFyoqD.js");
|
|
6
6
|
const require_tailwindcss = require("./tailwindcss-whZE3HpL.js");
|
package/dist/webpack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-DC7v6ylA.js");
|
|
3
3
|
exports.UnifiedWebpackPluginV5 = require_webpack.UnifiedWebpackPluginV5;
|
|
4
4
|
exports.WeappTailwindcss = require_webpack.UnifiedWebpackPluginV5;
|
|
5
5
|
exports.weappTailwindcss = require_webpack.UnifiedWebpackPluginV5;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-C4pViZ7V.mjs";
|
|
2
2
|
export { UnifiedWebpackPluginV5, UnifiedWebpackPluginV5 as WeappTailwindcss, UnifiedWebpackPluginV5 as weappTailwindcss, weappTailwindcssPackageDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.22",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -169,9 +169,9 @@
|
|
|
169
169
|
},
|
|
170
170
|
"dependencies": {
|
|
171
171
|
"@ast-core/escape": "~1.0.1",
|
|
172
|
-
"@babel/parser": "~7.29.
|
|
173
|
-
"@babel/traverse": "~7.29.
|
|
174
|
-
"@babel/types": "~7.29.
|
|
172
|
+
"@babel/parser": "~7.29.7",
|
|
173
|
+
"@babel/traverse": "~7.29.7",
|
|
174
|
+
"@babel/types": "~7.29.7",
|
|
175
175
|
"@vue/compiler-dom": "^3.5.34",
|
|
176
176
|
"@vue/compiler-sfc": "^3.5.34",
|
|
177
177
|
"@weapp-core/escape": "~7.0.0",
|
|
@@ -189,11 +189,11 @@
|
|
|
189
189
|
"semver": "~7.8.1",
|
|
190
190
|
"tailwindcss-patch": "9.3.7",
|
|
191
191
|
"yaml": "^2.9.0",
|
|
192
|
-
"@weapp-tailwindcss/logger": "1.1.0",
|
|
193
|
-
"@weapp-tailwindcss/postcss": "3.0.0-next.6",
|
|
194
192
|
"@weapp-tailwindcss/reset": "0.1.1-next.0",
|
|
193
|
+
"@weapp-tailwindcss/logger": "1.1.0",
|
|
195
194
|
"@weapp-tailwindcss/shared": "1.1.3",
|
|
196
|
-
"tailwindcss-config": "1.1.6-next.1"
|
|
195
|
+
"tailwindcss-config": "1.1.6-next.1",
|
|
196
|
+
"@weapp-tailwindcss/postcss": "3.0.0-next.6"
|
|
197
197
|
},
|
|
198
198
|
"scripts": {
|
|
199
199
|
"dev": "tsdown --watch --sourcemap",
|