weapp-tailwindcss 5.0.0-next.26 → 5.0.0-next.27
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-DP-qtQzE.js} +2 -2
- package/dist/{auto-CsWz6lsU.mjs → auto-XyKTOP7B.mjs} +1 -1
- package/dist/{bundle-state-CWcrb3mH.mjs → bundle-state-7DRnJcJp.mjs} +1 -1
- package/dist/{bundle-state-uCtqRm0p.js → bundle-state-Nn90UQDa.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/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-C5w9OOrj.js} +1 -2
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-iI_265gt.mjs → generator-CbpjNxJh.mjs} +1 -1
- package/dist/{generator-BH6a0xuB.js → generator-DRNbzjx5.js} +2 -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-mY0v1k-Y.js → incremental-runtime-class-set-BQPhkSov.js} +48 -14
- package/dist/{incremental-runtime-class-set-ECHyKwUL.mjs → incremental-runtime-class-set-C4JgSgRY.mjs} +48 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/dist/index.mjs +5 -5
- package/dist/{postcss-DEEAZ8J5.js → postcss-Br1eOaFd.js} +3 -3
- package/dist/{postcss-DJoU--Z-.mjs → postcss-YetooK6S.mjs} +2 -2
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-DLJg0_pu.js → precheck-B6xigu7s.js} +12 -13
- package/dist/{precheck-BI8oBeUg.mjs → precheck-uG16Cqaj.mjs} +11 -12
- 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-DeK5b9i9.js} +50 -8
- package/dist/{tailwindcss-DFa5Yes8.mjs → tailwindcss-C7dJHZ0G.mjs} +2 -2
- package/dist/{tailwindcss-Cm93idme.js → tailwindcss-DEEtJf4u.js} +3 -3
- package/dist/{utils-CSA174-I.js → utils-nta4tfFs.js} +1 -1
- package/dist/{v3-engine-CGsbY81C.js → v3-engine-B_33V3Lu.js} +12 -4
- package/dist/{v3-engine-CPJ9uGyr.mjs → v3-engine-DcvCCHfs.mjs} +11 -3
- package/dist/{vite-BM_ksf1q.js → vite-Bg18XZZc.js} +38 -10
- package/dist/{vite-CqEF-Wx5.mjs → vite-DOmiMftw.mjs} +37 -9
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +46 -12
- package/dist/weapp-tw-runtime-classset-loader.js +1 -1
- package/dist/{webpack-D--XZMBB.mjs → webpack-BdrjJf41.mjs} +14 -13
- package/dist/{webpack-CfcuDhQ8.js → webpack-BzPDhzSz.js} +15 -14
- package/dist/webpack.d.ts +1 -3
- package/dist/webpack.js +3 -4
- package/dist/webpack.mjs +2 -2
- package/package.json +4 -4
- /package/dist/{chunk-8l464Juk.js → chunk-D6vf50IK.js} +0 -0
- /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
|
@@ -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);
|
|
@@ -4615,6 +4615,16 @@ function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtime, options) {
|
|
|
4615
4615
|
function shouldIsolateMatchedCssSource(source, sourceEntries) {
|
|
4616
4616
|
return Boolean(source.__weappTailwindcssMeta?.matchedCssSourceFile && sourceEntries !== void 0);
|
|
4617
4617
|
}
|
|
4618
|
+
function shouldScanTailwindV4Sources(majorVersion, target, generatorRuntime, isolateCssSource) {
|
|
4619
|
+
if (majorVersion !== 4 || isolateCssSource) return false;
|
|
4620
|
+
return target === "web" || generatorRuntime.size === 0;
|
|
4621
|
+
}
|
|
4622
|
+
function shouldAppendWebBundleCssFallback(target, options) {
|
|
4623
|
+
return target === "web" && !options.hasMatchedCssSourceFile && !options.hasSourceDirectives;
|
|
4624
|
+
}
|
|
4625
|
+
function isEmptyCssSourceOrderParts(parts) {
|
|
4626
|
+
return parts.before.trim().length === 0 && parts.after.trim().length === 0;
|
|
4627
|
+
}
|
|
4618
4628
|
function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOptions) {
|
|
4619
4629
|
const preflightStyleOptions = {
|
|
4620
4630
|
cssPreflight: opts.cssPreflight,
|
|
@@ -4754,9 +4764,11 @@ async function generateCssByGenerator(options) {
|
|
|
4754
4764
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || !shouldGenerateCurrentCss || majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers) return;
|
|
4755
4765
|
try {
|
|
4756
4766
|
await runtimeState.readyPromise;
|
|
4767
|
+
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(effectiveRawSource, "css") : [];
|
|
4768
|
+
const runtimeWithCurrentCss = currentCssCandidates.length > 0 ? new Set([...runtime, ...currentCssCandidates]) : runtime;
|
|
4757
4769
|
const sources = await resolveGeneratorSources(majorVersion, runtimeState, effectiveRawSource, file, cssHandlerOptions, generatorOptions, {
|
|
4758
4770
|
getSourceCandidatesForEntries,
|
|
4759
|
-
runtime
|
|
4771
|
+
runtime: runtimeWithCurrentCss
|
|
4760
4772
|
});
|
|
4761
4773
|
const generatorStyleOptions = resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorOptions.styleOptions);
|
|
4762
4774
|
const configuredContainerCompat = hasConfiguredContainerCompatSources(sources);
|
|
@@ -4765,15 +4777,15 @@ async function generateCssByGenerator(options) {
|
|
|
4765
4777
|
const sourceEntries = getSourceCandidatesForEntries && majorVersion === 4 ? await resolveGeneratorSourceEntries(source, runtimeState) : void 0;
|
|
4766
4778
|
const scopedRuntime = sourceEntries ? getSourceCandidatesForEntries?.(sourceEntries) : void 0;
|
|
4767
4779
|
const isolateCssSource = shouldIsolateMatchedCssSource(source, sourceEntries);
|
|
4768
|
-
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? mergeScopedRuntimeWithCurrentRuntime(scopedRuntime,
|
|
4780
|
+
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtimeWithCurrentCss, {
|
|
4769
4781
|
cssHandlerOptions,
|
|
4770
4782
|
isolateCssSource
|
|
4771
|
-
}) :
|
|
4783
|
+
}) : runtimeWithCurrentCss;
|
|
4772
4784
|
const generatorRuntime = majorVersion === 4 && generatorOptions.target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(sourceRuntime) : sourceRuntime;
|
|
4773
4785
|
return generator.generate({
|
|
4774
4786
|
candidates: generatorRuntime,
|
|
4775
4787
|
incrementalCache: majorVersion === 3 || majorVersion === 4,
|
|
4776
|
-
scanSources: majorVersion
|
|
4788
|
+
scanSources: shouldScanTailwindV4Sources(majorVersion, generatorOptions.target, generatorRuntime, isolateCssSource),
|
|
4777
4789
|
styleOptions: generatorStyleOptions,
|
|
4778
4790
|
tailwindcssV3Compatibility: generatorOptions.tailwindcssV3Compatibility,
|
|
4779
4791
|
target: generatorOptions.target
|
|
@@ -4819,6 +4831,13 @@ async function generateCssByGenerator(options) {
|
|
|
4819
4831
|
const beforeUserCss = await transformGeneratorUserCss(orderedExtraCss.before, userCssOptions);
|
|
4820
4832
|
const afterUserCss = await transformGeneratorUserCss(orderedExtraCss.after, userCssOptions);
|
|
4821
4833
|
css = createCssSourceOrderAppend(createCssSourceOrderAppend(beforeUserCss, css), afterUserCss);
|
|
4834
|
+
if (isEmptyCssSourceOrderParts(orderedExtraCss) && shouldAppendWebBundleCssFallback(generated.target, {
|
|
4835
|
+
hasSourceDirectives,
|
|
4836
|
+
hasMatchedCssSourceFile
|
|
4837
|
+
})) {
|
|
4838
|
+
const userCss = await transformGeneratorUserCss(effectiveRawSource, userCssOptions);
|
|
4839
|
+
css = createCssSourceOrderAppend(css, userCss);
|
|
4840
|
+
}
|
|
4822
4841
|
if (generated.target === "weapp") {
|
|
4823
4842
|
css = await appendLegacyCompatCss(css, effectiveRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4824
4843
|
css = await appendLegacyContainerCompatCss(css, effectiveRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
@@ -4833,12 +4852,27 @@ async function generateCssByGenerator(options) {
|
|
|
4833
4852
|
debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
|
|
4834
4853
|
let css = stripTailwindBanner(generated.css);
|
|
4835
4854
|
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css, effectiveRawSource);
|
|
4836
|
-
if (hasMatchedCssSourceFile || generated.target === "web")
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4855
|
+
if (hasMatchedCssSourceFile || generated.target === "web") {
|
|
4856
|
+
if (shouldAppendWebBundleCssFallback(generated.target, {
|
|
4857
|
+
hasSourceDirectives,
|
|
4858
|
+
hasMatchedCssSourceFile
|
|
4859
|
+
})) {
|
|
4860
|
+
const userCss = await transformGeneratorUserCss(effectiveRawSource, {
|
|
4861
|
+
generatorTarget: generated.target,
|
|
4862
|
+
generatorStyleOptions,
|
|
4863
|
+
cssUserHandlerOptions,
|
|
4864
|
+
styleHandler,
|
|
4865
|
+
importFallback: generatorOptions.importFallback
|
|
4866
|
+
});
|
|
4867
|
+
css = createCssSourceOrderAppend(css, userCss);
|
|
4868
|
+
}
|
|
4869
|
+
return {
|
|
4870
|
+
css: finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight),
|
|
4871
|
+
target: generated.target,
|
|
4872
|
+
source: "generator",
|
|
4873
|
+
dependencies: generated.dependencies
|
|
4874
|
+
};
|
|
4875
|
+
}
|
|
4842
4876
|
css = await appendLegacyCompatCss(css, effectiveRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4843
4877
|
css = await appendLegacyContainerCompatCss(css, effectiveRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
4844
4878
|
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,10 +1,10 @@
|
|
|
1
|
-
import { B as createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-
|
|
3
|
-
import { i as generateCssByGenerator, o as processCachedTask, r as emitHmrTiming, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
4
|
-
import { b as refreshTailwindRuntimeState, d as _defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-
|
|
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 createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-DcvCCHfs.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-CbpjNxJh.mjs";
|
|
3
|
+
import { i as generateCssByGenerator, o as processCachedTask, r as emitHmrTiming, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-C4JgSgRY.mjs";
|
|
4
|
+
import { b as refreshTailwindRuntimeState, d as _defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-uG16Cqaj.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-7DRnJcJp.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();
|
|
@@ -669,11 +670,11 @@ function setupWebpackV5Loaders(options) {
|
|
|
669
670
|
const debug = createDebug();
|
|
670
671
|
const weappTailwindcssPackageDir = resolvePackageDir("weapp-tailwindcss");
|
|
671
672
|
/**
|
|
672
|
-
* @name
|
|
673
|
+
* @name WeappTailwindcss
|
|
673
674
|
* @description webpack5 核心转义插件
|
|
674
675
|
* @link https://tw.icebreaker.top/docs/intro
|
|
675
676
|
*/
|
|
676
|
-
var
|
|
677
|
+
var WeappTailwindcss = class {
|
|
677
678
|
constructor(options = {}) {
|
|
678
679
|
_defineProperty(this, "options", void 0);
|
|
679
680
|
_defineProperty(this, "appType", void 0);
|
|
@@ -836,4 +837,4 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
836
837
|
}
|
|
837
838
|
};
|
|
838
839
|
//#endregion
|
|
839
|
-
export { weappTailwindcssPackageDir as n,
|
|
840
|
+
export { weappTailwindcssPackageDir as n, WeappTailwindcss as t };
|
|
@@ -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-D6vf50IK.js");
|
|
2
|
+
const require_v3_engine = require("./v3-engine-B_33V3Lu.js");
|
|
3
|
+
const require_generator = require("./generator-DRNbzjx5.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-BQPhkSov.js");
|
|
5
|
+
const require_precheck = require("./precheck-B6xigu7s.js");
|
|
6
|
+
const require_utils = require("./utils-nta4tfFs.js");
|
|
7
|
+
const require_tailwindcss = require("./tailwindcss-DEEtJf4u.js");
|
|
8
|
+
const require_bundle_state = require("./bundle-state-Nn90UQDa.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;
|
|
@@ -668,11 +669,11 @@ function setupWebpackV5Loaders(options) {
|
|
|
668
669
|
const debug = require_v3_engine.createDebug();
|
|
669
670
|
const weappTailwindcssPackageDir = require_bundle_state.resolvePackageDir("weapp-tailwindcss");
|
|
670
671
|
/**
|
|
671
|
-
* @name
|
|
672
|
+
* @name WeappTailwindcss
|
|
672
673
|
* @description webpack5 核心转义插件
|
|
673
674
|
* @link https://tw.icebreaker.top/docs/intro
|
|
674
675
|
*/
|
|
675
|
-
var
|
|
676
|
+
var WeappTailwindcss = class {
|
|
676
677
|
constructor(options = {}) {
|
|
677
678
|
require_precheck._defineProperty(this, "options", void 0);
|
|
678
679
|
require_precheck._defineProperty(this, "appType", void 0);
|
|
@@ -835,10 +836,10 @@ var UnifiedWebpackPluginV5 = class {
|
|
|
835
836
|
}
|
|
836
837
|
};
|
|
837
838
|
//#endregion
|
|
838
|
-
Object.defineProperty(exports, "
|
|
839
|
+
Object.defineProperty(exports, "WeappTailwindcss", {
|
|
839
840
|
enumerable: true,
|
|
840
841
|
get: function() {
|
|
841
|
-
return
|
|
842
|
+
return WeappTailwindcss;
|
|
842
843
|
}
|
|
843
844
|
});
|
|
844
845
|
Object.defineProperty(exports, "weappTailwindcssPackageDir", {
|
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-BzPDhzSz.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-BdrjJf41.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.27",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -179,16 +179,16 @@
|
|
|
179
179
|
"debug": "~4.4.3",
|
|
180
180
|
"fast-glob": "^3.3.3",
|
|
181
181
|
"local-pkg": "^1.2.1",
|
|
182
|
-
"lru-cache": "11.5.
|
|
182
|
+
"lru-cache": "11.5.1",
|
|
183
183
|
"magic-string": "0.30.21",
|
|
184
184
|
"micromatch": "^4.0.8",
|
|
185
185
|
"postcss-load-config": "^6.0.1",
|
|
186
186
|
"semver": "~7.8.1",
|
|
187
187
|
"tailwindcss-patch": "9.3.7",
|
|
188
188
|
"yaml": "^2.9.0",
|
|
189
|
-
"@weapp-tailwindcss/postcss": "3.0.0-next.8",
|
|
190
|
-
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
191
189
|
"@weapp-tailwindcss/logger": "2.0.0-next.0",
|
|
190
|
+
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
191
|
+
"@weapp-tailwindcss/postcss": "3.0.0-next.8",
|
|
192
192
|
"@weapp-tailwindcss/shared": "2.0.0-next.0",
|
|
193
193
|
"tailwindcss-config": "2.0.0-next.2"
|
|
194
194
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|