weapp-tailwindcss 5.1.11 → 5.1.12
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/cache-options-DavPxrhC.js +16 -0
- package/dist/cache-options-DwBtLwQe.mjs +5 -0
- package/dist/cli.js +10 -6
- package/dist/cli.mjs +10 -6
- package/dist/context-DRRgW7i2.js +1311 -0
- package/dist/context-xSJE588m.mjs +1234 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/defaults.js +119 -5
- package/dist/defaults.mjs +114 -1
- package/dist/{generator-ROzBodj6.mjs → generator-BvPcmqxU.mjs} +9 -139
- package/dist/{generator-Bz94KTkH.js → generator-CS10c9g1.js} +18 -154
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/{gulp-BKqMb_Ds.mjs → gulp-BEOzXrbp.mjs} +5 -4
- package/dist/{gulp-DfOLvYLs.js → gulp-DNZZvUMq.js} +6 -5
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-DOTdH18A.js → hmr-timing-DW1g3zjl.js} +17 -15
- package/dist/{hmr-timing-DwtYJdwb.mjs → hmr-timing-hRhRAjYV.mjs} +5 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/object-BJSWl-E5.mjs +9 -0
- package/dist/object-COs_Mw6p.js +14 -0
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/presets.js +5 -5
- package/dist/presets.mjs +3 -3
- package/dist/rspack.js +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/{source-candidate-scan-signature-BrWuBTjY.js → source-candidate-scan-signature-CMgu5bJk.js} +6 -6
- package/dist/{source-candidate-scan-signature-CQ04hiox.mjs → source-candidate-scan-signature-t4XKAQ04.mjs} +3 -3
- package/dist/{tailwindcss-hzy_WaC9.mjs → tailwindcss-DZT_pWrd.mjs} +132 -2
- package/dist/{tailwindcss-Dn5DVlkI.js → tailwindcss-z9JMF-qU.js} +140 -10
- package/dist/{transform-DZQETx51.js → transform-COFRlmDF.js} +13 -13
- package/dist/{transform-BgnNYkIG.mjs → transform-D5JUgMpE.mjs} +1 -1
- package/dist/{utils-D3h8j7Mk.js → utils-CuKLf1Zv.js} +0 -15
- package/dist/{utils-DodxWHGz.mjs → utils-MVwpU07P.mjs} +1 -8
- package/dist/{vite-oI2ReOic.mjs → vite-DF1gE6a5.mjs} +35 -23
- package/dist/{vite-DODC15Fr.js → vite-VGfkFQkC.js} +50 -38
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +6 -2
- package/dist/{webpack-CCapGlNg.mjs → webpack-CTYm19zA.mjs} +22 -16
- package/dist/{webpack-XxBCIrBp.js → webpack-CzXjfvYS.js} +28 -22
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/{context-y2BGCok4.js → wxml-Ce10eREX.js} +37 -1286
- package/dist/{context-DzkSFEVL.mjs → wxml-DdGdeqaH.mjs} +13 -1235
- package/package.json +3 -3
- package/dist/defaults-9B6aMyZb.mjs +0 -118
- package/dist/defaults-nsf4VNMX.js +0 -154
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
2
|
+
const require_generator = require("./generator-CS10c9g1.js");
|
|
3
|
+
const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
|
|
4
|
+
const require_utils = require("./utils-CuKLf1Zv.js");
|
|
5
|
+
const require_wxml = require("./wxml-Ce10eREX.js");
|
|
6
|
+
const require_context = require("./context-DRRgW7i2.js");
|
|
7
|
+
const require_defaults = require("./defaults.js");
|
|
8
|
+
const require_hmr_timing = require("./hmr-timing-DW1g3zjl.js");
|
|
9
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-CMgu5bJk.js");
|
|
9
10
|
let node_fs = require("node:fs");
|
|
10
11
|
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
11
12
|
let node_path = require("node:path");
|
|
@@ -1758,7 +1759,8 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1758
1759
|
debug("html cache hit: %s", file);
|
|
1759
1760
|
},
|
|
1760
1761
|
transform: async () => {
|
|
1761
|
-
const
|
|
1762
|
+
const wxml = await compilerOptions.templateHandler(readRawSource(), defaultTemplateHandlerOptions);
|
|
1763
|
+
const source = new ConcatSource(wxml);
|
|
1762
1764
|
debug("html handle: %s", file);
|
|
1763
1765
|
return { result: source };
|
|
1764
1766
|
}
|
|
@@ -1897,7 +1899,8 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1897
1899
|
transform: async () => {
|
|
1898
1900
|
const source = readCurrentProcessedRawSource();
|
|
1899
1901
|
const processedBareSelectorSourceCss = processedSourceCss ?? (hasTailwindGeneratedAssetCss ? removeWebpackTailwindGeneratedAssetCss(source) : void 0);
|
|
1900
|
-
const
|
|
1902
|
+
const handledCss = hasTailwindGeneratedAssetCss && !hasGeneratedCssMarker ? isWebGeneratorTarget ? source : (await compilerOptions.styleHandler(source, cssHandlerOptionsForProcessedAsset)).css : source;
|
|
1903
|
+
const nextCss = stripTrailingLineWhitespace(finalizeCssAssetSource(handledCss, {
|
|
1901
1904
|
cssPreflight: cssHandlerOptionsForProcessedAsset.isMainChunk,
|
|
1902
1905
|
generatedCss: hasGeneratedCssMarker || hasTailwindGeneratedAssetCss
|
|
1903
1906
|
}));
|
|
@@ -2012,18 +2015,20 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2012
2015
|
const currentAssetMissingUserCss = !(currentAssetUserCssWithoutMarkers.trim().length > 0 && !require_generator.isCommentOnlyCss(currentAssetUserCssWithoutMarkers)) ? "" : (0, _weapp_tailwindcss_postcss.filterExistingCssRules)(currentAssetUserCssWithoutMarkers, loaderGeneratedCssWithoutMarkers);
|
|
2013
2016
|
if (isConfiguredMainCssSource && !cssHandlerOptions.isMainChunk) {
|
|
2014
2017
|
debug("css skip duplicate webpack loader main generation: %s <- %s", file, sourceFile);
|
|
2015
|
-
|
|
2018
|
+
const userCss = currentAssetMissingUserCss.trim().length === 0 || require_generator.isCommentOnlyCss(currentAssetMissingUserCss) ? "" : finalizeCssAssetSource(currentAssetMissingUserCss, {
|
|
2016
2019
|
cssPreflight: false,
|
|
2017
2020
|
generatedCss: false
|
|
2018
|
-
})
|
|
2021
|
+
});
|
|
2022
|
+
return { result: new ConcatSource(finalizeTracedCss(userCss, cssHandlerOptions)) };
|
|
2019
2023
|
}
|
|
2020
|
-
const
|
|
2024
|
+
const mergedLoaderCss = currentAssetUserCss === void 0 ? loaderGeneratedCss.css : createWebpackGeneratorUserCssSourceAppend({
|
|
2021
2025
|
css: currentAssetUserCss === void 0 ? loaderGeneratedCss.css : currentAssetHasProcessedUrl ? require_hmr_timing.removeGeneratedSelectorCompatCss(loaderGeneratedCss.css, currentAssetUserCss) : (0, _weapp_tailwindcss_postcss.filterExistingCssRules)(currentAssetUserCss, loaderGeneratedCss.css),
|
|
2022
2026
|
processed: true
|
|
2023
2027
|
}, currentAssetUserCss === void 0 ? void 0 : {
|
|
2024
2028
|
css: currentAssetUserCss,
|
|
2025
2029
|
processed: true
|
|
2026
|
-
}).css
|
|
2030
|
+
}).css;
|
|
2031
|
+
const finalizedLoaderCss = finalizeCssAssetSource(mergedLoaderCss, {
|
|
2027
2032
|
cssPreflight: cssHandlerOptions.isMainChunk,
|
|
2028
2033
|
generatedCss: true,
|
|
2029
2034
|
preserveExistingPreflight: shouldPreserveExistingPreflight
|
|
@@ -2180,13 +2185,14 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2180
2185
|
generatedCss: false
|
|
2181
2186
|
});
|
|
2182
2187
|
const missingSourceBareUserCss = finalizedSourceBareUserCss.trim().length === 0 ? "" : (0, _weapp_tailwindcss_postcss.filterExistingCssRules)(finalizedGeneratedCss, finalizedSourceBareUserCss);
|
|
2183
|
-
const
|
|
2188
|
+
const css = finalizeTracedCss(missingSourceBareUserCss.trim().length === 0 ? finalizedGeneratedCss : createWebpackGeneratorUserCssSourceAppend({
|
|
2184
2189
|
css: finalizedGeneratedCss,
|
|
2185
2190
|
processed: true
|
|
2186
2191
|
}, {
|
|
2187
2192
|
css: missingSourceBareUserCss,
|
|
2188
2193
|
processed: true
|
|
2189
|
-
}).css, cssHandlerOptions, { finalized: true })
|
|
2194
|
+
}).css, cssHandlerOptions, { finalized: true });
|
|
2195
|
+
const source = new ConcatSource(css);
|
|
2190
2196
|
if (generated) {
|
|
2191
2197
|
for (const className of generated.classSet) generatorRuntimeSet.add(className);
|
|
2192
2198
|
debug("css handle via tailwind v%s engine(%s): %s", runtimeState.tailwindRuntime.majorVersion, generated.target, file);
|
|
@@ -2584,7 +2590,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
2584
2590
|
}
|
|
2585
2591
|
//#endregion
|
|
2586
2592
|
//#region src/bundlers/webpack/shared/create-framework-plugin.ts
|
|
2587
|
-
const debug =
|
|
2593
|
+
const debug = require_wxml.createDebug();
|
|
2588
2594
|
const weappTailwindcssPackageDir = require_source_candidate_scan_signature.resolvePackageDir("weapp-tailwindcss");
|
|
2589
2595
|
const outputIgnoredPredicatePath = Symbol("weapp-tailwindcss.outputIgnoredPredicatePath");
|
|
2590
2596
|
function shouldKeepPreviousWebpackCssSource(previous, next) {
|
|
@@ -2654,10 +2660,10 @@ function isInternalUserDefinedOptions(options) {
|
|
|
2654
2660
|
}
|
|
2655
2661
|
var WebpackFrameworkPlugin = class {
|
|
2656
2662
|
constructor(options = {}, frameworkBranch) {
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2663
|
+
require_wxml._defineProperty(this, "options", void 0);
|
|
2664
|
+
require_wxml._defineProperty(this, "appType", void 0);
|
|
2665
|
+
require_wxml._defineProperty(this, "hasInitialTailwindCssRoots", void 0);
|
|
2666
|
+
require_wxml._defineProperty(this, "frameworkBranch", void 0);
|
|
2661
2667
|
this.frameworkBranch = frameworkBranch;
|
|
2662
2668
|
this.hasInitialTailwindCssRoots = require_generator.hasConfiguredTailwindV4CssRoots(options);
|
|
2663
2669
|
this.options = isInternalUserDefinedOptions(options) ? options : require_context.getCompilerContext({
|
|
@@ -2986,8 +2992,8 @@ function createWebpackFrameworkPlugin(frameworkName, options = {}) {
|
|
|
2986
2992
|
*/
|
|
2987
2993
|
var WeappTailwindcss = class {
|
|
2988
2994
|
constructor(options = {}) {
|
|
2989
|
-
|
|
2990
|
-
|
|
2995
|
+
require_wxml._defineProperty(this, "options", void 0);
|
|
2996
|
+
require_wxml._defineProperty(this, "appType", void 0);
|
|
2991
2997
|
this.options = require_context.getCompilerContext({
|
|
2992
2998
|
...options,
|
|
2993
2999
|
__internalDeferMissingCssEntriesWarning: true
|
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-CzXjfvYS.js");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-CTYm19zA.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|