weapp-tailwindcss 4.12.0-alpha.2 → 4.12.0-alpha.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-PAAX4FDD.js → chunk-2PFYPSPO.js} +36 -36
- package/dist/{chunk-F2CKKG6Q.mjs → chunk-3VQKDHGP.mjs} +12 -4
- package/dist/{chunk-SHDJA4GG.mjs → chunk-6MIA3KYY.mjs} +2 -2
- package/dist/{chunk-ZGIN2OAY.mjs → chunk-6VMGUTN6.mjs} +3 -3
- package/dist/{chunk-CMNCGACY.mjs → chunk-I5H5RDWS.mjs} +23 -8
- package/dist/{chunk-LWEVOVRD.mjs → chunk-J6FIO3RO.mjs} +35 -30
- package/dist/{chunk-GMKSBLNY.js → chunk-L3O54VR6.js} +13 -5
- package/dist/{chunk-YVRX3F6S.js → chunk-OSWTWMAK.js} +10 -5
- package/dist/{chunk-SRAG3FST.js → chunk-P2X2S444.js} +7 -7
- package/dist/{chunk-6JBFHYFM.js → chunk-SON7XE3T.js} +56 -41
- package/dist/{chunk-2A4NRLSY.js → chunk-UVMAPQU7.js} +5 -5
- package/dist/{chunk-CQMHHQRN.mjs → chunk-XHTCHZVE.mjs} +1 -1
- package/dist/cli.js +8 -4
- package/dist/cli.mjs +8 -4
- package/dist/core.js +7 -7
- package/dist/core.mjs +1 -1
- package/dist/gulp.js +3 -3
- package/dist/gulp.mjs +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +6 -6
- package/dist/vite.js +4 -4
- package/dist/vite.mjs +3 -3
- package/dist/webpack.js +5 -5
- package/dist/webpack.mjs +4 -4
- package/dist/webpack4.js +32 -32
- package/dist/webpack4.mjs +3 -3
- package/package.json +4 -4
package/dist/gulp.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XHTCHZVE.mjs";
|
|
4
4
|
import "./chunk-76S2EME4.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-J6FIO3RO.mjs";
|
|
6
6
|
import "./chunk-AYJ4HLWZ.mjs";
|
|
7
7
|
import "./chunk-XAKAD2CR.mjs";
|
|
8
8
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk2PFYPSPOjs = require('./chunk-2PFYPSPO.js');
|
|
5
|
+
require('./chunk-UVMAPQU7.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkP2X2S444js = require('./chunk-P2X2S444.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-
|
|
11
|
+
var _chunkSON7XE3Tjs = require('./chunk-SON7XE3T.js');
|
|
12
|
+
require('./chunk-L3O54VR6.js');
|
|
13
13
|
require('./chunk-OF6MFURR.js');
|
|
14
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-OSWTWMAK.js');
|
|
15
15
|
require('./chunk-NIS74SI6.js');
|
|
16
16
|
require('./chunk-A5PB4KZT.js');
|
|
17
17
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -21,4 +21,4 @@ require('./chunk-ONLKZIRQ.js');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
24
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkSON7XE3Tjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunk2PFYPSPOjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkP2X2S444js.createPlugins; exports.weappTailwindcssPackageDir = _chunk2PFYPSPOjs.weappTailwindcssPackageDir;
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-6VMGUTN6.mjs";
|
|
5
|
+
import "./chunk-6MIA3KYY.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XHTCHZVE.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-I5H5RDWS.mjs";
|
|
12
|
+
import "./chunk-3VQKDHGP.mjs";
|
|
13
13
|
import "./chunk-76S2EME4.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-J6FIO3RO.mjs";
|
|
15
15
|
import "./chunk-AYJ4HLWZ.mjs";
|
|
16
16
|
import "./chunk-XAKAD2CR.mjs";
|
|
17
17
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/vite.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkSON7XE3Tjs = require('./chunk-SON7XE3T.js');
|
|
4
|
+
require('./chunk-L3O54VR6.js');
|
|
5
5
|
require('./chunk-OF6MFURR.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-OSWTWMAK.js');
|
|
7
7
|
require('./chunk-NIS74SI6.js');
|
|
8
8
|
require('./chunk-A5PB4KZT.js');
|
|
9
9
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -11,4 +11,4 @@ require('./chunk-ONLKZIRQ.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
14
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkSON7XE3Tjs.UnifiedViteWeappTailwindcssPlugin; exports.weappTailwindcss = _chunkSON7XE3Tjs.UnifiedViteWeappTailwindcssPlugin;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedViteWeappTailwindcssPlugin
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I5H5RDWS.mjs";
|
|
4
|
+
import "./chunk-3VQKDHGP.mjs";
|
|
5
5
|
import "./chunk-76S2EME4.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-J6FIO3RO.mjs";
|
|
7
7
|
import "./chunk-AYJ4HLWZ.mjs";
|
|
8
8
|
import "./chunk-XAKAD2CR.mjs";
|
|
9
9
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/webpack.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunk2PFYPSPOjs = require('./chunk-2PFYPSPO.js');
|
|
5
|
+
require('./chunk-UVMAPQU7.js');
|
|
6
|
+
require('./chunk-L3O54VR6.js');
|
|
7
7
|
require('./chunk-OF6MFURR.js');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-OSWTWMAK.js');
|
|
9
9
|
require('./chunk-NIS74SI6.js');
|
|
10
10
|
require('./chunk-A5PB4KZT.js');
|
|
11
11
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -14,4 +14,4 @@ require('./chunk-ONLKZIRQ.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.UnifiedWebpackPluginV5 =
|
|
17
|
+
exports.UnifiedWebpackPluginV5 = _chunk2PFYPSPOjs.UnifiedWebpackPluginV5; exports.weappTailwindcss = _chunk2PFYPSPOjs.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunk2PFYPSPOjs.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-6VMGUTN6.mjs";
|
|
5
|
+
import "./chunk-6MIA3KYY.mjs";
|
|
6
|
+
import "./chunk-3VQKDHGP.mjs";
|
|
7
7
|
import "./chunk-76S2EME4.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-J6FIO3RO.mjs";
|
|
9
9
|
import "./chunk-AYJ4HLWZ.mjs";
|
|
10
10
|
import "./chunk-XAKAD2CR.mjs";
|
|
11
11
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/webpack4.js
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkUVMAPQU7js = require('./chunk-UVMAPQU7.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkL3O54VR6js = require('./chunk-L3O54VR6.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
|
|
@@ -28,7 +28,7 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkOSWTWMAKjs = require('./chunk-OSWTWMAK.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
var _chunkNIS74SI6js = require('./chunk-NIS74SI6.js');
|
|
@@ -67,7 +67,7 @@ function setupWebpackV4EmitHook(options) {
|
|
|
67
67
|
debug: debug2
|
|
68
68
|
} = options;
|
|
69
69
|
const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
70
|
-
compiler.hooks.emit.tapPromise(
|
|
70
|
+
compiler.hooks.emit.tapPromise(_chunkOSWTWMAKjs.pluginName, async (compilation) => {
|
|
71
71
|
await runtimeState.patchPromise;
|
|
72
72
|
compilerOptions.onStart();
|
|
73
73
|
debug2("start");
|
|
@@ -77,20 +77,20 @@ function setupWebpackV4EmitHook(options) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
const assetCompilation = toWebpackV4AssetCompilation(compilation);
|
|
80
|
-
const assetHashByChunk =
|
|
80
|
+
const assetHashByChunk = _chunkUVMAPQU7js.createAssetHashByChunkMap.call(void 0, compilation.chunks);
|
|
81
81
|
const assets = assetCompilation.assets;
|
|
82
82
|
const entries = Object.entries(assets);
|
|
83
83
|
const outputDir = _optionalChain([compiler, 'access', _ => _.options, 'optionalAccess', _2 => _2.output, 'optionalAccess', _3 => _3.path]) ? _path2.default.resolve(compiler.options.output.path) : _process2.default.cwd();
|
|
84
84
|
const jsAssets = /* @__PURE__ */ new Map();
|
|
85
85
|
for (const [file] of entries) {
|
|
86
86
|
if (compilerOptions.jsMatcher(file) || compilerOptions.wxsMatcher(file)) {
|
|
87
|
-
const absolute =
|
|
87
|
+
const absolute = _chunkL3O54VR6js.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
88
88
|
jsAssets.set(absolute, file);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
const moduleGraphOptions = {
|
|
92
92
|
resolve(specifier, importer) {
|
|
93
|
-
return
|
|
93
|
+
return _chunkL3O54VR6js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
|
|
94
94
|
},
|
|
95
95
|
load: (id) => {
|
|
96
96
|
const assetName = jsAssets.get(id);
|
|
@@ -152,7 +152,7 @@ function setupWebpackV4EmitHook(options) {
|
|
|
152
152
|
return created;
|
|
153
153
|
};
|
|
154
154
|
const staleClassNameFallback = resolveWebpackStaleClassNameFallback(compilerOptions.staleClassNameFallback, compiler);
|
|
155
|
-
const runtimeSet = await
|
|
155
|
+
const runtimeSet = await _chunkOSWTWMAKjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
156
156
|
// webpack 的 script-only 热更新可能不会触发 runtime classset loader,
|
|
157
157
|
// 这里强制收集可避免沿用上轮 class set,保证 JS 仅按最新集合精确命中。
|
|
158
158
|
forceCollect: true,
|
|
@@ -198,13 +198,13 @@ function setupWebpackV4EmitHook(options) {
|
|
|
198
198
|
const jsTaskFactories = [];
|
|
199
199
|
if (Array.isArray(groupedEntries.js)) {
|
|
200
200
|
for (const [file] of groupedEntries.js) {
|
|
201
|
-
const cacheKey =
|
|
201
|
+
const cacheKey = _chunkUVMAPQU7js.getCacheKey.call(void 0, file);
|
|
202
202
|
const assetSource = assetCompilation.assets[file];
|
|
203
203
|
if (!assetSource) {
|
|
204
204
|
continue;
|
|
205
205
|
}
|
|
206
206
|
const initialRawSource = readWebpackV4AssetSource(assetSource);
|
|
207
|
-
const absoluteFile =
|
|
207
|
+
const absoluteFile = _chunkL3O54VR6js.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
208
208
|
const chunkHash = assetHashByChunk.get(file);
|
|
209
209
|
const sourceAwareHash = chunkHash ? `${chunkHash}:${compilerOptions.cache.computeHash(initialRawSource)}` : void 0;
|
|
210
210
|
jsTaskFactories.push(async () => {
|
|
@@ -232,7 +232,7 @@ function setupWebpackV4EmitHook(options) {
|
|
|
232
232
|
sourceFilename: absoluteFile
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
if (
|
|
235
|
+
if (_chunkOSWTWMAKjs.shouldSkipJsTransform.call(void 0, currentSource, handlerOptions)) {
|
|
236
236
|
return { result: new (0, _webpacksources.ConcatSource)(currentSource) };
|
|
237
237
|
}
|
|
238
238
|
const { code, linked } = await compilerOptions.jsHandler(currentSource, runtimeSet, handlerOptions);
|
|
@@ -281,7 +281,7 @@ function setupWebpackV4EmitHook(options) {
|
|
|
281
281
|
);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
_chunkL3O54VR6js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
|
|
285
285
|
await Promise.all(tasks);
|
|
286
286
|
debug2("end");
|
|
287
287
|
compilerOptions.onEnd();
|
|
@@ -304,9 +304,9 @@ function setupWebpackV4Loaders(options) {
|
|
|
304
304
|
getClassSetInLoader,
|
|
305
305
|
debug: debug2
|
|
306
306
|
} = options;
|
|
307
|
-
const isMpxApp =
|
|
307
|
+
const isMpxApp = _chunkUVMAPQU7js.isMpx.call(void 0, appType);
|
|
308
308
|
if (shouldRewriteCssImports && isMpxApp) {
|
|
309
|
-
|
|
309
|
+
_chunkUVMAPQU7js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
|
|
310
310
|
}
|
|
311
311
|
const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
|
|
312
312
|
const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
|
|
@@ -319,12 +319,12 @@ function setupWebpackV4Loaders(options) {
|
|
|
319
319
|
const classSetLoaderOptions = {
|
|
320
320
|
getClassSet: getClassSetInLoader
|
|
321
321
|
};
|
|
322
|
-
const { findRewriteAnchor, findClassSetAnchor } =
|
|
322
|
+
const { findRewriteAnchor, findClassSetAnchor } = _chunkUVMAPQU7js.createLoaderAnchorFinders.call(void 0, appType);
|
|
323
323
|
const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
|
|
324
324
|
rewriteCssImports: runtimeLoaderRewriteOptions
|
|
325
325
|
} : void 0;
|
|
326
326
|
if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
|
|
327
|
-
|
|
327
|
+
_chunkUVMAPQU7js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
|
|
328
328
|
}
|
|
329
329
|
const createRuntimeClassSetLoaderEntry = () => ({
|
|
330
330
|
loader: runtimeClassSetLoader,
|
|
@@ -343,19 +343,19 @@ function setupWebpackV4Loaders(options) {
|
|
|
343
343
|
type: null
|
|
344
344
|
};
|
|
345
345
|
};
|
|
346
|
-
compiler.hooks.compilation.tap(
|
|
347
|
-
compilation.hooks.normalModuleLoader.tap(
|
|
346
|
+
compiler.hooks.compilation.tap(_chunkOSWTWMAKjs.pluginName, (compilation) => {
|
|
347
|
+
compilation.hooks.normalModuleLoader.tap(_chunkOSWTWMAKjs.pluginName, (_loaderContext, module) => {
|
|
348
348
|
const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
|
|
349
349
|
if (!hasRuntimeLoader) {
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
|
-
if (shouldRewriteCssImports &&
|
|
353
|
-
|
|
352
|
+
if (shouldRewriteCssImports && _chunkUVMAPQU7js.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
|
|
353
|
+
_chunkUVMAPQU7js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
|
|
354
354
|
}
|
|
355
355
|
const loaderEntries = module.loaders || [];
|
|
356
356
|
let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
357
357
|
const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
|
|
358
|
-
const isCssModule =
|
|
358
|
+
const isCssModule = _chunkUVMAPQU7js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
|
|
359
359
|
if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
|
|
360
360
|
debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
|
|
361
361
|
}
|
|
@@ -389,7 +389,7 @@ function setupWebpackV4Loaders(options) {
|
|
|
389
389
|
rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
if (runtimeClassSetLoaderExists && !
|
|
392
|
+
if (runtimeClassSetLoaderExists && !_chunkUVMAPQU7js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
|
|
393
393
|
const anchorIndex = findClassSetAnchor(loaderEntries);
|
|
394
394
|
if (anchorIndex === -1) {
|
|
395
395
|
anchorlessInsert(createRuntimeClassSetLoaderEntry(), "before");
|
|
@@ -403,11 +403,11 @@ function setupWebpackV4Loaders(options) {
|
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
// src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
|
|
406
|
-
var debug =
|
|
407
|
-
var weappTailwindcssPackageDir =
|
|
406
|
+
var debug = _chunkOSWTWMAKjs.createDebug.call(void 0, );
|
|
407
|
+
var weappTailwindcssPackageDir = _chunkL3O54VR6js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
|
|
408
408
|
var UnifiedWebpackPluginV4 = class {
|
|
409
409
|
constructor(options = {}) {
|
|
410
|
-
this.options =
|
|
410
|
+
this.options = _chunkOSWTWMAKjs.getCompilerContext.call(void 0, options);
|
|
411
411
|
this.appType = this.options.appType;
|
|
412
412
|
}
|
|
413
413
|
apply(compiler) {
|
|
@@ -420,22 +420,22 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
420
420
|
twPatcher: initialTwPatcher,
|
|
421
421
|
refreshTailwindcssPatcher
|
|
422
422
|
} = this.options;
|
|
423
|
-
const disabledOptions =
|
|
423
|
+
const disabledOptions = _chunkL3O54VR6js.resolveDisabledOptions.call(void 0, disabled);
|
|
424
424
|
const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
|
|
425
425
|
const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
|
|
426
|
-
const isMpxApp =
|
|
426
|
+
const isMpxApp = _chunkUVMAPQU7js.isMpx.call(void 0, this.appType);
|
|
427
427
|
if (shouldRewriteCssImports) {
|
|
428
|
-
|
|
428
|
+
_chunkUVMAPQU7js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
|
|
429
429
|
pkgDir: weappTailwindcssPackageDir,
|
|
430
430
|
enabled: true,
|
|
431
431
|
appType: this.appType
|
|
432
432
|
});
|
|
433
|
-
|
|
433
|
+
_chunkUVMAPQU7js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
|
|
434
434
|
}
|
|
435
435
|
if (disabledOptions.plugin) {
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
|
-
const patchRecorderState =
|
|
438
|
+
const patchRecorderState = _chunkOSWTWMAKjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
|
|
439
439
|
source: "runtime",
|
|
440
440
|
cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
441
441
|
});
|
|
@@ -447,7 +447,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
447
447
|
};
|
|
448
448
|
let runtimeSetPrepared = false;
|
|
449
449
|
let runtimeSetSignature;
|
|
450
|
-
compiler.hooks.compilation.tap(
|
|
450
|
+
compiler.hooks.compilation.tap(_chunkOSWTWMAKjs.pluginName, () => {
|
|
451
451
|
runtimeSetPrepared = false;
|
|
452
452
|
});
|
|
453
453
|
async function getClassSetInLoader() {
|
|
@@ -457,7 +457,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
457
457
|
const signature = _chunkNIS74SI6js.getRuntimeClassSetSignature.call(void 0, runtimeState.twPatcher);
|
|
458
458
|
const forceRefresh = signature !== runtimeSetSignature;
|
|
459
459
|
runtimeSetPrepared = true;
|
|
460
|
-
await
|
|
460
|
+
await _chunkOSWTWMAKjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
461
461
|
forceRefresh,
|
|
462
462
|
forceCollect: true,
|
|
463
463
|
clearCache: forceRefresh,
|
package/dist/webpack4.mjs
CHANGED
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
isMpx,
|
|
11
11
|
patchMpxLoaderResolve,
|
|
12
12
|
setupMpxTailwindcssRedirect
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6MIA3KYY.mjs";
|
|
14
14
|
import {
|
|
15
15
|
pushConcurrentTaskFactories,
|
|
16
16
|
resolveDisabledOptions,
|
|
17
17
|
resolveOutputSpecifier,
|
|
18
18
|
resolvePackageDir,
|
|
19
19
|
toAbsoluteOutputPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3VQKDHGP.mjs";
|
|
21
21
|
import {
|
|
22
22
|
processCachedTask
|
|
23
23
|
} from "./chunk-76S2EME4.mjs";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
pluginName,
|
|
29
29
|
setupPatchRecorder,
|
|
30
30
|
shouldSkipJsTransform
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-J6FIO3RO.mjs";
|
|
32
32
|
import {
|
|
33
33
|
getRuntimeClassSetSignature
|
|
34
34
|
} from "./chunk-AYJ4HLWZ.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "4.12.0-alpha.
|
|
3
|
+
"version": "4.12.0-alpha.3",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -186,10 +186,10 @@
|
|
|
186
186
|
"tailwindcss-patch": "9.0.0",
|
|
187
187
|
"webpack-sources": "3.3.4",
|
|
188
188
|
"yaml": "^2.8.3",
|
|
189
|
-
"@weapp-tailwindcss/postcss": "2.2.0-alpha.1",
|
|
190
189
|
"@weapp-tailwindcss/logger": "1.1.0",
|
|
191
|
-
"@weapp-tailwindcss/
|
|
192
|
-
"@weapp-tailwindcss/shared": "1.1.3"
|
|
190
|
+
"@weapp-tailwindcss/postcss": "2.2.0-alpha.1",
|
|
191
|
+
"@weapp-tailwindcss/shared": "1.1.3",
|
|
192
|
+
"@weapp-tailwindcss/reset": "0.1.0-next.0"
|
|
193
193
|
},
|
|
194
194
|
"devDependencies": {
|
|
195
195
|
"fast-check": "^4.7.0"
|