weapp-tailwindcss 4.7.0 → 4.7.2
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-Q5TPAJI4.js → chunk-2SI3KT2H.js} +7 -6
- package/dist/{chunk-IY2OKZE6.mjs → chunk-3ARXMTWC.mjs} +21 -8
- package/dist/{chunk-D7SF52F6.mjs → chunk-5BW6X6AJ.mjs} +42 -36
- package/dist/chunk-667CYXAH.mjs +133 -0
- package/dist/chunk-BUMQQPAO.js +133 -0
- package/dist/{chunk-W3JU6K3T.js → chunk-FPDJ3BCM.js} +260 -108
- package/dist/{chunk-BAXZHBSU.js → chunk-GNWJEIZZ.js} +92 -77
- package/dist/{chunk-7TKAJ3P6.mjs → chunk-JYCQWWYU.mjs} +257 -105
- package/dist/{chunk-NRG7N2Q7.mjs → chunk-KZJLIZIK.mjs} +0 -1
- package/dist/{chunk-34T2BFTJ.mjs → chunk-KZUIVLPP.mjs} +42 -1
- package/dist/{chunk-C3CG4UUY.js → chunk-OPTIAB5G.js} +21 -8
- package/dist/{chunk-BTOCLUJ4.mjs → chunk-Q6PLZCM6.mjs} +6 -5
- package/dist/{chunk-CCMDCC3N.js → chunk-QZRXYCOQ.js} +49 -43
- package/dist/{chunk-WVKK6TBL.js → chunk-W7BVY5S5.js} +42 -1
- package/dist/{chunk-LZ6L3UQO.js → chunk-WXBFAARR.js} +0 -1
- package/dist/{chunk-KSXOBEXQ.mjs → chunk-Z2H7M33Z.mjs} +83 -68
- package/dist/cli.js +6 -6
- package/dist/cli.mjs +3 -3
- package/dist/core.js +10 -9
- package/dist/core.mjs +10 -9
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +1 -1
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +1 -1
- package/dist/types.d.mts +2 -21
- package/dist/types.d.ts +2 -21
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +6 -6
- package/dist/webpack.js +7 -7
- package/dist/webpack.mjs +6 -6
- package/dist/webpack4.js +51 -45
- package/dist/webpack4.mjs +44 -38
- package/package.json +4 -4
- package/dist/chunk-FB5P4TRH.js +0 -70
- package/dist/chunk-YPBRGP6K.mjs +0 -70
package/dist/gulp.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q6PLZCM6.mjs";
|
|
4
4
|
import "./chunk-RRHPTTCP.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-667CYXAH.mjs";
|
|
6
|
+
import "./chunk-JYCQWWYU.mjs";
|
|
7
7
|
import "./chunk-VSRDBMDB.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3ARXMTWC.mjs";
|
|
9
|
+
import "./chunk-KZJLIZIK.mjs";
|
|
10
10
|
import "./chunk-ZNKIYZRQ.mjs";
|
|
11
11
|
import "./chunk-4EUTRMUC.mjs";
|
|
12
12
|
export {
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-O2IOQ3BD.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQZRXYCOQjs = require('./chunk-QZRXYCOQ.js');
|
|
5
5
|
require('./chunk-6GP37C26.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2SI3KT2Hjs = require('./chunk-2SI3KT2H.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-
|
|
11
|
+
var _chunkGNWJEIZZjs = require('./chunk-GNWJEIZZ.js');
|
|
12
|
+
require('./chunk-W7BVY5S5.js');
|
|
13
13
|
require('./chunk-LTJQUORK.js');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-BUMQQPAO.js');
|
|
15
|
+
require('./chunk-FPDJ3BCM.js');
|
|
16
16
|
require('./chunk-DWAEHRHN.js');
|
|
17
|
-
require('./chunk-
|
|
18
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-OPTIAB5G.js');
|
|
18
|
+
require('./chunk-WXBFAARR.js');
|
|
19
19
|
require('./chunk-UW3WHSZ5.js');
|
|
20
20
|
require('./chunk-QXSBMK2W.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
25
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkGNWJEIZZjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkQZRXYCOQjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunk2SI3KT2Hjs.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "./chunk-YAN7TO2B.mjs";
|
|
2
2
|
import {
|
|
3
3
|
UnifiedWebpackPluginV5
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5BW6X6AJ.mjs";
|
|
5
5
|
import "./chunk-2F7HOQQY.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Q6PLZCM6.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-Z2H7M33Z.mjs";
|
|
12
|
+
import "./chunk-KZUIVLPP.mjs";
|
|
13
13
|
import "./chunk-RRHPTTCP.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-667CYXAH.mjs";
|
|
15
|
+
import "./chunk-JYCQWWYU.mjs";
|
|
16
16
|
import "./chunk-VSRDBMDB.mjs";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-3ARXMTWC.mjs";
|
|
18
|
+
import "./chunk-KZJLIZIK.mjs";
|
|
19
19
|
import "./chunk-ZNKIYZRQ.mjs";
|
|
20
20
|
import "./chunk-4EUTRMUC.mjs";
|
|
21
21
|
export {
|
package/dist/presets.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkOXASK55Qjs = require('./chunk-OXASK55Q.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkOPTIAB5Gjs = require('./chunk-OPTIAB5G.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
|
|
@@ -56,7 +56,7 @@ function toCssEntries(entries) {
|
|
|
56
56
|
return Array.isArray(entries) ? entries : [entries];
|
|
57
57
|
}
|
|
58
58
|
function hbuilderx(options = {}) {
|
|
59
|
-
const baseDir =
|
|
59
|
+
const baseDir = _chunkOPTIAB5Gjs.resolveTailwindcssBasedir.call(void 0, options.base);
|
|
60
60
|
const cssEntries = toCssEntries(options.cssEntries);
|
|
61
61
|
const tailwindConfig = {
|
|
62
62
|
v2: {
|
package/dist/presets.mjs
CHANGED
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ParserOptions, ParseError } from '@babel/parser';
|
|
2
|
-
import { CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, PresetEnvOptions, LoadedPostcssOptions,
|
|
2
|
+
import { CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, PresetEnvOptions, LoadedPostcssOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
3
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
4
4
|
import { SourceMap } from 'magic-string';
|
|
5
5
|
import { Result, Root, Document } from 'postcss';
|
|
@@ -511,25 +511,6 @@ interface UserDefinedOptions {
|
|
|
511
511
|
*/
|
|
512
512
|
logLevel?: 'info' | 'warn' | 'error' | 'silent';
|
|
513
513
|
}
|
|
514
|
-
interface UserDefinedOptions {
|
|
515
|
-
/**
|
|
516
|
-
* 选择用于解析 JS 的 AST 工具。
|
|
517
|
-
*
|
|
518
|
-
* @group 4.即将废弃配置
|
|
519
|
-
* @remarks
|
|
520
|
-
* 默认使用 `babel`,安装 `@ast-grep/napi` 并设置为 `ast-grep` 可获得更快速度。
|
|
521
|
-
* :::danger
|
|
522
|
-
* 此配置将在 `5.x` 版本移除,后续仅保留 `babel` 实现。
|
|
523
|
-
* :::
|
|
524
|
-
*/
|
|
525
|
-
jsAstTool?: 'babel' | 'ast-grep';
|
|
526
|
-
/**
|
|
527
|
-
* 自定义 PostCSS 规则的处理回调。
|
|
528
|
-
*
|
|
529
|
-
* @group 4.即将废弃配置
|
|
530
|
-
*/
|
|
531
|
-
customRuleCallback?: CustomRuleCallback;
|
|
532
|
-
}
|
|
533
514
|
|
|
534
515
|
type ItemOrItemArray<T> = T | T[];
|
|
535
516
|
|
|
@@ -628,7 +609,7 @@ type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, 'supportCust
|
|
|
628
609
|
cache: ICreateCacheReturnType;
|
|
629
610
|
twPatcher: TailwindcssPatcherLike;
|
|
630
611
|
}>;
|
|
631
|
-
type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | 'cssPreflightRange' | '
|
|
612
|
+
type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | 'cssPreflightRange' | 'disabled'>;
|
|
632
613
|
interface IBaseWebpackPlugin {
|
|
633
614
|
options: InternalUserDefinedOptions;
|
|
634
615
|
appType?: AppType;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ParserOptions, ParseError } from '@babel/parser';
|
|
2
|
-
import { CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, PresetEnvOptions, LoadedPostcssOptions,
|
|
2
|
+
import { CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, PresetEnvOptions, LoadedPostcssOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
3
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
4
4
|
import { SourceMap } from 'magic-string';
|
|
5
5
|
import { Result, Root, Document } from 'postcss';
|
|
@@ -511,25 +511,6 @@ interface UserDefinedOptions {
|
|
|
511
511
|
*/
|
|
512
512
|
logLevel?: 'info' | 'warn' | 'error' | 'silent';
|
|
513
513
|
}
|
|
514
|
-
interface UserDefinedOptions {
|
|
515
|
-
/**
|
|
516
|
-
* 选择用于解析 JS 的 AST 工具。
|
|
517
|
-
*
|
|
518
|
-
* @group 4.即将废弃配置
|
|
519
|
-
* @remarks
|
|
520
|
-
* 默认使用 `babel`,安装 `@ast-grep/napi` 并设置为 `ast-grep` 可获得更快速度。
|
|
521
|
-
* :::danger
|
|
522
|
-
* 此配置将在 `5.x` 版本移除,后续仅保留 `babel` 实现。
|
|
523
|
-
* :::
|
|
524
|
-
*/
|
|
525
|
-
jsAstTool?: 'babel' | 'ast-grep';
|
|
526
|
-
/**
|
|
527
|
-
* 自定义 PostCSS 规则的处理回调。
|
|
528
|
-
*
|
|
529
|
-
* @group 4.即将废弃配置
|
|
530
|
-
*/
|
|
531
|
-
customRuleCallback?: CustomRuleCallback;
|
|
532
|
-
}
|
|
533
514
|
|
|
534
515
|
type ItemOrItemArray<T> = T | T[];
|
|
535
516
|
|
|
@@ -628,7 +609,7 @@ type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, 'supportCust
|
|
|
628
609
|
cache: ICreateCacheReturnType;
|
|
629
610
|
twPatcher: TailwindcssPatcherLike;
|
|
630
611
|
}>;
|
|
631
|
-
type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | 'cssPreflightRange' | '
|
|
612
|
+
type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | 'cssPreflightRange' | 'disabled'>;
|
|
632
613
|
interface IBaseWebpackPlugin {
|
|
633
614
|
options: InternalUserDefinedOptions;
|
|
634
615
|
appType?: AppType;
|
package/dist/vite.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkGNWJEIZZjs = require('./chunk-GNWJEIZZ.js');
|
|
4
|
+
require('./chunk-W7BVY5S5.js');
|
|
5
5
|
require('./chunk-LTJQUORK.js');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-BUMQQPAO.js');
|
|
7
|
+
require('./chunk-FPDJ3BCM.js');
|
|
8
8
|
require('./chunk-DWAEHRHN.js');
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-OPTIAB5G.js');
|
|
10
|
+
require('./chunk-WXBFAARR.js');
|
|
11
11
|
require('./chunk-UW3WHSZ5.js');
|
|
12
12
|
require('./chunk-QXSBMK2W.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
15
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkGNWJEIZZjs.UnifiedViteWeappTailwindcssPlugin;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedViteWeappTailwindcssPlugin
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Z2H7M33Z.mjs";
|
|
4
|
+
import "./chunk-KZUIVLPP.mjs";
|
|
5
5
|
import "./chunk-RRHPTTCP.mjs";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-667CYXAH.mjs";
|
|
7
|
+
import "./chunk-JYCQWWYU.mjs";
|
|
8
8
|
import "./chunk-VSRDBMDB.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3ARXMTWC.mjs";
|
|
10
|
+
import "./chunk-KZJLIZIK.mjs";
|
|
11
11
|
import "./chunk-ZNKIYZRQ.mjs";
|
|
12
12
|
import "./chunk-4EUTRMUC.mjs";
|
|
13
13
|
export {
|
package/dist/webpack.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQZRXYCOQjs = require('./chunk-QZRXYCOQ.js');
|
|
4
4
|
require('./chunk-6GP37C26.js');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-W7BVY5S5.js');
|
|
6
6
|
require('./chunk-LTJQUORK.js');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-BUMQQPAO.js');
|
|
8
|
+
require('./chunk-FPDJ3BCM.js');
|
|
9
9
|
require('./chunk-DWAEHRHN.js');
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-OPTIAB5G.js');
|
|
11
|
+
require('./chunk-WXBFAARR.js');
|
|
12
12
|
require('./chunk-UW3WHSZ5.js');
|
|
13
13
|
require('./chunk-QXSBMK2W.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.UnifiedWebpackPluginV5 =
|
|
16
|
+
exports.UnifiedWebpackPluginV5 = _chunkQZRXYCOQjs.UnifiedWebpackPluginV5;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5BW6X6AJ.mjs";
|
|
4
4
|
import "./chunk-2F7HOQQY.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-KZUIVLPP.mjs";
|
|
6
6
|
import "./chunk-RRHPTTCP.mjs";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-667CYXAH.mjs";
|
|
8
|
+
import "./chunk-JYCQWWYU.mjs";
|
|
9
9
|
import "./chunk-VSRDBMDB.mjs";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3ARXMTWC.mjs";
|
|
11
|
+
import "./chunk-KZJLIZIK.mjs";
|
|
12
12
|
import "./chunk-ZNKIYZRQ.mjs";
|
|
13
13
|
import "./chunk-4EUTRMUC.mjs";
|
|
14
14
|
export {
|
package/dist/webpack4.js
CHANGED
|
@@ -4,21 +4,23 @@ var _chunk6GP37C26js = require('./chunk-6GP37C26.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
var _chunkW7BVY5S5js = require('./chunk-W7BVY5S5.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
var _chunkBUMQQPAOjs = require('./chunk-BUMQQPAO.js');
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _chunkFPDJ3BCMjs = require('./chunk-FPDJ3BCM.js');
|
|
19
21
|
require('./chunk-DWAEHRHN.js');
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-OPTIAB5G.js');
|
|
23
|
+
require('./chunk-WXBFAARR.js');
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
|
|
@@ -29,10 +31,10 @@ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
|
29
31
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
30
32
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
31
33
|
var _webpacksources = require('webpack-sources');
|
|
32
|
-
var debug =
|
|
34
|
+
var debug = _chunkBUMQQPAOjs.createDebug.call(void 0, );
|
|
33
35
|
var UnifiedWebpackPluginV4 = class {
|
|
34
36
|
constructor(options = {}) {
|
|
35
|
-
this.options =
|
|
37
|
+
this.options = _chunkFPDJ3BCMjs.getCompilerContext.call(void 0, options);
|
|
36
38
|
this.appType = this.options.appType;
|
|
37
39
|
}
|
|
38
40
|
apply(compiler) {
|
|
@@ -53,10 +55,10 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
53
55
|
if (disabled) {
|
|
54
56
|
return;
|
|
55
57
|
}
|
|
56
|
-
const patchPromise =
|
|
58
|
+
const patchPromise = _chunkBUMQQPAOjs.createTailwindPatchPromise.call(void 0, twPatcher);
|
|
57
59
|
async function getClassSetInLoader() {
|
|
58
60
|
await patchPromise;
|
|
59
|
-
await
|
|
61
|
+
await _chunkBUMQQPAOjs.collectRuntimeClassSet.call(void 0, twPatcher, { force: true });
|
|
60
62
|
}
|
|
61
63
|
onLoad();
|
|
62
64
|
const loader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-loader.js")));
|
|
@@ -69,8 +71,8 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
69
71
|
ident: null,
|
|
70
72
|
type: null
|
|
71
73
|
};
|
|
72
|
-
compiler.hooks.compilation.tap(
|
|
73
|
-
compilation.hooks.normalModuleLoader.tap(
|
|
74
|
+
compiler.hooks.compilation.tap(_chunkFPDJ3BCMjs.pluginName, (compilation) => {
|
|
75
|
+
compilation.hooks.normalModuleLoader.tap(_chunkFPDJ3BCMjs.pluginName, (_loaderContext, module) => {
|
|
74
76
|
if (isExisted) {
|
|
75
77
|
const idx = module.loaders.findIndex((x) => x.loader.includes("postcss-loader"));
|
|
76
78
|
if (idx > -1) {
|
|
@@ -79,7 +81,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
79
81
|
}
|
|
80
82
|
});
|
|
81
83
|
});
|
|
82
|
-
compiler.hooks.emit.tapPromise(
|
|
84
|
+
compiler.hooks.emit.tapPromise(_chunkFPDJ3BCMjs.pluginName, async (compilation) => {
|
|
83
85
|
await patchPromise;
|
|
84
86
|
onStart();
|
|
85
87
|
debug("start");
|
|
@@ -94,13 +96,13 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
94
96
|
const jsAssets = /* @__PURE__ */ new Map();
|
|
95
97
|
for (const [file] of entries) {
|
|
96
98
|
if (this.options.jsMatcher(file) || this.options.wxsMatcher(file)) {
|
|
97
|
-
const absolute =
|
|
99
|
+
const absolute = _chunkW7BVY5S5js.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
98
100
|
jsAssets.set(absolute, file);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
const moduleGraphOptions = {
|
|
102
104
|
resolve(specifier, importer) {
|
|
103
|
-
return
|
|
105
|
+
return _chunkW7BVY5S5js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
|
|
104
106
|
},
|
|
105
107
|
load: (id) => {
|
|
106
108
|
const assetName = jsAssets.get(id);
|
|
@@ -143,7 +145,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
143
145
|
}
|
|
144
146
|
};
|
|
145
147
|
const groupedEntries = _chunkUW3WHSZ5js.getGroupedEntries.call(void 0, entries, this.options);
|
|
146
|
-
const runtimeSet = await
|
|
148
|
+
const runtimeSet = await _chunkBUMQQPAOjs.collectRuntimeClassSet.call(void 0, twPatcher, { force: true });
|
|
147
149
|
debug("get runtimeSet, class count: %d", runtimeSet.size);
|
|
148
150
|
const tasks = [];
|
|
149
151
|
if (Array.isArray(groupedEntries.html)) {
|
|
@@ -177,6 +179,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
177
179
|
);
|
|
178
180
|
}
|
|
179
181
|
}
|
|
182
|
+
const jsTaskFactories = [];
|
|
180
183
|
if (Array.isArray(groupedEntries.js)) {
|
|
181
184
|
for (const [file] of groupedEntries.js) {
|
|
182
185
|
const cacheKey = _chunk6GP37C26js.getCacheKey.call(void 0, file);
|
|
@@ -186,36 +189,38 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
186
189
|
}
|
|
187
190
|
const initialValue = assetSource.source();
|
|
188
191
|
const initialRawSource = typeof initialValue === "string" ? initialValue : initialValue.toString();
|
|
189
|
-
const absoluteFile =
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
192
|
+
const absoluteFile = _chunkW7BVY5S5js.toAbsoluteOutputPath.call(void 0, file, outputDir);
|
|
193
|
+
jsTaskFactories.push(async () => {
|
|
194
|
+
await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
|
|
195
|
+
cache,
|
|
196
|
+
cacheKey,
|
|
197
|
+
rawSource: initialRawSource,
|
|
198
|
+
applyResult(source) {
|
|
199
|
+
compilation.updateAsset(file, source);
|
|
200
|
+
},
|
|
201
|
+
onCacheHit() {
|
|
202
|
+
debug("js cache hit: %s", file);
|
|
203
|
+
},
|
|
204
|
+
transform: async () => {
|
|
205
|
+
const currentAsset = compilation.assets[file];
|
|
206
|
+
const currentValue = _optionalChain([currentAsset, 'optionalAccess', _4 => _4.source, 'call', _5 => _5()]);
|
|
207
|
+
const currentSource = typeof currentValue === "string" ? currentValue : _nullishCoalesce(_optionalChain([currentValue, 'optionalAccess', _6 => _6.toString, 'call', _7 => _7()]), () => ( ""));
|
|
208
|
+
const { code, linked } = await jsHandler(currentSource, runtimeSet, {
|
|
209
|
+
filename: absoluteFile,
|
|
210
|
+
moduleGraph: moduleGraphOptions,
|
|
211
|
+
babelParserOptions: {
|
|
212
|
+
sourceFilename: absoluteFile
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
const source = new (0, _webpacksources.ConcatSource)(code);
|
|
216
|
+
onUpdate(file, currentSource, code);
|
|
217
|
+
debug("js handle: %s", file);
|
|
218
|
+
applyLinkedResults(linked);
|
|
219
|
+
return {
|
|
220
|
+
result: source
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
219
224
|
});
|
|
220
225
|
}
|
|
221
226
|
}
|
|
@@ -257,6 +262,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
257
262
|
);
|
|
258
263
|
}
|
|
259
264
|
}
|
|
265
|
+
_chunkW7BVY5S5js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
|
|
260
266
|
await Promise.all(tasks);
|
|
261
267
|
debug("end");
|
|
262
268
|
onEnd();
|
package/dist/webpack4.mjs
CHANGED
|
@@ -2,23 +2,25 @@ import {
|
|
|
2
2
|
getCacheKey
|
|
3
3
|
} from "./chunk-2F7HOQQY.mjs";
|
|
4
4
|
import {
|
|
5
|
+
pushConcurrentTaskFactories,
|
|
5
6
|
resolveOutputSpecifier,
|
|
6
7
|
toAbsoluteOutputPath
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KZUIVLPP.mjs";
|
|
8
9
|
import {
|
|
9
10
|
processCachedTask
|
|
10
11
|
} from "./chunk-RRHPTTCP.mjs";
|
|
11
12
|
import {
|
|
12
13
|
collectRuntimeClassSet,
|
|
13
|
-
createDebug
|
|
14
|
-
|
|
14
|
+
createDebug,
|
|
15
|
+
createTailwindPatchPromise
|
|
16
|
+
} from "./chunk-667CYXAH.mjs";
|
|
15
17
|
import {
|
|
16
18
|
getCompilerContext,
|
|
17
19
|
pluginName
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JYCQWWYU.mjs";
|
|
19
21
|
import "./chunk-VSRDBMDB.mjs";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-3ARXMTWC.mjs";
|
|
23
|
+
import "./chunk-KZJLIZIK.mjs";
|
|
22
24
|
import {
|
|
23
25
|
getGroupedEntries
|
|
24
26
|
} from "./chunk-ZNKIYZRQ.mjs";
|
|
@@ -55,10 +57,10 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
55
57
|
if (disabled) {
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
|
-
const patchPromise =
|
|
60
|
+
const patchPromise = createTailwindPatchPromise(twPatcher);
|
|
59
61
|
async function getClassSetInLoader() {
|
|
60
62
|
await patchPromise;
|
|
61
|
-
await collectRuntimeClassSet(twPatcher);
|
|
63
|
+
await collectRuntimeClassSet(twPatcher, { force: true });
|
|
62
64
|
}
|
|
63
65
|
onLoad();
|
|
64
66
|
const loader = runtimeLoaderPath ?? path.resolve(__dirname, "./weapp-tw-runtime-loader.js");
|
|
@@ -145,7 +147,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
145
147
|
}
|
|
146
148
|
};
|
|
147
149
|
const groupedEntries = getGroupedEntries(entries, this.options);
|
|
148
|
-
const runtimeSet = await collectRuntimeClassSet(twPatcher);
|
|
150
|
+
const runtimeSet = await collectRuntimeClassSet(twPatcher, { force: true });
|
|
149
151
|
debug("get runtimeSet, class count: %d", runtimeSet.size);
|
|
150
152
|
const tasks = [];
|
|
151
153
|
if (Array.isArray(groupedEntries.html)) {
|
|
@@ -179,6 +181,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
179
181
|
);
|
|
180
182
|
}
|
|
181
183
|
}
|
|
184
|
+
const jsTaskFactories = [];
|
|
182
185
|
if (Array.isArray(groupedEntries.js)) {
|
|
183
186
|
for (const [file] of groupedEntries.js) {
|
|
184
187
|
const cacheKey = getCacheKey(file);
|
|
@@ -189,35 +192,37 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
189
192
|
const initialValue = assetSource.source();
|
|
190
193
|
const initialRawSource = typeof initialValue === "string" ? initialValue : initialValue.toString();
|
|
191
194
|
const absoluteFile = toAbsoluteOutputPath(file, outputDir);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
195
|
+
jsTaskFactories.push(async () => {
|
|
196
|
+
await processCachedTask({
|
|
197
|
+
cache,
|
|
198
|
+
cacheKey,
|
|
199
|
+
rawSource: initialRawSource,
|
|
200
|
+
applyResult(source) {
|
|
201
|
+
compilation.updateAsset(file, source);
|
|
202
|
+
},
|
|
203
|
+
onCacheHit() {
|
|
204
|
+
debug("js cache hit: %s", file);
|
|
205
|
+
},
|
|
206
|
+
transform: async () => {
|
|
207
|
+
const currentAsset = compilation.assets[file];
|
|
208
|
+
const currentValue = currentAsset?.source();
|
|
209
|
+
const currentSource = typeof currentValue === "string" ? currentValue : currentValue?.toString() ?? "";
|
|
210
|
+
const { code, linked } = await jsHandler(currentSource, runtimeSet, {
|
|
211
|
+
filename: absoluteFile,
|
|
212
|
+
moduleGraph: moduleGraphOptions,
|
|
213
|
+
babelParserOptions: {
|
|
214
|
+
sourceFilename: absoluteFile
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const source = new ConcatSource(code);
|
|
218
|
+
onUpdate(file, currentSource, code);
|
|
219
|
+
debug("js handle: %s", file);
|
|
220
|
+
applyLinkedResults(linked);
|
|
221
|
+
return {
|
|
222
|
+
result: source
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
});
|
|
221
226
|
});
|
|
222
227
|
}
|
|
223
228
|
}
|
|
@@ -259,6 +264,7 @@ var UnifiedWebpackPluginV4 = class {
|
|
|
259
264
|
);
|
|
260
265
|
}
|
|
261
266
|
}
|
|
267
|
+
pushConcurrentTaskFactories(tasks, jsTaskFactories);
|
|
262
268
|
await Promise.all(tasks);
|
|
263
269
|
debug("end");
|
|
264
270
|
onEnd();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.2",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -175,9 +175,9 @@
|
|
|
175
175
|
"semver": "~7.7.3",
|
|
176
176
|
"tailwindcss-patch": "^8.2.1",
|
|
177
177
|
"webpack-sources": "3.3.3",
|
|
178
|
-
"@weapp-tailwindcss/
|
|
179
|
-
"@weapp-tailwindcss/
|
|
180
|
-
"@weapp-tailwindcss/
|
|
178
|
+
"@weapp-tailwindcss/logger": "1.1.0",
|
|
179
|
+
"@weapp-tailwindcss/postcss": "2.0.1",
|
|
180
|
+
"@weapp-tailwindcss/shared": "1.1.0"
|
|
181
181
|
},
|
|
182
182
|
"scripts": {
|
|
183
183
|
"dev": "tsup --watch --sourcemap",
|