weapp-tailwindcss 5.0.0-next.2 → 5.0.0-next.3
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/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator-css-B5ejWUMv.mjs → generator-css-Bwy_Uz89.mjs} +13 -14
- package/dist/{generator-css-D3OdPRiS.js → generator-css-CRLrHW4F.js} +13 -14
- package/dist/gulp.js +4 -5
- package/dist/gulp.mjs +4 -5
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{loader-anchors-TrU7EUr7.mjs → loader-anchors-1MumTAtA.mjs} +2 -2
- package/dist/{loader-anchors-CNkWT8hx.js → loader-anchors-TrFvT6g1.js} +1 -1
- package/dist/{recorder-gYSNLfOP.js → recorder-GdTJ3QqX.js} +1 -1
- package/dist/{recorder-zsgatmkB.mjs → recorder-XdFvVASS.mjs} +1 -1
- package/dist/{vite-CrlzCNqz.mjs → vite-BDywuCjn.mjs} +5 -5
- package/dist/{vite-BC9U7ahn.js → vite-DgRh_GXn.js} +5 -5
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/{webpack-DD7A6V0u.js → webpack-CAJR4hhP.js} +3 -3
- package/dist/{webpack-Bu6M-Hbw.mjs → webpack-CiHqVZTg.mjs} +3 -3
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/webpack4.js +3 -3
- package/dist/webpack4.mjs +3 -3
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -156,7 +156,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region package.json
|
|
159
|
-
var version = "5.0.0-next.
|
|
159
|
+
var version = "5.0.0-next.3";
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/constants.ts
|
|
162
162
|
const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^20.19.0 || >=22.12.0";
|
package/dist/cli.mjs
CHANGED
|
@@ -127,7 +127,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region package.json
|
|
130
|
-
var version = "5.0.0-next.
|
|
130
|
+
var version = "5.0.0-next.3";
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/constants.ts
|
|
133
133
|
const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^20.19.0 || >=22.12.0";
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_recorder = require("./recorder-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
6
6
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder } from "./recorder-
|
|
1
|
+
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder } from "./recorder-XdFvVASS.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
4
4
|
//#region src/core.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveTailwindV4Source, c as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV3SourceOptionsFromPatcher, i as normalizeWeappTailwindcssGeneratorOptions, m as resolveTailwindV3SourceFromPatcher, p as resolveTailwindV3Source, s as resolveTailwindV4SourceFromPatcher, t as createWeappTailwindcssGenerator, v as removeUnsupportedCascadeLayers } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
|
-
import { l as replaceWxml } from "./recorder-
|
|
2
|
+
import { l as replaceWxml } from "./recorder-XdFvVASS.mjs";
|
|
3
3
|
import postcss from "postcss";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
@@ -1019,7 +1019,8 @@ async function generateCssByGenerator(options) {
|
|
|
1019
1019
|
const hasSourceDirectives = hasTailwindSourceDirectives(rawSource);
|
|
1020
1020
|
const hasGeneratedMarkers = hasTailwindGeneratedCssMarkers(rawSource);
|
|
1021
1021
|
const shouldForceGenerateCurrentCss = hasGeneratedCss || hasGeneratedMarkers || hasSourceDirectives || cssHandlerOptions.isMainChunk;
|
|
1022
|
-
|
|
1022
|
+
const shouldAutoGenerateCurrentCss = hasGeneratedCss || hasGeneratedMarkers || hasSourceDirectives;
|
|
1023
|
+
if (generatorOptions.mode === "off" || !SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || (generatorOptions.mode === "force" ? !shouldForceGenerateCurrentCss : !shouldAutoGenerateCurrentCss) || generatorOptions.mode === "force" && majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers || generatorOptions.mode !== "force" && majorVersion === 3) return;
|
|
1023
1024
|
try {
|
|
1024
1025
|
await runtimeState.patchPromise;
|
|
1025
1026
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, rawSource, file, cssHandlerOptions);
|
|
@@ -1077,18 +1078,16 @@ async function generateCssByGenerator(options) {
|
|
|
1077
1078
|
source: "generator"
|
|
1078
1079
|
};
|
|
1079
1080
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1081
|
+
debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
|
|
1082
|
+
let css = stripTailwindBanner(generated.css);
|
|
1083
|
+
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css, rawSource);
|
|
1084
|
+
css = await appendLegacyCompatCss(css, rawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
1085
|
+
css = await appendLegacyContainerCompatCss(css, rawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
1086
|
+
return {
|
|
1087
|
+
css: finalizeMiniProgramGeneratorCss(css, generated.target),
|
|
1088
|
+
target: generated.target,
|
|
1089
|
+
source: generatorOptions.mode === "force" ? "generator-forced" : "generator"
|
|
1090
|
+
};
|
|
1092
1091
|
} catch (error) {
|
|
1093
1092
|
if (generatorOptions.mode === "force") throw error;
|
|
1094
1093
|
debug("tailwind direct css generation failed, fallback to styleHandler: %s %O", file, error);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_generator = require("./generator-mmhXzZnv.js");
|
|
3
|
-
const require_recorder = require("./recorder-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
4
|
let postcss = require("postcss");
|
|
5
5
|
postcss = require_chunk.__toESM(postcss);
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1023,7 +1023,8 @@ async function generateCssByGenerator(options) {
|
|
|
1023
1023
|
const hasSourceDirectives = hasTailwindSourceDirectives(rawSource);
|
|
1024
1024
|
const hasGeneratedMarkers = hasTailwindGeneratedCssMarkers(rawSource);
|
|
1025
1025
|
const shouldForceGenerateCurrentCss = hasGeneratedCss || hasGeneratedMarkers || hasSourceDirectives || cssHandlerOptions.isMainChunk;
|
|
1026
|
-
|
|
1026
|
+
const shouldAutoGenerateCurrentCss = hasGeneratedCss || hasGeneratedMarkers || hasSourceDirectives;
|
|
1027
|
+
if (generatorOptions.mode === "off" || !SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || (generatorOptions.mode === "force" ? !shouldForceGenerateCurrentCss : !shouldAutoGenerateCurrentCss) || generatorOptions.mode === "force" && majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers || generatorOptions.mode !== "force" && majorVersion === 3) return;
|
|
1027
1028
|
try {
|
|
1028
1029
|
await runtimeState.patchPromise;
|
|
1029
1030
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, rawSource, file, cssHandlerOptions);
|
|
@@ -1081,18 +1082,16 @@ async function generateCssByGenerator(options) {
|
|
|
1081
1082
|
source: "generator"
|
|
1082
1083
|
};
|
|
1083
1084
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1085
|
+
debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
|
|
1086
|
+
let css = stripTailwindBanner(generated.css);
|
|
1087
|
+
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css, rawSource);
|
|
1088
|
+
css = await appendLegacyCompatCss(css, rawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
1089
|
+
css = await appendLegacyContainerCompatCss(css, rawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
1090
|
+
return {
|
|
1091
|
+
css: finalizeMiniProgramGeneratorCss(css, generated.target),
|
|
1092
|
+
target: generated.target,
|
|
1093
|
+
source: generatorOptions.mode === "force" ? "generator-forced" : "generator"
|
|
1094
|
+
};
|
|
1096
1095
|
} catch (error) {
|
|
1097
1096
|
if (generatorOptions.mode === "force") throw error;
|
|
1098
1097
|
debug("tailwind direct css generation failed, fallback to styleHandler: %s %O", file, error);
|
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
|
-
const require_recorder = require("./recorder-
|
|
4
|
-
const require_generator_css = require("./generator-css-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
|
+
const require_generator_css = require("./generator-css-CRLrHW4F.js");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
7
7
|
let node_process = require("node:process");
|
|
@@ -21,7 +21,6 @@ const Transform = node_stream.default.Transform;
|
|
|
21
21
|
*/
|
|
22
22
|
function createPlugins(options = {}) {
|
|
23
23
|
const opts = require_recorder.getCompilerContext(options);
|
|
24
|
-
const hasExplicitGeneratorOptions = options.generator !== void 0;
|
|
25
24
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
26
25
|
const patchRecorderState = require_recorder.setupPatchRecorder(initialTwPatcher, opts.tailwindcssBasedir, {
|
|
27
26
|
source: "runtime",
|
|
@@ -183,7 +182,7 @@ function createPlugins(options = {}) {
|
|
|
183
182
|
async transform() {
|
|
184
183
|
await runtimeState.patchPromise;
|
|
185
184
|
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, options);
|
|
186
|
-
const css = (
|
|
185
|
+
const css = (await require_generator_css.generateCssByGenerator({
|
|
187
186
|
opts,
|
|
188
187
|
runtimeState,
|
|
189
188
|
runtime: await refreshRuntimeSet(false),
|
|
@@ -193,7 +192,7 @@ function createPlugins(options = {}) {
|
|
|
193
192
|
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
194
193
|
styleHandler,
|
|
195
194
|
debug
|
|
196
|
-
})
|
|
195
|
+
}))?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
197
196
|
debug("css handle: %s", file.path);
|
|
198
197
|
return { result: css };
|
|
199
198
|
}
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as refreshTailwindRuntimeState, g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-
|
|
2
|
-
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-
|
|
1
|
+
import { _ as refreshTailwindRuntimeState, g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-XdFvVASS.mjs";
|
|
2
|
+
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-Bwy_Uz89.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { Buffer } from "node:buffer";
|
|
@@ -15,7 +15,6 @@ const Transform = stream.Transform;
|
|
|
15
15
|
*/
|
|
16
16
|
function createPlugins(options = {}) {
|
|
17
17
|
const opts = getCompilerContext(options);
|
|
18
|
-
const hasExplicitGeneratorOptions = options.generator !== void 0;
|
|
19
18
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
20
19
|
const patchRecorderState = setupPatchRecorder(initialTwPatcher, opts.tailwindcssBasedir, {
|
|
21
20
|
source: "runtime",
|
|
@@ -177,7 +176,7 @@ function createPlugins(options = {}) {
|
|
|
177
176
|
async transform() {
|
|
178
177
|
await runtimeState.patchPromise;
|
|
179
178
|
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, options);
|
|
180
|
-
const css = (
|
|
179
|
+
const css = (await generateCssByGenerator({
|
|
181
180
|
opts,
|
|
182
181
|
runtimeState,
|
|
183
182
|
runtime: await refreshRuntimeSet(false),
|
|
@@ -187,7 +186,7 @@ function createPlugins(options = {}) {
|
|
|
187
186
|
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
188
187
|
styleHandler,
|
|
189
188
|
debug
|
|
190
|
-
})
|
|
189
|
+
}))?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
191
190
|
debug("css handle: %s", file.path);
|
|
192
191
|
return { result: css };
|
|
193
192
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_generator = require("./generator-mmhXzZnv.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
4
|
const require_postcss = require("./postcss.js");
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
5
|
+
const require_vite = require("./vite-DgRh_GXn.js");
|
|
6
|
+
const require_webpack = require("./webpack-CAJR4hhP.js");
|
|
7
7
|
exports.UnifiedViteWeappTailwindcssPlugin = require_vite.UnifiedViteWeappTailwindcssPlugin;
|
|
8
8
|
exports.UnifiedWebpackPluginV5 = require_webpack.UnifiedWebpackPluginV5;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as createWeappTailwindcssGenerator } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
3
|
import weappTailwindcssPostcssPlugin from "./postcss.mjs";
|
|
4
|
-
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
4
|
+
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-BDywuCjn.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-CiHqVZTg.mjs";
|
|
6
6
|
export { UnifiedViteWeappTailwindcssPlugin, UnifiedWebpackPluginV5, createPlugins, createWeappTailwindcssGenerator, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as pluginName } from "./recorder-
|
|
1
|
+
import { p as pluginName } from "./recorder-XdFvVASS.mjs";
|
|
2
2
|
import { t as resolveTailwindcssImport } from "./css-imports-CSdPq_Sc.mjs";
|
|
3
3
|
import Module from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
@@ -169,7 +169,7 @@ function hasWatchChanges(compiler) {
|
|
|
169
169
|
return (compiler.modifiedFiles?.size ?? 0) > 0 || (compiler.removedFiles?.size ?? 0) > 0;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
172
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.10_synckit@0.11.12_typescript@5.9.3_vue-tsc@3.2.8_typescript@5.9.3_/node_modules/tsdown/esm-shims.js
|
|
173
173
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
174
174
|
const getDirname = () => path.dirname(getFilename());
|
|
175
175
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_recorder = require("./recorder-
|
|
2
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
3
3
|
const require_css_imports = require("./css-imports-BbrbluP9.js");
|
|
4
4
|
let node_module = require("node:module");
|
|
5
5
|
node_module = require_chunk.__toESM(node_module);
|
|
@@ -372,7 +372,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region package.json
|
|
375
|
-
var version = "5.0.0-next.
|
|
375
|
+
var version = "5.0.0-next.3";
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/constants.ts
|
|
378
378
|
const pluginName = "weapp-tailwindcss-webpack-plugin";
|
|
@@ -364,7 +364,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
364
364
|
}
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region package.json
|
|
367
|
-
var version = "5.0.0-next.
|
|
367
|
+
var version = "5.0.0-next.3";
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region src/constants.ts
|
|
370
370
|
const pluginName = "weapp-tailwindcss-webpack-plugin";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as filterUnsupportedMiniProgramTailwindV4Candidates, f as loadTailwindV4DesignSystem, i as normalizeWeappTailwindcssGeneratorOptions, s as resolveTailwindV4SourceFromPatcher } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
2
|
import { r as resolveTailwindcssOptions } from "./patcher-options-DQfR5xxT.mjs";
|
|
3
|
-
import { _ as refreshTailwindRuntimeState, a as createAttributeMatcher, c as isClassContextLiteralPath, d as traverse$1, f as toCustomAttributesEntities, h as collectRuntimeClassSet, i as generateCode, l as replaceWxml, m as vitePluginName, n as shouldSkipJsTransform, o as analyzeSource, r as getCompilerContext, s as JsTokenUpdater, t as setupPatchRecorder, u as babelParse, v as createDebug } from "./recorder-
|
|
3
|
+
import { _ as refreshTailwindRuntimeState, a as createAttributeMatcher, c as isClassContextLiteralPath, d as traverse$1, f as toCustomAttributesEntities, h as collectRuntimeClassSet, i as generateCode, l as replaceWxml, m as vitePluginName, n as shouldSkipJsTransform, o as analyzeSource, r as getCompilerContext, s as JsTokenUpdater, t as setupPatchRecorder, u as babelParse, v as createDebug } from "./recorder-XdFvVASS.mjs";
|
|
4
4
|
import { o as resolveUniUtsPlatform } from "./utils-7DUGTFED.mjs";
|
|
5
5
|
import { a as resolveUniAppXOptions, d as getRuntimeClassSetSignature, i as isUniAppXEnabled, l as findNearestPackageRoot, o as findTailwindConfig, t as logger$1 } from "./logger-BoVx1Dbt.mjs";
|
|
6
|
-
import { i as processCachedTask, n as hasTailwindGeneratedCssMarkers, r as hasTailwindSourceDirectives, t as generateCssByGenerator } from "./generator-css-
|
|
6
|
+
import { i as processCachedTask, n as hasTailwindGeneratedCssMarkers, r as hasTailwindSourceDirectives, t as generateCssByGenerator } from "./generator-css-Bwy_Uz89.mjs";
|
|
7
7
|
import { a as resolveDisabledOptions, c as toAbsoluteOutputPath, i as resolvePackageDir, n as rewriteTailwindcssImportsInCode, o as normalizeOutputPathKey, r as pushConcurrentTaskFactories, s as resolveOutputSpecifier, t as resolveTailwindcssImport } from "./css-imports-CSdPq_Sc.mjs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import process from "node:process";
|
|
@@ -516,7 +516,7 @@ function shouldGenerateCssByGenerator(opts, file, rawSource, processed) {
|
|
|
516
516
|
return processed && shouldFinalizeProcessedCssAsset(opts, file);
|
|
517
517
|
}
|
|
518
518
|
function shouldFinalizeProcessedCssAsset(opts, file) {
|
|
519
|
-
return normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode
|
|
519
|
+
return normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode !== "off" && opts.mainCssChunkMatcher(file, opts.appType);
|
|
520
520
|
}
|
|
521
521
|
function createViteCssFinalizerOutputPlugin(context) {
|
|
522
522
|
return {
|
|
@@ -1280,7 +1280,7 @@ function createGenerateBundleHook(context) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
const cssRuntimeSignature = createCssRuntimeSignature(runtimeSignature, generatorCandidateSignature);
|
|
1283
|
-
if (useIncrementalMode && generatorOptions.mode
|
|
1283
|
+
if (useIncrementalMode && generatorOptions.mode !== "off") for (const [file, rawSource] of getRememberedMainCssSources?.() ?? []) {
|
|
1284
1284
|
if (bundleFiles.includes(file) || getRememberedMainCssSignature?.(file) === cssRuntimeSignature) continue;
|
|
1285
1285
|
tasks.push((async () => {
|
|
1286
1286
|
const start = performance.now();
|
|
@@ -1869,7 +1869,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1869
1869
|
const uniAppXEnabled = isUniAppXEnabled(uniAppX);
|
|
1870
1870
|
const disabledOptions = resolveDisabledOptions(disabled);
|
|
1871
1871
|
const tailwindcssMajorVersion = initialTwPatcher.majorVersion ?? 0;
|
|
1872
|
-
const shouldOwnTailwindGeneration = normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode
|
|
1872
|
+
const shouldOwnTailwindGeneration = normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode !== "off" && !disabledOptions.plugin;
|
|
1873
1873
|
const shouldRewriteCssImports = opts.rewriteCssImports !== false && !disabledOptions.rewriteCssImports && (rewriteCssImportsSpecified || tailwindcssMajorVersion >= 4);
|
|
1874
1874
|
const rewritePlugins = createRewriteCssImportsPlugins({
|
|
1875
1875
|
getAppType: () => opts.appType,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_generator = require("./generator-mmhXzZnv.js");
|
|
3
3
|
const require_patcher_options = require("./patcher-options-6gJN2EXy.js");
|
|
4
|
-
const require_recorder = require("./recorder-
|
|
4
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
5
5
|
const require_utils = require("./utils-DmC9_In3.js");
|
|
6
6
|
const require_logger = require("./logger-BZ45DZJT.js");
|
|
7
|
-
const require_generator_css = require("./generator-css-
|
|
7
|
+
const require_generator_css = require("./generator-css-CRLrHW4F.js");
|
|
8
8
|
const require_css_imports = require("./css-imports-BbrbluP9.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
10
10
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -524,7 +524,7 @@ function shouldGenerateCssByGenerator(opts, file, rawSource, processed) {
|
|
|
524
524
|
return processed && shouldFinalizeProcessedCssAsset(opts, file);
|
|
525
525
|
}
|
|
526
526
|
function shouldFinalizeProcessedCssAsset(opts, file) {
|
|
527
|
-
return require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode
|
|
527
|
+
return require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode !== "off" && opts.mainCssChunkMatcher(file, opts.appType);
|
|
528
528
|
}
|
|
529
529
|
function createViteCssFinalizerOutputPlugin(context) {
|
|
530
530
|
return {
|
|
@@ -1288,7 +1288,7 @@ function createGenerateBundleHook(context) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
const cssRuntimeSignature = createCssRuntimeSignature(runtimeSignature, generatorCandidateSignature);
|
|
1291
|
-
if (useIncrementalMode && generatorOptions.mode
|
|
1291
|
+
if (useIncrementalMode && generatorOptions.mode !== "off") for (const [file, rawSource] of getRememberedMainCssSources?.() ?? []) {
|
|
1292
1292
|
if (bundleFiles.includes(file) || getRememberedMainCssSignature?.(file) === cssRuntimeSignature) continue;
|
|
1293
1293
|
tasks.push((async () => {
|
|
1294
1294
|
const start = performance.now();
|
|
@@ -1877,7 +1877,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
|
1877
1877
|
const uniAppXEnabled = require_logger.isUniAppXEnabled(uniAppX);
|
|
1878
1878
|
const disabledOptions = require_css_imports.resolveDisabledOptions(disabled);
|
|
1879
1879
|
const tailwindcssMajorVersion = initialTwPatcher.majorVersion ?? 0;
|
|
1880
|
-
const shouldOwnTailwindGeneration = require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode
|
|
1880
|
+
const shouldOwnTailwindGeneration = require_generator.normalizeWeappTailwindcssGeneratorOptions(opts.generator).mode !== "off" && !disabledOptions.plugin;
|
|
1881
1881
|
const shouldRewriteCssImports = opts.rewriteCssImports !== false && !disabledOptions.rewriteCssImports && (rewriteCssImportsSpecified || tailwindcssMajorVersion >= 4);
|
|
1882
1882
|
const rewritePlugins = createRewriteCssImportsPlugins({
|
|
1883
1883
|
getAppType: () => opts.appType,
|
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_vite = require("./vite-
|
|
2
|
+
const require_vite = require("./vite-DgRh_GXn.js");
|
|
3
3
|
exports.UnifiedViteWeappTailwindcssPlugin = require_vite.UnifiedViteWeappTailwindcssPlugin;
|
|
4
4
|
exports.WeappTailwindcss = require_vite.UnifiedViteWeappTailwindcssPlugin;
|
|
5
5
|
exports.weappTailwindcss = require_vite.UnifiedViteWeappTailwindcssPlugin;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-
|
|
1
|
+
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-BDywuCjn.mjs";
|
|
2
2
|
export { UnifiedViteWeappTailwindcssPlugin, UnifiedViteWeappTailwindcssPlugin as WeappTailwindcss, UnifiedViteWeappTailwindcssPlugin as weappTailwindcss };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
2
|
const require_patcher_options = require("./patcher-options-6gJN2EXy.js");
|
|
3
|
-
const require_recorder = require("./recorder-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
4
|
const require_utils = require("./utils-DmC9_In3.js");
|
|
5
5
|
const require_logger = require("./logger-BZ45DZJT.js");
|
|
6
|
-
const require_generator_css = require("./generator-css-
|
|
6
|
+
const require_generator_css = require("./generator-css-CRLrHW4F.js");
|
|
7
7
|
const require_css_imports = require("./css-imports-BbrbluP9.js");
|
|
8
|
-
const require_loader_anchors = require("./loader-anchors-
|
|
8
|
+
const require_loader_anchors = require("./loader-anchors-TrFvT6g1.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
10
10
|
node_path = require_chunk.__toESM(node_path);
|
|
11
11
|
let node_process = require("node:process");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as resolveTailwindcssOptions } from "./patcher-options-DQfR5xxT.mjs";
|
|
2
|
-
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, p as pluginName, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-
|
|
2
|
+
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, p as pluginName, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-XdFvVASS.mjs";
|
|
3
3
|
import { r as getGroupedEntries } from "./utils-7DUGTFED.mjs";
|
|
4
4
|
import { d as getRuntimeClassSetSignature } from "./logger-BoVx1Dbt.mjs";
|
|
5
|
-
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-
|
|
5
|
+
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-Bwy_Uz89.mjs";
|
|
6
6
|
import { a as resolveDisabledOptions, c as toAbsoluteOutputPath, i as resolvePackageDir, r as pushConcurrentTaskFactories, s as resolveOutputSpecifier } from "./css-imports-CSdPq_Sc.mjs";
|
|
7
|
-
import { a as hasLoaderEntry, c as applyTailwindcssCssImportRewrite, d as isMpx, f as patchMpxLoaderResolve, i as getCacheKey, l as ensureMpxTailwindcssAliases, n as __dirname, o as hasWatchChanges, p as setupMpxTailwindcssRedirect, r as createAssetHashByChunkMap, s as isCssLikeModuleResource, t as createLoaderAnchorFinders, u as injectMpxCssRewritePreRules } from "./loader-anchors-
|
|
7
|
+
import { a as hasLoaderEntry, c as applyTailwindcssCssImportRewrite, d as isMpx, f as patchMpxLoaderResolve, i as getCacheKey, l as ensureMpxTailwindcssAliases, n as __dirname, o as hasWatchChanges, p as setupMpxTailwindcssRedirect, r as createAssetHashByChunkMap, s as isCssLikeModuleResource, t as createLoaderAnchorFinders, u as injectMpxCssRewritePreRules } from "./loader-anchors-1MumTAtA.mjs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import process from "node:process";
|
|
10
10
|
import fs from "node:fs";
|
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-CAJR4hhP.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-CiHqVZTg.mjs";
|
|
2
2
|
export { UnifiedWebpackPluginV5, UnifiedWebpackPluginV5 as WeappTailwindcss, UnifiedWebpackPluginV5 as weappTailwindcss, weappTailwindcssPackageDir };
|
package/dist/webpack4.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_recorder = require("./recorder-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
4
|
const require_utils = require("./utils-DmC9_In3.js");
|
|
5
5
|
const require_logger = require("./logger-BZ45DZJT.js");
|
|
6
|
-
const require_generator_css = require("./generator-css-
|
|
6
|
+
const require_generator_css = require("./generator-css-CRLrHW4F.js");
|
|
7
7
|
const require_css_imports = require("./css-imports-BbrbluP9.js");
|
|
8
|
-
const require_loader_anchors = require("./loader-anchors-
|
|
8
|
+
const require_loader_anchors = require("./loader-anchors-TrFvT6g1.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
10
10
|
node_path = require_chunk.__toESM(node_path);
|
|
11
11
|
let node_process = require("node:process");
|
package/dist/webpack4.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, p as pluginName, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-
|
|
1
|
+
import { g as ensureRuntimeClassSet, n as shouldSkipJsTransform, p as pluginName, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-XdFvVASS.mjs";
|
|
2
2
|
import { r as getGroupedEntries } from "./utils-7DUGTFED.mjs";
|
|
3
3
|
import { d as getRuntimeClassSetSignature } from "./logger-BoVx1Dbt.mjs";
|
|
4
|
-
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-
|
|
4
|
+
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-Bwy_Uz89.mjs";
|
|
5
5
|
import { a as resolveDisabledOptions, c as toAbsoluteOutputPath, i as resolvePackageDir, r as pushConcurrentTaskFactories, s as resolveOutputSpecifier } from "./css-imports-CSdPq_Sc.mjs";
|
|
6
|
-
import { a as hasLoaderEntry, c as applyTailwindcssCssImportRewrite, d as isMpx, f as patchMpxLoaderResolve, i as getCacheKey, l as ensureMpxTailwindcssAliases, n as __dirname, p as setupMpxTailwindcssRedirect, r as createAssetHashByChunkMap, s as isCssLikeModuleResource, t as createLoaderAnchorFinders, u as injectMpxCssRewritePreRules } from "./loader-anchors-
|
|
6
|
+
import { a as hasLoaderEntry, c as applyTailwindcssCssImportRewrite, d as isMpx, f as patchMpxLoaderResolve, i as getCacheKey, l as ensureMpxTailwindcssAliases, n as __dirname, p as setupMpxTailwindcssRedirect, r as createAssetHashByChunkMap, s as isCssLikeModuleResource, t as createLoaderAnchorFinders, u as injectMpxCssRewritePreRules } from "./loader-anchors-1MumTAtA.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import fs from "node:fs";
|
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.3",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -180,8 +180,8 @@
|
|
|
180
180
|
"@babel/traverse": "~7.29.0",
|
|
181
181
|
"@babel/types": "~7.29.0",
|
|
182
182
|
"@tailwindcss-mangle/config": "^7.0.1",
|
|
183
|
-
"@vue/compiler-dom": "^3.5.
|
|
184
|
-
"@vue/compiler-sfc": "^3.5.
|
|
183
|
+
"@vue/compiler-dom": "^3.5.34",
|
|
184
|
+
"@vue/compiler-sfc": "^3.5.34",
|
|
185
185
|
"@weapp-core/escape": "~7.0.0",
|
|
186
186
|
"@weapp-core/regex": "~1.0.1",
|
|
187
187
|
"cac": "6.7.14",
|
|
@@ -200,9 +200,9 @@
|
|
|
200
200
|
"yaml": "^2.8.4",
|
|
201
201
|
"@weapp-tailwindcss/logger": "1.1.0",
|
|
202
202
|
"@weapp-tailwindcss/postcss": "2.2.0",
|
|
203
|
-
"@weapp-tailwindcss/shared": "1.1.3",
|
|
204
203
|
"@weapp-tailwindcss/reset": "0.1.0",
|
|
205
|
-
"tailwindcss-config": "1.1.6-next.0"
|
|
204
|
+
"tailwindcss-config": "1.1.6-next.0",
|
|
205
|
+
"@weapp-tailwindcss/shared": "1.1.3"
|
|
206
206
|
},
|
|
207
207
|
"scripts": {
|
|
208
208
|
"dev": "tsdown --watch --sourcemap",
|