weapp-tailwindcss 4.9.2-alpha.2 → 4.9.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/{chunk-W4XFWZB5.js → chunk-3UOPODB3.js} +44 -44
- package/dist/{chunk-JOLM54PI.mjs → chunk-4HESZS5A.mjs} +2 -2
- package/dist/{chunk-5O6237HX.js → chunk-4RUFPPI6.js} +400 -377
- package/dist/{chunk-ZE7JKKFT.mjs → chunk-7D27E7TU.mjs} +438 -415
- package/dist/{chunk-KA2JONAP.js → chunk-A2BRI46M.js} +5 -5
- package/dist/{chunk-3SKEY32E.mjs → chunk-F2CKKG6Q.mjs} +67 -67
- package/dist/{chunk-YBTRKOE2.js → chunk-I3IRT5VH.js} +7 -7
- package/dist/chunk-IMOEZLDR.js +441 -0
- package/dist/{chunk-OU2OBBPZ.mjs → chunk-IW3B6ZJD.mjs} +646 -565
- package/dist/{chunk-NGRAUBWU.js → chunk-KXZ4MP4L.js} +277 -236
- package/dist/chunk-PU5CC4ZI.mjs +444 -0
- package/dist/{chunk-FFGR5V3H.mjs → chunk-SPH6SCTM.mjs} +1 -1
- package/dist/{chunk-J7KULRTR.js → chunk-VOD2WUH6.js} +635 -554
- package/dist/{chunk-2WPTDMN3.js → chunk-VPHA77FH.js} +61 -61
- package/dist/{chunk-QA5NZSGN.mjs → chunk-WH65CIYG.mjs} +41 -41
- package/dist/{chunk-UAEME5HT.js → chunk-Y6F6NBA7.js} +1 -1
- package/dist/{chunk-6HBFEXOW.mjs → chunk-Z2D5NSG5.mjs} +265 -224
- package/dist/{chunk-XWGIWOHV.mjs → chunk-ZL22KEHH.mjs} +2 -2
- package/dist/cli.js +182 -136
- package/dist/cli.mjs +194 -148
- package/dist/core.js +10 -10
- package/dist/core.mjs +4 -4
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/index.js +10 -10
- package/dist/index.mjs +9 -9
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss-html-transform.mjs +1 -1
- package/dist/presets.js +5 -5
- package/dist/presets.mjs +2 -2
- package/dist/reset.d.mts +2 -1
- package/dist/reset.d.ts +2 -1
- package/dist/reset.js +25 -21
- package/dist/reset.mjs +25 -21
- package/dist/types.d.mts +503 -474
- package/dist/types.d.ts +503 -474
- package/dist/types.js +1 -1
- package/dist/types.mjs +1 -1
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +6 -6
- package/dist/weapp-tw-css-import-rewrite-loader.js +2 -4
- package/dist/webpack.js +8 -8
- package/dist/webpack.mjs +7 -7
- package/dist/webpack4.js +351 -307
- package/dist/webpack4.mjs +341 -297
- package/package.json +11 -11
- package/dist/chunk-CF7VDUIE.mjs +0 -397
- package/dist/chunk-OGG7WXHZ.js +0 -394
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVOD2WUH6js = require('./chunk-VOD2WUH6.js');
|
|
7
7
|
|
|
8
8
|
// src/shared/mpx.ts
|
|
9
9
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -144,7 +144,7 @@ function rewriteTailwindcssRequestForCss(data, pkgDir, appType) {
|
|
|
144
144
|
if (!CSS_EXT_RE.test(normalizedIssuer)) {
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
const resolved =
|
|
147
|
+
const resolved = _chunkVPHA77FHjs.resolveTailwindcssImport.call(void 0, request, pkgDir, { appType });
|
|
148
148
|
if (!resolved) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
@@ -154,50 +154,13 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
|
|
|
154
154
|
if (!options.enabled) {
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
compiler.hooks.normalModuleFactory.tap(
|
|
158
|
-
factory.hooks.beforeResolve.tap(
|
|
157
|
+
compiler.hooks.normalModuleFactory.tap(_chunkVOD2WUH6js.pluginName, (factory) => {
|
|
158
|
+
factory.hooks.beforeResolve.tap(_chunkVOD2WUH6js.pluginName, (data) => {
|
|
159
159
|
rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
// src/bundlers/webpack/shared/loader-anchors.ts
|
|
165
|
-
var MPX_STRIP_CONDITIONAL_LOADER = "@mpxjs/webpack-plugin/lib/style-compiler/strip-conditional-loader";
|
|
166
|
-
var MPX_STYLE_COMPILER_LOADER = "@mpxjs/webpack-plugin/lib/style-compiler/index";
|
|
167
|
-
var MPX_REWRITE_PRECEDENCE_LOADERS = [
|
|
168
|
-
MPX_STYLE_COMPILER_LOADER,
|
|
169
|
-
MPX_STRIP_CONDITIONAL_LOADER
|
|
170
|
-
];
|
|
171
|
-
function createFinder(targets) {
|
|
172
|
-
return (entries) => entries.findIndex(
|
|
173
|
-
(entry) => targets.some((target) => _optionalChain([entry, 'optionalAccess', _5 => _5.loader, 'optionalAccess', _6 => _6.includes, 'optionalCall', _7 => _7(target)]))
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
function createPrioritizedFinder(targets) {
|
|
177
|
-
return (entries) => {
|
|
178
|
-
for (const target of targets) {
|
|
179
|
-
const idx = entries.findIndex((entry) => _optionalChain([entry, 'optionalAccess', _8 => _8.loader, 'optionalAccess', _9 => _9.includes, 'optionalCall', _10 => _10(target)]));
|
|
180
|
-
if (idx !== -1) {
|
|
181
|
-
return idx;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return -1;
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
function createLoaderAnchorFinders(appType) {
|
|
188
|
-
if (isMpx(appType)) {
|
|
189
|
-
return {
|
|
190
|
-
findRewriteAnchor: createPrioritizedFinder(MPX_REWRITE_PRECEDENCE_LOADERS),
|
|
191
|
-
findClassSetAnchor: createFinder([MPX_STYLE_COMPILER_LOADER])
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
const fallbackFinder = createFinder(["postcss-loader"]);
|
|
195
|
-
return {
|
|
196
|
-
findRewriteAnchor: fallbackFinder,
|
|
197
|
-
findClassSetAnchor: fallbackFinder
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
164
|
// src/bundlers/webpack/BaseUnifiedPlugin/shared.ts
|
|
202
165
|
var MPX_STYLE_RESOURCE_QUERY_RE2 = /(?:\?|&)type=styles\b/;
|
|
203
166
|
function getCacheKey(filename) {
|
|
@@ -234,7 +197,44 @@ function hasLoaderEntry(entries, target) {
|
|
|
234
197
|
if (!target) {
|
|
235
198
|
return false;
|
|
236
199
|
}
|
|
237
|
-
return entries.some((entry) => _optionalChain([entry, 'access',
|
|
200
|
+
return entries.some((entry) => _optionalChain([entry, 'access', _5 => _5.loader, 'optionalAccess', _6 => _6.includes, 'optionalCall', _7 => _7(target)]));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/bundlers/webpack/shared/loader-anchors.ts
|
|
204
|
+
var MPX_STRIP_CONDITIONAL_LOADER = "@mpxjs/webpack-plugin/lib/style-compiler/strip-conditional-loader";
|
|
205
|
+
var MPX_STYLE_COMPILER_LOADER = "@mpxjs/webpack-plugin/lib/style-compiler/index";
|
|
206
|
+
var MPX_REWRITE_PRECEDENCE_LOADERS = [
|
|
207
|
+
MPX_STYLE_COMPILER_LOADER,
|
|
208
|
+
MPX_STRIP_CONDITIONAL_LOADER
|
|
209
|
+
];
|
|
210
|
+
function createFinder(targets) {
|
|
211
|
+
return (entries) => entries.findIndex(
|
|
212
|
+
(entry) => targets.some((target) => _optionalChain([entry, 'optionalAccess', _8 => _8.loader, 'optionalAccess', _9 => _9.includes, 'optionalCall', _10 => _10(target)]))
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
function createPrioritizedFinder(targets) {
|
|
216
|
+
return (entries) => {
|
|
217
|
+
for (const target of targets) {
|
|
218
|
+
const idx = entries.findIndex((entry) => _optionalChain([entry, 'optionalAccess', _11 => _11.loader, 'optionalAccess', _12 => _12.includes, 'optionalCall', _13 => _13(target)]));
|
|
219
|
+
if (idx !== -1) {
|
|
220
|
+
return idx;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return -1;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function createLoaderAnchorFinders(appType) {
|
|
227
|
+
if (isMpx(appType)) {
|
|
228
|
+
return {
|
|
229
|
+
findRewriteAnchor: createPrioritizedFinder(MPX_REWRITE_PRECEDENCE_LOADERS),
|
|
230
|
+
findClassSetAnchor: createFinder([MPX_STYLE_COMPILER_LOADER])
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const fallbackFinder = createFinder(["postcss-loader"]);
|
|
234
|
+
return {
|
|
235
|
+
findRewriteAnchor: fallbackFinder,
|
|
236
|
+
findClassSetAnchor: fallbackFinder
|
|
237
|
+
};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
|
|
@@ -248,4 +248,4 @@ function hasLoaderEntry(entries, target) {
|
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
|
|
251
|
-
exports.isMpx = isMpx; exports.ensureMpxTailwindcssAliases = ensureMpxTailwindcssAliases; exports.patchMpxLoaderResolve = patchMpxLoaderResolve; exports.setupMpxTailwindcssRedirect = setupMpxTailwindcssRedirect; exports.injectMpxCssRewritePreRules = injectMpxCssRewritePreRules; exports.applyTailwindcssCssImportRewrite = applyTailwindcssCssImportRewrite; exports.
|
|
251
|
+
exports.isMpx = isMpx; exports.ensureMpxTailwindcssAliases = ensureMpxTailwindcssAliases; exports.patchMpxLoaderResolve = patchMpxLoaderResolve; exports.setupMpxTailwindcssRedirect = setupMpxTailwindcssRedirect; exports.injectMpxCssRewritePreRules = injectMpxCssRewritePreRules; exports.applyTailwindcssCssImportRewrite = applyTailwindcssCssImportRewrite; exports.getCacheKey = getCacheKey; exports.isCssLikeModuleResource = isCssLikeModuleResource; exports.hasLoaderEntry = hasLoaderEntry; exports.createLoaderAnchorFinders = createLoaderAnchorFinders;
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-RRHPTTCP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
setupPatchRecorder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZL22KEHH.mjs";
|
|
7
7
|
import {
|
|
8
8
|
collectRuntimeClassSet,
|
|
9
9
|
createDebug,
|
|
10
10
|
getCompilerContext,
|
|
11
11
|
refreshTailwindRuntimeState
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IW3B6ZJD.mjs";
|
|
13
13
|
|
|
14
14
|
// src/bundlers/gulp/index.ts
|
|
15
15
|
import { Buffer } from "buffer";
|