weapp-tailwindcss 4.10.0-beta.2 → 4.10.0-beta.4
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-7ATL22KK.mjs → chunk-3A7VW4BZ.mjs} +3 -3
- package/dist/{chunk-EGOFMIDI.mjs → chunk-3WUHHFLF.mjs} +1 -0
- package/dist/{chunk-3RGU475C.js → chunk-5APD2MNV.js} +163 -77
- package/dist/{chunk-LBZCKOMT.js → chunk-5U24PLVV.js} +1 -0
- package/dist/{chunk-UCDOKKRH.js → chunk-BFZDZRA5.js} +28 -16
- package/dist/{chunk-QOWSZHYT.js → chunk-GQVBN7UT.js} +3 -3
- package/dist/{chunk-Q7TIBSU2.mjs → chunk-JP45MK3F.mjs} +1 -1
- package/dist/{chunk-AGF55OIE.mjs → chunk-KAK3XMAW.mjs} +2 -2
- package/dist/{chunk-GFJYJ6WV.js → chunk-OCV5QLZM.js} +27 -27
- package/dist/{chunk-D3I6GQUV.mjs → chunk-OYR4XWM4.mjs} +16 -4
- package/dist/{chunk-YS2V3XY2.js → chunk-PLI5CO4U.js} +50 -25
- package/dist/{chunk-7D27E7TU.mjs → chunk-QOTLDKI4.mjs} +131 -45
- package/dist/{chunk-2KAM7AAG.mjs → chunk-UELU5NFH.mjs} +33 -8
- package/dist/{chunk-F7FBGRWS.js → chunk-WQPYYMRL.js} +7 -7
- package/dist/{chunk-FIJF6OL7.mjs → chunk-XCKQ4YQM.mjs} +2 -2
- package/dist/{chunk-FLJBD5TW.js → chunk-Y6OZDS7V.js} +5 -5
- package/dist/cli.js +46 -46
- package/dist/cli.mjs +10 -10
- package/dist/core.d.mts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +9 -9
- package/dist/core.mjs +4 -4
- package/dist/defaults.d.mts +1 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +1 -1
- package/dist/gulp.d.mts +1 -1
- package/dist/gulp.d.ts +1 -1
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/{index-vGuAfNvT.d.mts → index-B6U7MoOM.d.mts} +13 -1
- package/dist/{index-vGuAfNvT.d.ts → index-B6U7MoOM.d.ts} +13 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/presets.d.mts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +8 -8
- package/dist/presets.mjs +5 -5
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +6 -6
- package/dist/vite.mjs +5 -5
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +7 -7
- package/dist/webpack.mjs +6 -6
- package/dist/webpack4.d.mts +1 -1
- package/dist/webpack4.d.ts +1 -1
- package/dist/webpack4.js +28 -28
- package/dist/webpack4.mjs +5 -5
- package/package.json +5 -5
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isMpx,
|
|
11
11
|
patchMpxLoaderResolve,
|
|
12
12
|
setupMpxTailwindcssRedirect
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JP45MK3F.mjs";
|
|
14
14
|
import {
|
|
15
15
|
pushConcurrentTaskFactories,
|
|
16
16
|
resolveDisabledOptions,
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
} from "./chunk-RRHPTTCP.mjs";
|
|
24
24
|
import {
|
|
25
25
|
setupPatchRecorder
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KAK3XMAW.mjs";
|
|
27
27
|
import {
|
|
28
28
|
createDebug,
|
|
29
29
|
ensureRuntimeClassSet,
|
|
30
30
|
getCompilerContext,
|
|
31
31
|
getRuntimeClassSetSignature,
|
|
32
32
|
pluginName
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OYR4XWM4.mjs";
|
|
34
34
|
import {
|
|
35
35
|
getGroupedEntries
|
|
36
36
|
} from "./chunk-OOHJLO5M.mjs";
|
|
@@ -82,10 +82,13 @@ function hasConfiguredCssEntries(ctx) {
|
|
|
82
82
|
}
|
|
83
83
|
const patcherOptions = ctx.tailwindcssPatcherOptions;
|
|
84
84
|
if (patcherOptions) {
|
|
85
|
-
if (normalizeCssEntriesConfig(_optionalChain([patcherOptions, 'access', _4 => _4.
|
|
85
|
+
if (normalizeCssEntriesConfig(_optionalChain([patcherOptions, 'access', _4 => _4.tailwindcss, 'optionalAccess', _5 => _5.v4, 'optionalAccess', _6 => _6.cssEntries]))) {
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
|
-
if (normalizeCssEntriesConfig(_optionalChain([patcherOptions, 'access', _7 => _7.
|
|
88
|
+
if (normalizeCssEntriesConfig(_optionalChain([patcherOptions, 'access', _7 => _7.tailwind, 'optionalAccess', _8 => _8.v4, 'optionalAccess', _9 => _9.cssEntries]))) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
if (normalizeCssEntriesConfig(_optionalChain([patcherOptions, 'access', _10 => _10.patch, 'optionalAccess', _11 => _11.tailwindcss, 'optionalAccess', _12 => _12.v4, 'optionalAccess', _13 => _13.cssEntries]))) {
|
|
89
92
|
return true;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -96,7 +99,7 @@ function warnMissingCssEntries(ctx, patcher) {
|
|
|
96
99
|
if (hasWarnedMissingCssEntries) {
|
|
97
100
|
return;
|
|
98
101
|
}
|
|
99
|
-
if (_optionalChain([patcher, 'optionalAccess',
|
|
102
|
+
if (_optionalChain([patcher, 'optionalAccess', _14 => _14.majorVersion]) !== 4) {
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
102
105
|
if (hasConfiguredCssEntries(ctx)) {
|
|
@@ -108,8 +111,8 @@ function warnMissingCssEntries(ctx, patcher) {
|
|
|
108
111
|
);
|
|
109
112
|
}
|
|
110
113
|
function applyV4CssCalcDefaults(cssCalc, patcher) {
|
|
111
|
-
const cssCalcOptions = _nullishCoalesce(cssCalc, () => ( _optionalChain([patcher, 'optionalAccess',
|
|
112
|
-
if (_optionalChain([patcher, 'optionalAccess',
|
|
114
|
+
const cssCalcOptions = _nullishCoalesce(cssCalc, () => ( _optionalChain([patcher, 'optionalAccess', _15 => _15.majorVersion]) === 4));
|
|
115
|
+
if (_optionalChain([patcher, 'optionalAccess', _16 => _16.majorVersion]) === 4 && cssCalcOptions) {
|
|
113
116
|
return ensureDefaultsIncluded(cssCalcOptions);
|
|
114
117
|
}
|
|
115
118
|
return cssCalcOptions;
|
|
@@ -187,7 +190,7 @@ function findWorkspacePackageDir(rootDir, packageName) {
|
|
|
187
190
|
const pkgPath = _path2.default.join(normalized, "package.json");
|
|
188
191
|
if (_fs.existsSync.call(void 0, pkgPath)) {
|
|
189
192
|
const pkg = JSON.parse(_fs.readFileSync.call(void 0, pkgPath, "utf8"));
|
|
190
|
-
if (_optionalChain([pkg, 'optionalAccess',
|
|
193
|
+
if (_optionalChain([pkg, 'optionalAccess', _17 => _17.name]) === packageName) {
|
|
191
194
|
return normalized;
|
|
192
195
|
}
|
|
193
196
|
}
|
|
@@ -200,7 +203,7 @@ function findWorkspacePackageDir(rootDir, packageName) {
|
|
|
200
203
|
continue;
|
|
201
204
|
}
|
|
202
205
|
for (const entry of entries) {
|
|
203
|
-
if (!entry.isDirectory() || IGNORED_WORKSPACE_DIRS.has(entry.name) || _optionalChain([entry, 'access',
|
|
206
|
+
if (!entry.isDirectory() || IGNORED_WORKSPACE_DIRS.has(entry.name) || _optionalChain([entry, 'access', _18 => _18.isSymbolicLink, 'optionalCall', _19 => _19()])) {
|
|
204
207
|
continue;
|
|
205
208
|
}
|
|
206
209
|
queue.push(_path2.default.join(normalized, entry.name));
|
|
@@ -235,28 +238,28 @@ function normalizeTailwindcssPatcherOptions(options) {
|
|
|
235
238
|
if (cache !== void 0) {
|
|
236
239
|
normalized.cache = cache;
|
|
237
240
|
}
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
const apply = {};
|
|
242
|
+
const extract = {};
|
|
243
|
+
if (_optionalChain([patch, 'optionalAccess', _20 => _20.overwrite]) !== void 0) {
|
|
244
|
+
apply.overwrite = patch.overwrite;
|
|
240
245
|
}
|
|
241
|
-
if (_optionalChain([patch, 'optionalAccess',
|
|
246
|
+
if (_optionalChain([patch, 'optionalAccess', _21 => _21.filter])) {
|
|
242
247
|
normalized.filter = patch.filter;
|
|
243
248
|
}
|
|
244
|
-
const extendLengthUnits = normalizeExtendLengthUnits(_optionalChain([patch, 'optionalAccess',
|
|
245
|
-
const exposeContext = _optionalChain([patch, 'optionalAccess',
|
|
249
|
+
const extendLengthUnits = normalizeExtendLengthUnits(_optionalChain([patch, 'optionalAccess', _22 => _22.applyPatches, 'optionalAccess', _23 => _23.extendLengthUnits]));
|
|
250
|
+
const exposeContext = _optionalChain([patch, 'optionalAccess', _24 => _24.applyPatches, 'optionalAccess', _25 => _25.exportContext]);
|
|
246
251
|
if (extendLengthUnits !== void 0 || exposeContext !== void 0) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
extendLengthUnits
|
|
250
|
-
};
|
|
252
|
+
apply.exposeContext = exposeContext;
|
|
253
|
+
apply.extendLengthUnits = extendLengthUnits;
|
|
251
254
|
}
|
|
252
|
-
const cwd = _nullishCoalesce(_optionalChain([patch, 'optionalAccess',
|
|
255
|
+
const cwd = _nullishCoalesce(_optionalChain([patch, 'optionalAccess', _26 => _26.cwd]), () => ( _optionalChain([patch, 'optionalAccess', _27 => _27.basedir])));
|
|
253
256
|
if (cwd) {
|
|
254
|
-
normalized.
|
|
257
|
+
normalized.projectRoot = cwd;
|
|
255
258
|
}
|
|
256
|
-
const tailwindOptions = _optionalChain([patch, 'optionalAccess',
|
|
257
|
-
const legacyResolve = _optionalChain([patch, 'optionalAccess',
|
|
259
|
+
const tailwindOptions = _optionalChain([patch, 'optionalAccess', _28 => _28.tailwindcss]) ? { ...patch.tailwindcss } : void 0;
|
|
260
|
+
const legacyResolve = _optionalChain([patch, 'optionalAccess', _29 => _29.resolve]);
|
|
258
261
|
let nextTailwindOptions = tailwindOptions;
|
|
259
|
-
if (_optionalChain([nextTailwindOptions, 'optionalAccess',
|
|
262
|
+
if (_optionalChain([nextTailwindOptions, 'optionalAccess', _30 => _30.version]) === 2 && !nextTailwindOptions.packageName) {
|
|
260
263
|
nextTailwindOptions = {
|
|
261
264
|
...nextTailwindOptions,
|
|
262
265
|
packageName: "@tailwindcss/postcss7-compat",
|
|
@@ -267,19 +270,97 @@ function normalizeTailwindcssPatcherOptions(options) {
|
|
|
267
270
|
}
|
|
268
271
|
}
|
|
269
272
|
if (nextTailwindOptions || legacyResolve) {
|
|
270
|
-
const resolveOptions = _optionalChain([nextTailwindOptions, 'optionalAccess',
|
|
273
|
+
const resolveOptions = _optionalChain([nextTailwindOptions, 'optionalAccess', _31 => _31.resolve]);
|
|
271
274
|
const mergedResolve = legacyResolve || resolveOptions ? {
|
|
272
275
|
..._nullishCoalesce(resolveOptions, () => ( {})),
|
|
273
276
|
..._nullishCoalesce(legacyResolve, () => ( {}))
|
|
274
277
|
} : void 0;
|
|
275
|
-
normalized.
|
|
278
|
+
normalized.tailwindcss = {
|
|
276
279
|
..._nullishCoalesce(nextTailwindOptions, () => ( {})),
|
|
277
280
|
...mergedResolve ? { resolve: mergedResolve } : {}
|
|
278
281
|
};
|
|
279
282
|
}
|
|
280
|
-
|
|
283
|
+
if (_optionalChain([patch, 'optionalAccess', _32 => _32.output])) {
|
|
284
|
+
if (patch.output.filename !== void 0) {
|
|
285
|
+
extract.file = patch.output.filename;
|
|
286
|
+
}
|
|
287
|
+
if (patch.output.loose !== void 0) {
|
|
288
|
+
extract.pretty = patch.output.loose ? 2 : false;
|
|
289
|
+
}
|
|
290
|
+
if (patch.output.removeUniversalSelector !== void 0) {
|
|
291
|
+
extract.removeUniversalSelector = patch.output.removeUniversalSelector;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (Object.keys(apply).length > 0) {
|
|
295
|
+
normalized.apply = apply;
|
|
296
|
+
}
|
|
297
|
+
if (Object.keys(extract).length > 0) {
|
|
298
|
+
normalized.extract = extract;
|
|
299
|
+
}
|
|
300
|
+
return toModernTailwindcssPatchOptions(normalized);
|
|
301
|
+
}
|
|
302
|
+
return toModernTailwindcssPatchOptions(options);
|
|
303
|
+
}
|
|
304
|
+
function toModernTailwindcssPatchOptions(options) {
|
|
305
|
+
if (!options) {
|
|
306
|
+
return void 0;
|
|
307
|
+
}
|
|
308
|
+
const normalized = {};
|
|
309
|
+
if (options.cache !== void 0) {
|
|
310
|
+
normalized.cache = options.cache;
|
|
311
|
+
}
|
|
312
|
+
if (options.filter) {
|
|
313
|
+
normalized.filter = options.filter;
|
|
314
|
+
}
|
|
315
|
+
const projectRoot = _nullishCoalesce(options.projectRoot, () => ( options.cwd));
|
|
316
|
+
if (projectRoot) {
|
|
317
|
+
normalized.projectRoot = projectRoot;
|
|
318
|
+
}
|
|
319
|
+
const tailwindcss = _nullishCoalesce(options.tailwindcss, () => ( options.tailwind));
|
|
320
|
+
if (tailwindcss) {
|
|
321
|
+
normalized.tailwindcss = {
|
|
322
|
+
...tailwindcss
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
const apply = {
|
|
326
|
+
..._nullishCoalesce(options.apply, () => ( {}))
|
|
327
|
+
};
|
|
328
|
+
if (apply.overwrite === void 0 && options.overwrite !== void 0) {
|
|
329
|
+
apply.overwrite = options.overwrite;
|
|
330
|
+
}
|
|
331
|
+
if (apply.exposeContext === void 0 && _optionalChain([options, 'access', _33 => _33.features, 'optionalAccess', _34 => _34.exposeContext]) !== void 0) {
|
|
332
|
+
apply.exposeContext = options.features.exposeContext;
|
|
333
|
+
}
|
|
334
|
+
if (apply.extendLengthUnits === void 0 && _optionalChain([options, 'access', _35 => _35.features, 'optionalAccess', _36 => _36.extendLengthUnits]) !== void 0) {
|
|
335
|
+
apply.extendLengthUnits = options.features.extendLengthUnits;
|
|
336
|
+
}
|
|
337
|
+
if (Object.keys(apply).length > 0) {
|
|
338
|
+
normalized.apply = apply;
|
|
339
|
+
}
|
|
340
|
+
const extract = {
|
|
341
|
+
..._nullishCoalesce(options.extract, () => ( {}))
|
|
342
|
+
};
|
|
343
|
+
if (options.output) {
|
|
344
|
+
if (extract.write === void 0 && options.output.enabled !== void 0) {
|
|
345
|
+
extract.write = options.output.enabled;
|
|
346
|
+
}
|
|
347
|
+
if (extract.file === void 0 && options.output.file !== void 0) {
|
|
348
|
+
extract.file = options.output.file;
|
|
349
|
+
}
|
|
350
|
+
if (extract.format === void 0 && options.output.format !== void 0) {
|
|
351
|
+
extract.format = options.output.format;
|
|
352
|
+
}
|
|
353
|
+
if (extract.pretty === void 0 && options.output.pretty !== void 0) {
|
|
354
|
+
extract.pretty = options.output.pretty;
|
|
355
|
+
}
|
|
356
|
+
if (extract.removeUniversalSelector === void 0 && options.output.removeUniversalSelector !== void 0) {
|
|
357
|
+
extract.removeUniversalSelector = options.output.removeUniversalSelector;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (Object.keys(extract).length > 0) {
|
|
361
|
+
normalized.extract = extract;
|
|
281
362
|
}
|
|
282
|
-
return
|
|
363
|
+
return normalized;
|
|
283
364
|
}
|
|
284
365
|
|
|
285
366
|
// src/tailwindcss/patcher-resolve.ts
|
|
@@ -482,71 +563,74 @@ function createTailwindcssPatcher(options) {
|
|
|
482
563
|
}
|
|
483
564
|
}
|
|
484
565
|
const baseOptions = {
|
|
485
|
-
|
|
566
|
+
projectRoot: normalizedBasedir,
|
|
486
567
|
cache,
|
|
487
|
-
|
|
488
|
-
|
|
568
|
+
tailwindcss: baseTailwindOptions,
|
|
569
|
+
apply: {
|
|
489
570
|
exposeContext: true,
|
|
490
571
|
extendLengthUnits
|
|
491
572
|
}
|
|
492
573
|
};
|
|
493
|
-
const
|
|
574
|
+
const mergedOptions = _shared.defuOverrideArray.call(void 0,
|
|
494
575
|
_nullishCoalesce(normalizedUserOptions, () => ( {})),
|
|
495
576
|
baseOptions
|
|
496
577
|
);
|
|
497
|
-
|
|
498
|
-
|
|
578
|
+
const resolvedOptions = _nullishCoalesce(toModernTailwindcssPatchOptions(mergedOptions), () => ( {}));
|
|
579
|
+
const resolvedTailwindOptions = resolvedOptions.tailwindcss;
|
|
580
|
+
if (resolvedTailwindOptions) {
|
|
581
|
+
const existingResolve = _nullishCoalesce(resolvedTailwindOptions.resolve, () => ( {}));
|
|
499
582
|
const customPaths = Array.isArray(existingResolve.paths) && existingResolve.paths.length > 0;
|
|
500
583
|
const sourcePaths = customPaths ? existingResolve.paths : resolvePaths;
|
|
501
|
-
|
|
584
|
+
resolvedTailwindOptions.resolve = {
|
|
502
585
|
...existingResolve,
|
|
503
586
|
paths: Array.from(new Set(sourcePaths))
|
|
504
587
|
};
|
|
505
588
|
_logger.logger.debug("Tailwind resolve config %O", {
|
|
506
|
-
packageName:
|
|
507
|
-
version:
|
|
508
|
-
resolve:
|
|
509
|
-
cwd:
|
|
589
|
+
packageName: resolvedTailwindOptions.packageName,
|
|
590
|
+
version: resolvedTailwindOptions.version,
|
|
591
|
+
resolve: resolvedTailwindOptions.resolve,
|
|
592
|
+
cwd: resolvedTailwindOptions.cwd
|
|
510
593
|
});
|
|
511
|
-
if (typeof
|
|
594
|
+
if (typeof resolvedTailwindOptions.postcssPlugin === "string") {
|
|
512
595
|
const resolvedPlugin = resolveModuleFromPaths(
|
|
513
|
-
|
|
514
|
-
_nullishCoalesce(_optionalChain([
|
|
596
|
+
resolvedTailwindOptions.postcssPlugin,
|
|
597
|
+
_nullishCoalesce(_optionalChain([resolvedTailwindOptions, 'access', _37 => _37.resolve, 'optionalAccess', _38 => _38.paths]), () => ( resolvePaths))
|
|
515
598
|
);
|
|
516
599
|
if (resolvedPlugin) {
|
|
517
|
-
|
|
600
|
+
resolvedTailwindOptions.postcssPlugin = resolvedPlugin;
|
|
518
601
|
}
|
|
519
602
|
}
|
|
520
603
|
const searchRoots = /* @__PURE__ */ new Set();
|
|
521
|
-
if (
|
|
522
|
-
searchRoots.add(
|
|
604
|
+
if (resolvedTailwindOptions.cwd) {
|
|
605
|
+
searchRoots.add(resolvedTailwindOptions.cwd);
|
|
523
606
|
}
|
|
524
|
-
for (const resolvePath of _nullishCoalesce(_optionalChain([
|
|
607
|
+
for (const resolvePath of _nullishCoalesce(_optionalChain([resolvedTailwindOptions, 'access', _39 => _39.resolve, 'optionalAccess', _40 => _40.paths]), () => ( []))) {
|
|
525
608
|
const parentDir = _path2.default.dirname(resolvePath);
|
|
526
609
|
searchRoots.add(parentDir);
|
|
527
610
|
}
|
|
528
611
|
const configPath = findTailwindConfig(searchRoots);
|
|
529
|
-
if (!
|
|
612
|
+
if (!resolvedTailwindOptions.config) {
|
|
530
613
|
if (configPath) {
|
|
531
|
-
|
|
614
|
+
resolvedTailwindOptions.config = configPath;
|
|
532
615
|
} else {
|
|
533
616
|
const fallbackConfig = resolveTailwindConfigFallback(
|
|
534
|
-
|
|
535
|
-
_nullishCoalesce(
|
|
617
|
+
resolvedTailwindOptions.packageName,
|
|
618
|
+
_nullishCoalesce(resolvedTailwindOptions.resolve.paths, () => ( resolvePaths))
|
|
536
619
|
);
|
|
537
620
|
if (fallbackConfig) {
|
|
538
|
-
|
|
621
|
+
resolvedTailwindOptions.config = fallbackConfig;
|
|
539
622
|
}
|
|
540
623
|
}
|
|
541
624
|
}
|
|
542
|
-
if (!
|
|
543
|
-
|
|
625
|
+
if (!resolvedTailwindOptions.cwd && configPath) {
|
|
626
|
+
resolvedTailwindOptions.cwd = _path2.default.dirname(configPath);
|
|
544
627
|
}
|
|
628
|
+
resolvedOptions.tailwindcss = resolvedTailwindOptions;
|
|
545
629
|
}
|
|
546
630
|
try {
|
|
547
631
|
return new (0, _tailwindcsspatch.TailwindcssPatcher)(resolvedOptions);
|
|
548
632
|
} catch (error) {
|
|
549
|
-
const searchPaths = _optionalChain([resolvedOptions, 'access',
|
|
633
|
+
const searchPaths = _optionalChain([resolvedOptions, 'access', _41 => _41.tailwindcss, 'optionalAccess', _42 => _42.resolve, 'optionalAccess', _43 => _43.paths]);
|
|
550
634
|
if (error instanceof Error && /tailwindcss not found/i.test(error.message)) {
|
|
551
635
|
if (!hasLoggedMissingTailwind) {
|
|
552
636
|
_logger.logger.warn("Tailwind CSS \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7 Tailwind \u76F8\u5173\u8865\u4E01\u3002\u82E5\u9700\u4F7F\u7528 Tailwind \u80FD\u529B\uFF0C\u8BF7\u5B89\u88C5 tailwindcss\u3002");
|
|
@@ -555,7 +639,7 @@ function createTailwindcssPatcher(options) {
|
|
|
555
639
|
return createFallbackTailwindcssPatcher();
|
|
556
640
|
}
|
|
557
641
|
if (error instanceof Error && /unable to locate tailwind css package/i.test(error.message)) {
|
|
558
|
-
_logger.logger.error('\u65E0\u6CD5\u5B9A\u4F4D Tailwind CSS \u5305 "%s"\uFF0C\u5DF2\u5C1D\u8BD5\u8DEF\u5F84: %O', _optionalChain([resolvedOptions, 'access',
|
|
642
|
+
_logger.logger.error('\u65E0\u6CD5\u5B9A\u4F4D Tailwind CSS \u5305 "%s"\uFF0C\u5DF2\u5C1D\u8BD5\u8DEF\u5F84: %O', _optionalChain([resolvedOptions, 'access', _44 => _44.tailwindcss, 'optionalAccess', _45 => _45.packageName]), searchPaths);
|
|
559
643
|
}
|
|
560
644
|
throw error;
|
|
561
645
|
}
|
|
@@ -569,18 +653,18 @@ function createMultiTailwindcssPatcher(patchers) {
|
|
|
569
653
|
const [first] = patchers;
|
|
570
654
|
const multiPatcher = {
|
|
571
655
|
...first,
|
|
572
|
-
packageInfo: _optionalChain([first, 'optionalAccess',
|
|
573
|
-
majorVersion: _optionalChain([first, 'optionalAccess',
|
|
574
|
-
options: _optionalChain([first, 'optionalAccess',
|
|
656
|
+
packageInfo: _optionalChain([first, 'optionalAccess', _46 => _46.packageInfo]),
|
|
657
|
+
majorVersion: _optionalChain([first, 'optionalAccess', _47 => _47.majorVersion]),
|
|
658
|
+
options: _optionalChain([first, 'optionalAccess', _48 => _48.options]),
|
|
575
659
|
async patch() {
|
|
576
660
|
let exposeContext;
|
|
577
661
|
let extendLengthUnits;
|
|
578
662
|
for (const patcher of patchers) {
|
|
579
663
|
const result = await patcher.patch();
|
|
580
|
-
if (_optionalChain([result, 'optionalAccess',
|
|
664
|
+
if (_optionalChain([result, 'optionalAccess', _49 => _49.exposeContext]) && exposeContext == null) {
|
|
581
665
|
exposeContext = result.exposeContext;
|
|
582
666
|
}
|
|
583
|
-
if (_optionalChain([result, 'optionalAccess',
|
|
667
|
+
if (_optionalChain([result, 'optionalAccess', _50 => _50.extendLengthUnits]) && extendLengthUnits == null) {
|
|
584
668
|
extendLengthUnits = result.extendLengthUnits;
|
|
585
669
|
}
|
|
586
670
|
}
|
|
@@ -636,7 +720,7 @@ function createMultiTailwindcssPatcher(patchers) {
|
|
|
636
720
|
multiPatcher.getClassSetSync = () => {
|
|
637
721
|
const aggregated = /* @__PURE__ */ new Set();
|
|
638
722
|
for (const patcher of patchers) {
|
|
639
|
-
const current = _optionalChain([patcher, 'access',
|
|
723
|
+
const current = _optionalChain([patcher, 'access', _51 => _51.getClassSetSync, 'optionalCall', _52 => _52()]);
|
|
640
724
|
if (!current) {
|
|
641
725
|
continue;
|
|
642
726
|
}
|
|
@@ -697,17 +781,19 @@ function overrideTailwindcssPatcherOptionsForBase(options, baseDir, cssEntries)
|
|
|
697
781
|
if (!isModernTailwindcssPatchOptions(options)) {
|
|
698
782
|
return options;
|
|
699
783
|
}
|
|
700
|
-
|
|
784
|
+
const modernTailwind = _nullishCoalesce(options.tailwindcss, () => ( options.tailwind));
|
|
785
|
+
if (!modernTailwind) {
|
|
701
786
|
return options;
|
|
702
787
|
}
|
|
788
|
+
const { tailwind: _legacyTailwind, ...rest } = options;
|
|
703
789
|
return {
|
|
704
|
-
...
|
|
705
|
-
|
|
706
|
-
...
|
|
790
|
+
...rest,
|
|
791
|
+
tailwindcss: {
|
|
792
|
+
...modernTailwind,
|
|
707
793
|
v4: {
|
|
708
|
-
..._nullishCoalesce(
|
|
709
|
-
...hasCssEntries ? {} : { base: _nullishCoalesce(_optionalChain([
|
|
710
|
-
cssEntries: hasCssEntries ? cssEntries : _nullishCoalesce(_optionalChain([
|
|
794
|
+
..._nullishCoalesce(modernTailwind.v4, () => ( {})),
|
|
795
|
+
...hasCssEntries ? {} : { base: _nullishCoalesce(_optionalChain([modernTailwind, 'access', _53 => _53.v4, 'optionalAccess', _54 => _54.base]), () => ( baseDir)) },
|
|
796
|
+
cssEntries: hasCssEntries ? cssEntries : _nullishCoalesce(_optionalChain([modernTailwind, 'access', _55 => _55.v4, 'optionalAccess', _56 => _56.cssEntries]), () => ( cssEntries))
|
|
711
797
|
}
|
|
712
798
|
}
|
|
713
799
|
};
|
|
@@ -801,7 +887,7 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
801
887
|
tailwindcssPatcherOptions,
|
|
802
888
|
supportCustomLengthUnitsPatch
|
|
803
889
|
} = options;
|
|
804
|
-
const hasCssEntries = Boolean(_optionalChain([cssEntries, 'optionalAccess',
|
|
890
|
+
const hasCssEntries = Boolean(_optionalChain([cssEntries, 'optionalAccess', _57 => _57.length]));
|
|
805
891
|
const defaultTailwindcssConfig = {
|
|
806
892
|
cwd: baseDir,
|
|
807
893
|
v2: {
|
|
@@ -832,7 +918,7 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
832
918
|
mergedTailwindOptions.v4.base = baseDir;
|
|
833
919
|
}
|
|
834
920
|
if (hasCssEntries) {
|
|
835
|
-
if (_optionalChain([cssEntries, 'optionalAccess',
|
|
921
|
+
if (_optionalChain([cssEntries, 'optionalAccess', _58 => _58.length])) {
|
|
836
922
|
mergedTailwindOptions.v4.cssEntries = cssEntries;
|
|
837
923
|
} else if (!mergedTailwindOptions.v4.cssEntries) {
|
|
838
924
|
mergedTailwindOptions.v4.cssEntries = [];
|
|
@@ -846,8 +932,8 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
846
932
|
baseDir,
|
|
847
933
|
_nullishCoalesce(cssEntries, () => ( []))
|
|
848
934
|
);
|
|
849
|
-
const configuredPackageName = _optionalChain([tailwindcss, 'optionalAccess',
|
|
850
|
-
const configuredVersion = _optionalChain([tailwindcss, 'optionalAccess',
|
|
935
|
+
const configuredPackageName = _optionalChain([tailwindcss, 'optionalAccess', _59 => _59.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _60 => _60.tailwindcss, 'optionalAccess', _61 => _61.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _62 => _62.tailwind, 'optionalAccess', _63 => _63.packageName]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _64 => _64.patch, 'optionalAccess', _65 => _65.tailwindcss, 'optionalAccess', _66 => _66.packageName]);
|
|
936
|
+
const configuredVersion = _optionalChain([tailwindcss, 'optionalAccess', _67 => _67.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _68 => _68.tailwindcss, 'optionalAccess', _69 => _69.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _70 => _70.tailwind, 'optionalAccess', _71 => _71.version]) || _optionalChain([tailwindcssPatcherOptions, 'optionalAccess', _72 => _72.patch, 'optionalAccess', _73 => _73.tailwindcss, 'optionalAccess', _74 => _74.version]) || mergedTailwindOptions.version;
|
|
851
937
|
const isTailwindcss4Package = (packageName) => Boolean(
|
|
852
938
|
packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4"))
|
|
853
939
|
);
|
|
@@ -940,7 +1026,7 @@ function detectCallerBasedir() {
|
|
|
940
1026
|
const lines = stack.split("\n");
|
|
941
1027
|
for (const line of lines) {
|
|
942
1028
|
const match = _nullishCoalesce(line.match(/\(([^)]+)\)/u), () => ( line.match(/at\s+(\S.*)$/u)));
|
|
943
|
-
const location = _optionalChain([match, 'optionalAccess',
|
|
1029
|
+
const location = _optionalChain([match, 'optionalAccess', _75 => _75[1]]);
|
|
944
1030
|
if (!location) {
|
|
945
1031
|
continue;
|
|
946
1032
|
}
|
|
@@ -970,8 +1056,8 @@ function detectCallerBasedir() {
|
|
|
970
1056
|
}
|
|
971
1057
|
function resolveTailwindcssBasedir(basedir, fallback) {
|
|
972
1058
|
const envBasedirResult = pickEnvBasedir();
|
|
973
|
-
const envBasedir = _optionalChain([envBasedirResult, 'optionalAccess',
|
|
974
|
-
const envBasedirKey = _optionalChain([envBasedirResult, 'optionalAccess',
|
|
1059
|
+
const envBasedir = _optionalChain([envBasedirResult, 'optionalAccess', _76 => _76.value]);
|
|
1060
|
+
const envBasedirKey = _optionalChain([envBasedirResult, 'optionalAccess', _77 => _77.key]);
|
|
975
1061
|
const envBasedirIsGeneric = envBasedirKey ? GENERIC_ENV_BASEDIR_KEYS.has(envBasedirKey) : false;
|
|
976
1062
|
const packageEnvBasedir = pickPackageEnvBasedir();
|
|
977
1063
|
const shouldDetectCaller = !envBasedir || envBasedirIsGeneric;
|
|
@@ -1129,12 +1215,12 @@ function createTailwindcssPatcherFromContext(ctx) {
|
|
|
1129
1215
|
if (normalizedCssEntries) {
|
|
1130
1216
|
ctx.cssEntries = normalizedCssEntries;
|
|
1131
1217
|
}
|
|
1132
|
-
const shouldAttachBase = Boolean(ctx.tailwindcssBasedir && _optionalChain([normalizedCssEntries, 'optionalAccess',
|
|
1133
|
-
const tailwindcssWithBase = shouldAttachBase && _optionalChain([tailwindcss, 'optionalAccess',
|
|
1218
|
+
const shouldAttachBase = Boolean(ctx.tailwindcssBasedir && _optionalChain([normalizedCssEntries, 'optionalAccess', _78 => _78.length]));
|
|
1219
|
+
const tailwindcssWithBase = shouldAttachBase && _optionalChain([tailwindcss, 'optionalAccess', _79 => _79.v4]) !== null ? {
|
|
1134
1220
|
..._nullishCoalesce(tailwindcss, () => ( {})),
|
|
1135
1221
|
v4: {
|
|
1136
|
-
..._nullishCoalesce(_optionalChain([tailwindcss, 'optionalAccess',
|
|
1137
|
-
base: _nullishCoalesce(_optionalChain([tailwindcss, 'optionalAccess',
|
|
1222
|
+
..._nullishCoalesce(_optionalChain([tailwindcss, 'optionalAccess', _80 => _80.v4]), () => ( {})),
|
|
1223
|
+
base: _nullishCoalesce(_optionalChain([tailwindcss, 'optionalAccess', _81 => _81.v4, 'optionalAccess', _82 => _82.base]), () => ( resolvedTailwindcssBasedir))
|
|
1138
1224
|
}
|
|
1139
1225
|
} : tailwindcss;
|
|
1140
1226
|
const patcherOptions = {
|
|
@@ -1152,7 +1238,7 @@ function createTailwindcssPatcherFromContext(ctx) {
|
|
|
1152
1238
|
if (multiPatcher) {
|
|
1153
1239
|
return multiPatcher;
|
|
1154
1240
|
}
|
|
1155
|
-
if (_optionalChain([groupedCssEntries, 'optionalAccess',
|
|
1241
|
+
if (_optionalChain([groupedCssEntries, 'optionalAccess', _83 => _83.size]) === 1) {
|
|
1156
1242
|
const firstGroup = groupedCssEntries.entries().next().value;
|
|
1157
1243
|
if (firstGroup) {
|
|
1158
1244
|
const [baseDir, entries] = firstGroup;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk5APD2MNVjs = require('./chunk-5APD2MNV.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5U24PLVVjs = require('./chunk-5U24PLVV.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -266,7 +266,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
|
266
266
|
// package.json
|
|
267
267
|
var package_default = {
|
|
268
268
|
name: "weapp-tailwindcss",
|
|
269
|
-
version: "4.10.0-beta.
|
|
269
|
+
version: "4.10.0-beta.4",
|
|
270
270
|
description: "\u628A tailwindcss \u539F\u5B50\u5316\u6837\u5F0F\u601D\u60F3\uFF0C\u5E26\u7ED9\u5C0F\u7A0B\u5E8F\u5F00\u53D1\u8005\u4EEC! bring tailwindcss to miniprogram developers!",
|
|
271
271
|
author: "ice breaker <1324318532@qq.com>",
|
|
272
272
|
license: "MIT",
|
|
@@ -461,7 +461,7 @@ var package_default = {
|
|
|
461
461
|
"@babel/parser": "~7.29.0",
|
|
462
462
|
"@babel/traverse": "~7.29.0",
|
|
463
463
|
"@babel/types": "~7.29.0",
|
|
464
|
-
"@tailwindcss-mangle/config": "^6.1.
|
|
464
|
+
"@tailwindcss-mangle/config": "^6.1.1",
|
|
465
465
|
"@vue/compiler-dom": "catalog:vue3",
|
|
466
466
|
"@vue/compiler-sfc": "catalog:vue3",
|
|
467
467
|
"@weapp-core/escape": "~7.0.0",
|
|
@@ -627,7 +627,7 @@ function formatRelativeToBase(targetPath, baseDir) {
|
|
|
627
627
|
}
|
|
628
628
|
function resolveRecordLocation(baseDir) {
|
|
629
629
|
const normalizedBase = _path2.default.normalize(baseDir);
|
|
630
|
-
const packageRoot = _nullishCoalesce(
|
|
630
|
+
const packageRoot = _nullishCoalesce(_chunk5APD2MNVjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
|
|
631
631
|
const packageJsonPath = _path2.default.join(packageRoot, "package.json");
|
|
632
632
|
const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
|
|
633
633
|
const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
|
|
@@ -2874,6 +2874,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
|
|
|
2874
2874
|
unitsToPx,
|
|
2875
2875
|
arbitraryValues,
|
|
2876
2876
|
jsPreserveClass,
|
|
2877
|
+
staleClassNameFallback,
|
|
2877
2878
|
babelParserOptions,
|
|
2878
2879
|
ignoreCallExpressionIdentifiers,
|
|
2879
2880
|
ignoreTaggedTemplateExpressionIdentifiers,
|
|
@@ -2903,6 +2904,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
|
|
|
2903
2904
|
escapeMap,
|
|
2904
2905
|
arbitraryValues,
|
|
2905
2906
|
jsPreserveClass,
|
|
2907
|
+
staleClassNameFallback,
|
|
2906
2908
|
generateMap: true,
|
|
2907
2909
|
babelParserOptions,
|
|
2908
2910
|
ignoreCallExpressionIdentifiers,
|
|
@@ -2945,16 +2947,26 @@ async function clearTailwindcssPatcherCache(patcher, options) {
|
|
|
2945
2947
|
if (cacheOptions == null || typeof cacheOptions === "object" && cacheOptions.enabled === false) {
|
|
2946
2948
|
return;
|
|
2947
2949
|
}
|
|
2950
|
+
if (typeof patcher.clearCache === "function") {
|
|
2951
|
+
try {
|
|
2952
|
+
await patcher.clearCache({ scope: "all" });
|
|
2953
|
+
} catch (error) {
|
|
2954
|
+
_logger.logger.debug("failed to clear tailwindcss patcher cache via clearCache(): %O", error);
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
if (!_optionalChain([options, 'optionalAccess', _90 => _90.removeDirectory])) {
|
|
2958
|
+
return;
|
|
2959
|
+
}
|
|
2948
2960
|
const cachePaths = /* @__PURE__ */ new Map();
|
|
2949
2961
|
const normalizedCacheOptions = typeof cacheOptions === "object" ? cacheOptions : void 0;
|
|
2950
|
-
if (_optionalChain([normalizedCacheOptions, 'optionalAccess',
|
|
2962
|
+
if (_optionalChain([normalizedCacheOptions, 'optionalAccess', _91 => _91.path])) {
|
|
2951
2963
|
cachePaths.set(normalizedCacheOptions.path, false);
|
|
2952
2964
|
}
|
|
2953
|
-
const privateCachePath = _optionalChain([patcher, 'optionalAccess',
|
|
2965
|
+
const privateCachePath = _optionalChain([patcher, 'optionalAccess', _92 => _92.cacheStore, 'optionalAccess', _93 => _93.options, 'optionalAccess', _94 => _94.path]);
|
|
2954
2966
|
if (privateCachePath) {
|
|
2955
2967
|
cachePaths.set(privateCachePath, false);
|
|
2956
2968
|
}
|
|
2957
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
2969
|
+
if (_optionalChain([options, 'optionalAccess', _95 => _95.removeDirectory]) && _optionalChain([normalizedCacheOptions, 'optionalAccess', _96 => _96.dir])) {
|
|
2958
2970
|
cachePaths.set(normalizedCacheOptions.dir, true);
|
|
2959
2971
|
}
|
|
2960
2972
|
if (!cachePaths.size) {
|
|
@@ -2965,7 +2977,7 @@ async function clearTailwindcssPatcherCache(patcher, options) {
|
|
|
2965
2977
|
await _promises.rm.call(void 0, cachePath, { force: true, recursive });
|
|
2966
2978
|
} catch (error) {
|
|
2967
2979
|
const err = error;
|
|
2968
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
2980
|
+
if (_optionalChain([err, 'optionalAccess', _97 => _97.code]) === "ENOENT") {
|
|
2969
2981
|
continue;
|
|
2970
2982
|
}
|
|
2971
2983
|
_logger.logger.debug("failed to clear tailwindcss patcher cache: %s %O", cachePath, err);
|
|
@@ -2975,20 +2987,20 @@ async function clearTailwindcssPatcherCache(patcher, options) {
|
|
|
2975
2987
|
function createInternalCompilerContext(opts) {
|
|
2976
2988
|
const ctx = _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0,
|
|
2977
2989
|
opts,
|
|
2978
|
-
|
|
2990
|
+
_chunk5U24PLVVjs.getDefaultOptions.call(void 0, ),
|
|
2979
2991
|
{}
|
|
2980
2992
|
);
|
|
2981
2993
|
ctx.escapeMap = ctx.customReplaceDictionary;
|
|
2982
2994
|
applyLoggerLevel(ctx.logLevel);
|
|
2983
|
-
const twPatcher =
|
|
2995
|
+
const twPatcher = _chunk5APD2MNVjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
|
|
2984
2996
|
logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
|
|
2985
|
-
if (_optionalChain([twPatcher, 'access',
|
|
2997
|
+
if (_optionalChain([twPatcher, 'access', _98 => _98.packageInfo, 'optionalAccess', _99 => _99.version])) {
|
|
2986
2998
|
_logger.logger.success(`\u5F53\u524D\u4F7F\u7528 ${_logger.pc.cyanBright("Tailwind CSS")} \u7248\u672C\u4E3A: ${_logger.pc.underline(_logger.pc.bold(_logger.pc.green(twPatcher.packageInfo.version)))}`);
|
|
2987
2999
|
} else {
|
|
2988
3000
|
_logger.logger.warn(`${_logger.pc.cyanBright("Tailwind CSS")} \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7\u7248\u672C\u68C0\u6D4B\u4E0E\u8865\u4E01\u5E94\u7528\u3002`);
|
|
2989
3001
|
}
|
|
2990
|
-
|
|
2991
|
-
const cssCalcOptions =
|
|
3002
|
+
_chunk5APD2MNVjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
|
|
3003
|
+
const cssCalcOptions = _chunk5APD2MNVjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
|
|
2992
3004
|
ctx.cssCalc = cssCalcOptions;
|
|
2993
3005
|
const customAttributesEntities = toCustomAttributesEntities(ctx.customAttributes);
|
|
2994
3006
|
const { styleHandler, jsHandler: jsHandler2, templateHandler } = createHandlersFromContext(
|
|
@@ -3003,11 +3015,11 @@ function createInternalCompilerContext(opts) {
|
|
|
3003
3015
|
ctx.twPatcher = twPatcher;
|
|
3004
3016
|
const refreshTailwindcssPatcher = async (options) => {
|
|
3005
3017
|
const previousPatcher = ctx.twPatcher;
|
|
3006
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3018
|
+
if (_optionalChain([options, 'optionalAccess', _100 => _100.clearCache]) !== false) {
|
|
3007
3019
|
await clearTailwindcssPatcherCache(previousPatcher);
|
|
3008
3020
|
}
|
|
3009
3021
|
invalidateRuntimeClassSet(previousPatcher);
|
|
3010
|
-
const nextPatcher =
|
|
3022
|
+
const nextPatcher = _chunk5APD2MNVjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
|
|
3011
3023
|
Object.assign(previousPatcher, nextPatcher);
|
|
3012
3024
|
ctx.twPatcher = previousPatcher;
|
|
3013
3025
|
return previousPatcher;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkIIDSY4XZjs = require('./chunk-IIDSY4XZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBFZDZRA5js = require('./chunk-BFZDZRA5.js');
|
|
7
7
|
|
|
8
8
|
// src/shared/mpx.ts
|
|
9
9
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -154,8 +154,8 @@ 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(_chunkBFZDZRA5js.pluginName, (factory) => {
|
|
158
|
+
factory.hooks.beforeResolve.tap(_chunkBFZDZRA5js.pluginName, (data) => {
|
|
159
159
|
rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
|
|
160
160
|
});
|
|
161
161
|
});
|