weapp-tailwindcss 5.0.0-next.26 → 5.0.0-next.28
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/{auto-CqyEtds4.js → auto-TH1jG2UW.js} +2 -2
- package/dist/{auto-CsWz6lsU.mjs → auto-XyKTOP7B.mjs} +1 -1
- package/dist/{bundle-state-CWcrb3mH.mjs → bundle-state-Bi-cQua6.mjs} +1 -1
- package/dist/{bundle-state-uCtqRm0p.js → bundle-state-Ct_8GcSR.js} +2 -2
- package/dist/bundlers/vite/index.d.ts +5 -2
- package/dist/bundlers/vite/source-candidates.d.ts +3 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
- package/dist/cli.js +5 -6
- package/dist/cli.mjs +5 -6
- package/dist/core.js +1 -2
- package/dist/core.mjs +1 -1
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +4 -4
- package/dist/css-macro.mjs +3 -3
- package/dist/{defaults-B-1EEhdL.mjs → defaults-8xrgzxFY.mjs} +1 -1
- package/dist/{defaults-C10hYUch.js → defaults-zKUH2mDe.js} +1 -2
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-BH6a0xuB.js → generator-CrU-Ghc1.js} +10 -3
- package/dist/{generator-iI_265gt.mjs → generator-Qw-tZ0Z2.mjs} +9 -2
- package/dist/generator.js +2 -3
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/{incremental-runtime-class-set-ECHyKwUL.mjs → incremental-runtime-class-set-CYkXVVCL.mjs} +48 -14
- package/dist/{incremental-runtime-class-set-mY0v1k-Y.js → incremental-runtime-class-set-DPQEzllt.js} +48 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/dist/index.mjs +5 -5
- package/dist/{postcss-DJoU--Z-.mjs → postcss-C6zOQqlL.mjs} +2 -2
- package/dist/{postcss-DEEAZ8J5.js → postcss-DAWf9D3C.js} +3 -3
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-BI8oBeUg.mjs → precheck-D7K12zeX.mjs} +41 -17
- package/dist/{precheck-DLJg0_pu.js → precheck-D7gJSmJz.js} +37 -13
- package/dist/presets.js +5 -5
- package/dist/presets.mjs +4 -4
- package/dist/reset.js +1 -1
- package/dist/{source-candidates-DkScNh9A.mjs → source-candidates-CX2ozpKM.mjs} +49 -7
- package/dist/{source-candidates-mfvC9gMc.js → source-candidates-DNM8iwXW.js} +50 -8
- package/dist/{tailwindcss-Cm93idme.js → tailwindcss-B-e2RiXr.js} +3 -3
- package/dist/{tailwindcss-DFa5Yes8.mjs → tailwindcss-C7dJHZ0G.mjs} +2 -2
- package/dist/{utils-CSA174-I.js → utils-D7Ygohep.js} +1 -1
- package/dist/{v3-engine-CGsbY81C.js → v3-engine-CHItlVq5.js} +12 -4
- package/dist/{v3-engine-CPJ9uGyr.mjs → v3-engine-DcvCCHfs.mjs} +11 -3
- package/dist/vite-CHYG-Lf6.js +24439 -0
- package/dist/vite-CmimsYBm.mjs +24425 -0
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +54 -13
- package/dist/weapp-tw-runtime-classset-loader.js +1 -1
- package/dist/{webpack-CfcuDhQ8.js → webpack-BguN8tQa.js} +16 -14
- package/dist/{webpack-D--XZMBB.mjs → webpack-ejGMOruE.mjs} +15 -13
- package/dist/webpack.d.ts +1 -3
- package/dist/webpack.js +3 -4
- package/dist/webpack.mjs +2 -2
- package/package.json +7 -7
- package/dist/vite-BM_ksf1q.js +0 -2537
- package/dist/vite-CqEF-Wx5.mjs +0 -2523
- /package/dist/{logger-Dr7IvyH2.mjs → logger-BNzxZbZj.mjs} +0 -0
- /package/dist/{logger-Cdzl3p8j.js → logger-TlKT3xmR.js} +0 -0
- /package/dist/{postcss-BzaRjBL0.mjs → postcss-C7BMYpEF.mjs} +0 -0
- /package/dist/{postcss-BwW8zO24.js → postcss-CiYLsqZn.js} +0 -0
- /package/dist/{runtime-registry-CdCV3Opt.js → runtime-registry-DpcR3IHI.js} +0 -0
- /package/dist/{utils-B2SJgA1L.mjs → utils-DsaS975I.mjs} +0 -0
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-CHYG-Lf6.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-CmimsYBm.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_runtime_registry = require("./runtime-registry-
|
|
5
|
+
const require_runtime_registry = require("./runtime-registry-DpcR3IHI.js");
|
|
6
6
|
let node_buffer = require("node:buffer");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_runtime_registry.__toESM(node_process);
|
|
@@ -11,11 +11,11 @@ let node_path = require("node:path");
|
|
|
11
11
|
node_path = require_runtime_registry.__toESM(node_path);
|
|
12
12
|
let node_util = require("node:util");
|
|
13
13
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
14
|
+
let tailwindcss_patch = require("tailwindcss-patch");
|
|
14
15
|
let node_fs = require("node:fs");
|
|
15
16
|
node_fs = require_runtime_registry.__toESM(node_fs);
|
|
16
17
|
let node_module = require("node:module");
|
|
17
18
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
18
|
-
let tailwindcss_patch = require("tailwindcss-patch");
|
|
19
19
|
let node_url = require("node:url");
|
|
20
20
|
let debug = require("debug");
|
|
21
21
|
debug = require_runtime_registry.__toESM(debug);
|
|
@@ -3133,6 +3133,13 @@ function isUniWebPlatform(value) {
|
|
|
3133
3133
|
const normalized = value?.trim().toLowerCase();
|
|
3134
3134
|
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
3135
3135
|
}
|
|
3136
|
+
function isUniAppWebViewPlatform(value) {
|
|
3137
|
+
const normalized = value?.trim().toLowerCase();
|
|
3138
|
+
return normalized === "app" || normalized === "app-plus";
|
|
3139
|
+
}
|
|
3140
|
+
function isUniNativeAppPlatform(value) {
|
|
3141
|
+
return (value?.trim().toLowerCase())?.startsWith("app-") === true;
|
|
3142
|
+
}
|
|
3136
3143
|
function isMpxWebPlatform(value) {
|
|
3137
3144
|
return value?.trim().toLowerCase() === "web";
|
|
3138
3145
|
}
|
|
@@ -3141,7 +3148,7 @@ function inferGeneratorTargetFromEnv() {
|
|
|
3141
3148
|
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
3142
3149
|
if (target !== void 0) return target;
|
|
3143
3150
|
}
|
|
3144
|
-
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
3151
|
+
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";
|
|
3145
3152
|
return "weapp";
|
|
3146
3153
|
}
|
|
3147
3154
|
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
@@ -4615,6 +4622,16 @@ function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtime, options) {
|
|
|
4615
4622
|
function shouldIsolateMatchedCssSource(source, sourceEntries) {
|
|
4616
4623
|
return Boolean(source.__weappTailwindcssMeta?.matchedCssSourceFile && sourceEntries !== void 0);
|
|
4617
4624
|
}
|
|
4625
|
+
function shouldScanTailwindV4Sources(majorVersion, target, generatorRuntime, isolateCssSource) {
|
|
4626
|
+
if (majorVersion !== 4 || isolateCssSource) return false;
|
|
4627
|
+
return target === "web" || generatorRuntime.size === 0;
|
|
4628
|
+
}
|
|
4629
|
+
function shouldAppendWebBundleCssFallback(target, options) {
|
|
4630
|
+
return target === "web" && !options.hasMatchedCssSourceFile && !options.hasSourceDirectives;
|
|
4631
|
+
}
|
|
4632
|
+
function isEmptyCssSourceOrderParts(parts) {
|
|
4633
|
+
return parts.before.trim().length === 0 && parts.after.trim().length === 0;
|
|
4634
|
+
}
|
|
4618
4635
|
function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOptions) {
|
|
4619
4636
|
const preflightStyleOptions = {
|
|
4620
4637
|
cssPreflight: opts.cssPreflight,
|
|
@@ -4754,9 +4771,11 @@ async function generateCssByGenerator(options) {
|
|
|
4754
4771
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || !shouldGenerateCurrentCss || majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers) return;
|
|
4755
4772
|
try {
|
|
4756
4773
|
await runtimeState.readyPromise;
|
|
4774
|
+
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(effectiveRawSource, "css") : [];
|
|
4775
|
+
const runtimeWithCurrentCss = currentCssCandidates.length > 0 ? new Set([...runtime, ...currentCssCandidates]) : runtime;
|
|
4757
4776
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, effectiveRawSource, file, cssHandlerOptions, generatorOptions, {
|
|
4758
4777
|
getSourceCandidatesForEntries,
|
|
4759
|
-
runtime
|
|
4778
|
+
runtime: runtimeWithCurrentCss
|
|
4760
4779
|
});
|
|
4761
4780
|
const generatorStyleOptions = resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorOptions.styleOptions);
|
|
4762
4781
|
const configuredContainerCompat = hasConfiguredContainerCompatSources(sources);
|
|
@@ -4765,15 +4784,15 @@ async function generateCssByGenerator(options) {
|
|
|
4765
4784
|
const sourceEntries = getSourceCandidatesForEntries && majorVersion === 4 ? await resolveGeneratorSourceEntries(source, runtimeState) : void 0;
|
|
4766
4785
|
const scopedRuntime = sourceEntries ? getSourceCandidatesForEntries?.(sourceEntries) : void 0;
|
|
4767
4786
|
const isolateCssSource = shouldIsolateMatchedCssSource(source, sourceEntries);
|
|
4768
|
-
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? mergeScopedRuntimeWithCurrentRuntime(scopedRuntime,
|
|
4787
|
+
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtimeWithCurrentCss, {
|
|
4769
4788
|
cssHandlerOptions,
|
|
4770
4789
|
isolateCssSource
|
|
4771
|
-
}) :
|
|
4790
|
+
}) : runtimeWithCurrentCss;
|
|
4772
4791
|
const generatorRuntime = majorVersion === 4 && generatorOptions.target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(sourceRuntime) : sourceRuntime;
|
|
4773
4792
|
return generator.generate({
|
|
4774
4793
|
candidates: generatorRuntime,
|
|
4775
4794
|
incrementalCache: majorVersion === 3 || majorVersion === 4,
|
|
4776
|
-
scanSources: majorVersion
|
|
4795
|
+
scanSources: shouldScanTailwindV4Sources(majorVersion, generatorOptions.target, generatorRuntime, isolateCssSource),
|
|
4777
4796
|
styleOptions: generatorStyleOptions,
|
|
4778
4797
|
tailwindcssV3Compatibility: generatorOptions.tailwindcssV3Compatibility,
|
|
4779
4798
|
target: generatorOptions.target
|
|
@@ -4819,6 +4838,13 @@ async function generateCssByGenerator(options) {
|
|
|
4819
4838
|
const beforeUserCss = await transformGeneratorUserCss(orderedExtraCss.before, userCssOptions);
|
|
4820
4839
|
const afterUserCss = await transformGeneratorUserCss(orderedExtraCss.after, userCssOptions);
|
|
4821
4840
|
css = createCssSourceOrderAppend(createCssSourceOrderAppend(beforeUserCss, css), afterUserCss);
|
|
4841
|
+
if (isEmptyCssSourceOrderParts(orderedExtraCss) && shouldAppendWebBundleCssFallback(generated.target, {
|
|
4842
|
+
hasSourceDirectives,
|
|
4843
|
+
hasMatchedCssSourceFile
|
|
4844
|
+
})) {
|
|
4845
|
+
const userCss = await transformGeneratorUserCss(effectiveRawSource, userCssOptions);
|
|
4846
|
+
css = createCssSourceOrderAppend(css, userCss);
|
|
4847
|
+
}
|
|
4822
4848
|
if (generated.target === "weapp") {
|
|
4823
4849
|
css = await appendLegacyCompatCss(css, effectiveRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4824
4850
|
css = await appendLegacyContainerCompatCss(css, effectiveRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
@@ -4833,12 +4859,27 @@ async function generateCssByGenerator(options) {
|
|
|
4833
4859
|
debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
|
|
4834
4860
|
let css = stripTailwindBanner(generated.css);
|
|
4835
4861
|
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css, effectiveRawSource);
|
|
4836
|
-
if (hasMatchedCssSourceFile || generated.target === "web")
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4862
|
+
if (hasMatchedCssSourceFile || generated.target === "web") {
|
|
4863
|
+
if (shouldAppendWebBundleCssFallback(generated.target, {
|
|
4864
|
+
hasSourceDirectives,
|
|
4865
|
+
hasMatchedCssSourceFile
|
|
4866
|
+
})) {
|
|
4867
|
+
const userCss = await transformGeneratorUserCss(effectiveRawSource, {
|
|
4868
|
+
generatorTarget: generated.target,
|
|
4869
|
+
generatorStyleOptions,
|
|
4870
|
+
cssUserHandlerOptions,
|
|
4871
|
+
styleHandler,
|
|
4872
|
+
importFallback: generatorOptions.importFallback
|
|
4873
|
+
});
|
|
4874
|
+
css = createCssSourceOrderAppend(css, userCss);
|
|
4875
|
+
}
|
|
4876
|
+
return {
|
|
4877
|
+
css: finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight),
|
|
4878
|
+
target: generated.target,
|
|
4879
|
+
source: "generator",
|
|
4880
|
+
dependencies: generated.dependencies
|
|
4881
|
+
};
|
|
4882
|
+
}
|
|
4842
4883
|
css = await appendLegacyCompatCss(css, effectiveRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4843
4884
|
css = await appendLegacyContainerCompatCss(css, effectiveRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4844
4885
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_runtime_registry = require("./runtime-registry-
|
|
1
|
+
const require_runtime_registry = require("./runtime-registry-DpcR3IHI.js");
|
|
2
2
|
let node_buffer = require("node:buffer");
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_runtime_registry.__toESM(node_process);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
5
|
-
const require_precheck = require("./precheck-
|
|
6
|
-
const require_utils = require("./utils-
|
|
7
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
8
|
-
const require_bundle_state = require("./bundle-state-
|
|
1
|
+
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CHItlVq5.js");
|
|
3
|
+
const require_generator = require("./generator-CrU-Ghc1.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-DPQEzllt.js");
|
|
5
|
+
const require_precheck = require("./precheck-D7gJSmJz.js");
|
|
6
|
+
const require_utils = require("./utils-D7Ygohep.js");
|
|
7
|
+
const require_tailwindcss = require("./tailwindcss-B-e2RiXr.js");
|
|
8
|
+
const require_bundle_state = require("./bundle-state-Ct_8GcSR.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
node_fs = require_chunk.__toESM(node_fs);
|
|
11
11
|
let node_module = require("node:module");
|
|
@@ -272,6 +272,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
272
272
|
const { compiler, options: compilerOptions, appType, runtimeState, getRuntimeRefreshRequirement, refreshRuntimeMetadata, isWebpackProcessedCssAsset, consumeRuntimeRefreshRequirement, isWatchMode, runtimeClassSetManager, debug } = options;
|
|
273
273
|
const { Compilation, sources } = compiler.webpack;
|
|
274
274
|
const { ConcatSource } = sources;
|
|
275
|
+
const isWebGeneratorTarget = compilerOptions.generator?.target === "web";
|
|
275
276
|
const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
276
277
|
const cssUserHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
277
278
|
const bundleBuildState = require_bundle_state.createBundleBuildState();
|
|
@@ -395,7 +396,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
395
396
|
const defaultTemplateHandlerOptions = { runtimeSet };
|
|
396
397
|
debug("get runtimeSet, class count: %d", runtimeSet.size);
|
|
397
398
|
const tasks = [];
|
|
398
|
-
if (Array.isArray(groupedEntries.html)) for (const element of groupedEntries.html) {
|
|
399
|
+
if (!isWebGeneratorTarget && Array.isArray(groupedEntries.html)) for (const element of groupedEntries.html) {
|
|
399
400
|
const [file, originalSource] = element;
|
|
400
401
|
const rawSource = originalSource.source().toString();
|
|
401
402
|
const cacheKey = file;
|
|
@@ -422,7 +423,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
422
423
|
}));
|
|
423
424
|
}
|
|
424
425
|
const jsTaskFactories = [];
|
|
425
|
-
if (Array.isArray(groupedEntries.js)) for (const [file] of groupedEntries.js) {
|
|
426
|
+
if (!isWebGeneratorTarget && Array.isArray(groupedEntries.js)) for (const [file] of groupedEntries.js) {
|
|
426
427
|
const cacheKey = getCacheKey(file);
|
|
427
428
|
const asset = compilation.getAsset(file);
|
|
428
429
|
if (!asset) continue;
|
|
@@ -665,14 +666,15 @@ function setupWebpackV5Loaders(options) {
|
|
|
665
666
|
}
|
|
666
667
|
//#endregion
|
|
667
668
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
|
|
669
|
+
require_precheck.init_defineProperty();
|
|
668
670
|
const debug = require_v3_engine.createDebug();
|
|
669
671
|
const weappTailwindcssPackageDir = require_bundle_state.resolvePackageDir("weapp-tailwindcss");
|
|
670
672
|
/**
|
|
671
|
-
* @name
|
|
673
|
+
* @name WeappTailwindcss
|
|
672
674
|
* @description webpack5 核心转义插件
|
|
673
675
|
* @link https://tw.icebreaker.top/docs/intro
|
|
674
676
|
*/
|
|
675
|
-
var
|
|
677
|
+
var WeappTailwindcss = class {
|
|
676
678
|
constructor(options = {}) {
|
|
677
679
|
require_precheck._defineProperty(this, "options", void 0);
|
|
678
680
|
require_precheck._defineProperty(this, "appType", void 0);
|
|
@@ -835,10 +837,10 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
835
837
|
}
|
|
836
838
|
};
|
|
837
839
|
//#endregion
|
|
838
|
-
Object.defineProperty(exports, "
|
|
840
|
+
Object.defineProperty(exports, "WeappTailwindcss", {
|
|
839
841
|
enumerable: true,
|
|
840
842
|
get: function() {
|
|
841
|
-
return
|
|
843
|
+
return WeappTailwindcss;
|
|
842
844
|
}
|
|
843
845
|
});
|
|
844
846
|
Object.defineProperty(exports, "weappTailwindcssPackageDir", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import {
|
|
5
|
-
import { r as getGroupedEntries } from "./utils-
|
|
6
|
-
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
7
|
-
import { _ as stripRequestQuery, b as toAbsoluteOutputPath, d as resolvePluginDisabledState, g as isSourceStyleRequest, l as stripBundlerGeneratedCssMarkers, n as createBundleBuildState, o as pushConcurrentTaskFactories, r as updateBundleBuildState, t as buildBundleSnapshot, u as resolvePackageDir, y as resolveOutputSpecifier } from "./bundle-state-
|
|
1
|
+
import { b as ensureRuntimeClassSet, d as _defineProperty, f as init_defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, x as refreshTailwindRuntimeState, y as createTailwindRuntimeReadyPromise } from "./precheck-D7K12zeX.mjs";
|
|
2
|
+
import { B as createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-DcvCCHfs.mjs";
|
|
3
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-Qw-tZ0Z2.mjs";
|
|
4
|
+
import { i as generateCssByGenerator, o as processCachedTask, r as emitHmrTiming, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-CYkXVVCL.mjs";
|
|
5
|
+
import { r as getGroupedEntries } from "./utils-DsaS975I.mjs";
|
|
6
|
+
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-C7dJHZ0G.mjs";
|
|
7
|
+
import { _ as stripRequestQuery, b as toAbsoluteOutputPath, d as resolvePluginDisabledState, g as isSourceStyleRequest, l as stripBundlerGeneratedCssMarkers, n as createBundleBuildState, o as pushConcurrentTaskFactories, r as updateBundleBuildState, t as buildBundleSnapshot, u as resolvePackageDir, y as resolveOutputSpecifier } from "./bundle-state-Bi-cQua6.mjs";
|
|
8
8
|
import Module, { createRequire } from "node:module";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
@@ -268,6 +268,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
268
268
|
const { compiler, options: compilerOptions, appType, runtimeState, getRuntimeRefreshRequirement, refreshRuntimeMetadata, isWebpackProcessedCssAsset, consumeRuntimeRefreshRequirement, isWatchMode, runtimeClassSetManager, debug } = options;
|
|
269
269
|
const { Compilation, sources } = compiler.webpack;
|
|
270
270
|
const { ConcatSource } = sources;
|
|
271
|
+
const isWebGeneratorTarget = compilerOptions.generator?.target === "web";
|
|
271
272
|
const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
272
273
|
const cssUserHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
273
274
|
const bundleBuildState = createBundleBuildState();
|
|
@@ -391,7 +392,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
391
392
|
const defaultTemplateHandlerOptions = { runtimeSet };
|
|
392
393
|
debug("get runtimeSet, class count: %d", runtimeSet.size);
|
|
393
394
|
const tasks = [];
|
|
394
|
-
if (Array.isArray(groupedEntries.html)) for (const element of groupedEntries.html) {
|
|
395
|
+
if (!isWebGeneratorTarget && Array.isArray(groupedEntries.html)) for (const element of groupedEntries.html) {
|
|
395
396
|
const [file, originalSource] = element;
|
|
396
397
|
const rawSource = originalSource.source().toString();
|
|
397
398
|
const cacheKey = file;
|
|
@@ -418,7 +419,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
418
419
|
}));
|
|
419
420
|
}
|
|
420
421
|
const jsTaskFactories = [];
|
|
421
|
-
if (Array.isArray(groupedEntries.js)) for (const [file] of groupedEntries.js) {
|
|
422
|
+
if (!isWebGeneratorTarget && Array.isArray(groupedEntries.js)) for (const [file] of groupedEntries.js) {
|
|
422
423
|
const cacheKey = getCacheKey(file);
|
|
423
424
|
const asset = compilation.getAsset(file);
|
|
424
425
|
if (!asset) continue;
|
|
@@ -533,7 +534,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
533
534
|
});
|
|
534
535
|
}
|
|
535
536
|
//#endregion
|
|
536
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
537
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.1_oxc-resolver@11.19.1_@emnapi+core@1.10.0_@emnapi+runtime@1.10.0__tsx@4.22_e88dc79be62bec44963bb28b0067a399/node_modules/tsdown/esm-shims.js
|
|
537
538
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
538
539
|
const getDirname = () => path.dirname(getFilename());
|
|
539
540
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -666,14 +667,15 @@ function setupWebpackV5Loaders(options) {
|
|
|
666
667
|
}
|
|
667
668
|
//#endregion
|
|
668
669
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
|
|
670
|
+
init_defineProperty();
|
|
669
671
|
const debug = createDebug();
|
|
670
672
|
const weappTailwindcssPackageDir = resolvePackageDir("weapp-tailwindcss");
|
|
671
673
|
/**
|
|
672
|
-
* @name
|
|
674
|
+
* @name WeappTailwindcss
|
|
673
675
|
* @description webpack5 核心转义插件
|
|
674
676
|
* @link https://tw.icebreaker.top/docs/intro
|
|
675
677
|
*/
|
|
676
|
-
var
|
|
678
|
+
var WeappTailwindcss = class {
|
|
677
679
|
constructor(options = {}) {
|
|
678
680
|
_defineProperty(this, "options", void 0);
|
|
679
681
|
_defineProperty(this, "appType", void 0);
|
|
@@ -836,4 +838,4 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
836
838
|
}
|
|
837
839
|
};
|
|
838
840
|
//#endregion
|
|
839
|
-
export { weappTailwindcssPackageDir as n,
|
|
841
|
+
export { weappTailwindcssPackageDir as n, WeappTailwindcss as t };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { UnifiedWebpackPluginV5 as WeappTailwindcss } from './bundlers/webpack/index';
|
|
3
|
-
export { UnifiedWebpackPluginV5 as weappTailwindcss } from './bundlers/webpack/index';
|
|
1
|
+
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir, } from './bundlers/webpack/index';
|
|
4
2
|
export type { UserDefinedOptions } from './types';
|
package/dist/webpack.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.weappTailwindcss = require_webpack.UnifiedWebpackPluginV5;
|
|
2
|
+
const require_webpack = require("./webpack-BguN8tQa.js");
|
|
3
|
+
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
|
+
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
6
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as
|
|
2
|
-
export {
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-ejGMOruE.mjs";
|
|
2
|
+
export { WeappTailwindcss, WeappTailwindcss 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.28",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -172,27 +172,27 @@
|
|
|
172
172
|
"@babel/parser": "~7.29.7",
|
|
173
173
|
"@babel/traverse": "~7.29.7",
|
|
174
174
|
"@babel/types": "~7.29.7",
|
|
175
|
-
"@vue/compiler-dom": "^3.5.35",
|
|
176
|
-
"@vue/compiler-sfc": "^3.5.35",
|
|
177
175
|
"@weapp-core/escape": "~8.0.0",
|
|
178
176
|
"comment-json": "^5.0.0",
|
|
179
177
|
"debug": "~4.4.3",
|
|
180
178
|
"fast-glob": "^3.3.3",
|
|
181
179
|
"local-pkg": "^1.2.1",
|
|
182
|
-
"lru-cache": "11.5.
|
|
180
|
+
"lru-cache": "11.5.1",
|
|
183
181
|
"magic-string": "0.30.21",
|
|
184
182
|
"micromatch": "^4.0.8",
|
|
185
183
|
"postcss-load-config": "^6.0.1",
|
|
186
184
|
"semver": "~7.8.1",
|
|
187
185
|
"tailwindcss-patch": "9.3.7",
|
|
188
186
|
"yaml": "^2.9.0",
|
|
187
|
+
"@weapp-tailwindcss/logger": "2.0.0-next.0",
|
|
189
188
|
"@weapp-tailwindcss/postcss": "3.0.0-next.8",
|
|
190
189
|
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
191
|
-
"
|
|
192
|
-
"@weapp-tailwindcss/shared": "2.0.0-next.0"
|
|
193
|
-
"tailwindcss-config": "2.0.0-next.2"
|
|
190
|
+
"tailwindcss-config": "2.0.0-next.2",
|
|
191
|
+
"@weapp-tailwindcss/shared": "2.0.0-next.0"
|
|
194
192
|
},
|
|
195
193
|
"devDependencies": {
|
|
194
|
+
"@vue/compiler-dom": "^3.5.35",
|
|
195
|
+
"@vue/compiler-sfc": "^3.5.35",
|
|
196
196
|
"htmlparser2": "12.0.0"
|
|
197
197
|
},
|
|
198
198
|
"scripts": {
|