weapp-vite 1.8.3 → 1.9.0
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/{CompilerContext-J434RJfW.d.cts → CompilerContext-CXqr9z7E.d.cts} +2 -2
- package/dist/{CompilerContext-DCxTV9m_.d.ts → CompilerContext-DY3tiUDT.d.ts} +2 -2
- package/dist/auto-import-components/resolvers.cjs +213 -86
- package/dist/auto-import-components/resolvers.d.cts +5 -3
- package/dist/auto-import-components/resolvers.d.ts +5 -3
- package/dist/auto-import-components/resolvers.mjs +212 -85
- package/dist/{chunk-DC4L5OGS.mjs → chunk-C5NIG47R.mjs} +2 -2
- package/dist/cli.cjs +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/{config-D1TnAC7f.d.ts → config-C0N6oM5k.d.ts} +1 -1
- package/dist/{config-nZhQe_5k.d.cts → config-Cs01aZpF.d.cts} +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/json.d.cts +3 -3
- package/dist/json.d.ts +3 -3
- package/dist/types-D7SAXpSN.d.cts +19 -0
- package/dist/types-D7SAXpSN.d.ts +19 -0
- package/package.json +7 -7
- package/dist/types-Cvkpy1-u.d.cts +0 -8
- package/dist/types-Cvkpy1-u.d.ts +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PackageJson } from 'pkg-types';
|
|
2
2
|
import { RollupOutput, RollupWatcher } from 'rollup';
|
|
3
|
-
import {
|
|
4
|
-
import { P as ProjectConfig, E as Entry, A as AppEntry, S as SubPackageMetaValue, R as ResolvedAlias, M as MpPlatform, C as CompilerContextOptions, a as SubPackage } from './config-
|
|
3
|
+
import { a as ResolvedValue } from './types-D7SAXpSN.cjs';
|
|
4
|
+
import { P as ProjectConfig, E as Entry, A as AppEntry, S as SubPackageMetaValue, R as ResolvedAlias, M as MpPlatform, C as CompilerContextOptions, a as SubPackage } from './config-Cs01aZpF.cjs';
|
|
5
5
|
import { InlineConfig } from 'vite';
|
|
6
6
|
import { Options } from 'tsup';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PackageJson } from 'pkg-types';
|
|
2
2
|
import { RollupOutput, RollupWatcher } from 'rollup';
|
|
3
|
-
import {
|
|
4
|
-
import { P as ProjectConfig, E as Entry, A as AppEntry, S as SubPackageMetaValue, R as ResolvedAlias, M as MpPlatform, C as CompilerContextOptions, a as SubPackage } from './config-
|
|
3
|
+
import { a as ResolvedValue } from './types-D7SAXpSN.js';
|
|
4
|
+
import { P as ProjectConfig, E as Entry, A as AppEntry, S as SubPackageMetaValue, R as ResolvedAlias, M as MpPlatform, C as CompilerContextOptions, a as SubPackage } from './config-C0N6oM5k.js';
|
|
5
5
|
import { InlineConfig } from 'vite';
|
|
6
6
|
import { Options } from 'tsup';
|
|
7
7
|
|
|
@@ -20,95 +20,221 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/auto-import-components/resolvers/index.ts
|
|
21
21
|
var resolvers_exports = {};
|
|
22
22
|
__export(resolvers_exports, {
|
|
23
|
-
TDesignResolver: () => TDesignResolver
|
|
23
|
+
TDesignResolver: () => TDesignResolver,
|
|
24
|
+
VantResolver: () => VantResolver
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(resolvers_exports);
|
|
26
27
|
|
|
27
28
|
// src/auto-import-components/resolvers/tdesign.ts
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
29
|
+
var import_shared = require("@weapp-core/shared");
|
|
30
|
+
|
|
31
|
+
// src/auto-import-components/resolvers/json/tdesign.json
|
|
32
|
+
var tdesign_default = [
|
|
33
|
+
"action-sheet",
|
|
34
|
+
"avatar",
|
|
35
|
+
"avatar-group",
|
|
36
|
+
"back-top",
|
|
37
|
+
"badge",
|
|
38
|
+
"button",
|
|
39
|
+
"calendar",
|
|
40
|
+
"cascader",
|
|
41
|
+
"cell",
|
|
42
|
+
"cell-group",
|
|
43
|
+
"check-tag",
|
|
44
|
+
"checkbox",
|
|
45
|
+
"checkbox-group",
|
|
46
|
+
"col",
|
|
47
|
+
"collapse",
|
|
48
|
+
"collapse-panel",
|
|
49
|
+
"color-picker",
|
|
50
|
+
"count-down",
|
|
51
|
+
"date-time-picker",
|
|
52
|
+
"dialog",
|
|
53
|
+
"divider",
|
|
54
|
+
"drawer",
|
|
55
|
+
"dropdown-item",
|
|
56
|
+
"dropdown-menu",
|
|
57
|
+
"empty",
|
|
58
|
+
"fab",
|
|
59
|
+
"footer",
|
|
60
|
+
"grid",
|
|
61
|
+
"grid-item",
|
|
62
|
+
"guide",
|
|
63
|
+
"icon",
|
|
64
|
+
"image",
|
|
65
|
+
"image-viewer",
|
|
66
|
+
"indexes",
|
|
67
|
+
"indexes-anchor",
|
|
68
|
+
"input",
|
|
69
|
+
"link",
|
|
70
|
+
"loading",
|
|
71
|
+
"message",
|
|
72
|
+
"message-item",
|
|
73
|
+
"navbar",
|
|
74
|
+
"notice-bar",
|
|
75
|
+
"overlay",
|
|
76
|
+
"picker",
|
|
77
|
+
"picker-item",
|
|
78
|
+
"popup",
|
|
79
|
+
"progress",
|
|
80
|
+
"pull-down-refresh",
|
|
81
|
+
"radio",
|
|
82
|
+
"radio-group",
|
|
83
|
+
"rate",
|
|
84
|
+
"result",
|
|
85
|
+
"row",
|
|
86
|
+
"search",
|
|
87
|
+
"side-bar",
|
|
88
|
+
"side-bar-item",
|
|
89
|
+
"skeleton",
|
|
90
|
+
"slider",
|
|
91
|
+
"step-item",
|
|
92
|
+
"stepper",
|
|
93
|
+
"steps",
|
|
94
|
+
"sticky",
|
|
95
|
+
"swipe-cell",
|
|
96
|
+
"swiper",
|
|
97
|
+
"swiper-nav",
|
|
98
|
+
"switch",
|
|
99
|
+
"tab-bar",
|
|
100
|
+
"tab-bar-item",
|
|
101
|
+
"tab-panel",
|
|
102
|
+
"tabs",
|
|
103
|
+
"tag",
|
|
104
|
+
"textarea",
|
|
105
|
+
"toast",
|
|
106
|
+
"transition",
|
|
107
|
+
"tree-select",
|
|
108
|
+
"upload"
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
// src/auto-import-components/resolvers/tdesign.ts
|
|
112
|
+
var defaultPrefix = "t-";
|
|
113
|
+
var TDesignResolver = (opts) => {
|
|
114
|
+
const { prefix, resolve } = (0, import_shared.defu)(opts, {
|
|
115
|
+
prefix: defaultPrefix,
|
|
116
|
+
resolve({ name, prefix: prefix2 }) {
|
|
117
|
+
return {
|
|
118
|
+
key: `${prefix2}${name}`,
|
|
119
|
+
// 最后 + /index 似乎有问题
|
|
120
|
+
value: `tdesign-miniprogram/${name}/${name}`
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const map = tdesign_default.reduce((acc, cur) => {
|
|
125
|
+
const { key, value } = resolve({
|
|
126
|
+
name: cur,
|
|
127
|
+
prefix
|
|
128
|
+
});
|
|
129
|
+
acc[key] = value;
|
|
130
|
+
return acc;
|
|
131
|
+
}, {});
|
|
132
|
+
return (componentName) => {
|
|
133
|
+
const from = map[componentName];
|
|
134
|
+
if (from) {
|
|
135
|
+
return {
|
|
136
|
+
name: componentName,
|
|
137
|
+
from
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// src/auto-import-components/resolvers/vant.ts
|
|
144
|
+
var import_shared2 = require("@weapp-core/shared");
|
|
145
|
+
|
|
146
|
+
// src/auto-import-components/resolvers/json/vant.json
|
|
147
|
+
var vant_default = [
|
|
148
|
+
"action-sheet",
|
|
149
|
+
"area",
|
|
150
|
+
"button",
|
|
151
|
+
"calendar",
|
|
152
|
+
"card",
|
|
153
|
+
"cascader",
|
|
154
|
+
"cell",
|
|
155
|
+
"cell-group",
|
|
156
|
+
"checkbox",
|
|
157
|
+
"checkbox-group",
|
|
158
|
+
"circle",
|
|
159
|
+
"col",
|
|
160
|
+
"collapse",
|
|
161
|
+
"collapse-item",
|
|
162
|
+
"config-provider",
|
|
163
|
+
"count-down",
|
|
164
|
+
"datetime-picker",
|
|
165
|
+
"definitions",
|
|
166
|
+
"dialog",
|
|
167
|
+
"divider",
|
|
168
|
+
"dropdown-item",
|
|
169
|
+
"dropdown-menu",
|
|
170
|
+
"empty",
|
|
171
|
+
"field",
|
|
172
|
+
"goods-action",
|
|
173
|
+
"goods-action-button",
|
|
174
|
+
"goods-action-icon",
|
|
175
|
+
"grid",
|
|
176
|
+
"grid-item",
|
|
177
|
+
"icon",
|
|
178
|
+
"image",
|
|
179
|
+
"index-anchor",
|
|
180
|
+
"index-bar",
|
|
181
|
+
"info",
|
|
182
|
+
"loading",
|
|
183
|
+
"nav-bar",
|
|
184
|
+
"notice-bar",
|
|
185
|
+
"notify",
|
|
186
|
+
"overlay",
|
|
187
|
+
"panel",
|
|
188
|
+
"picker",
|
|
189
|
+
"picker-column",
|
|
190
|
+
"popup",
|
|
191
|
+
"progress",
|
|
192
|
+
"radio",
|
|
193
|
+
"radio-group",
|
|
194
|
+
"rate",
|
|
195
|
+
"row",
|
|
196
|
+
"search",
|
|
197
|
+
"share-sheet",
|
|
198
|
+
"sidebar",
|
|
199
|
+
"sidebar-item",
|
|
200
|
+
"skeleton",
|
|
201
|
+
"slider",
|
|
202
|
+
"stepper",
|
|
203
|
+
"steps",
|
|
204
|
+
"sticky",
|
|
205
|
+
"submit-bar",
|
|
206
|
+
"swipe-cell",
|
|
207
|
+
"switch",
|
|
208
|
+
"tab",
|
|
209
|
+
"tabbar",
|
|
210
|
+
"tabbar-item",
|
|
211
|
+
"tabs",
|
|
212
|
+
"tag",
|
|
213
|
+
"toast",
|
|
214
|
+
"transition",
|
|
215
|
+
"tree-select",
|
|
216
|
+
"uploader"
|
|
217
|
+
];
|
|
218
|
+
|
|
219
|
+
// src/auto-import-components/resolvers/vant.ts
|
|
220
|
+
var defaultPrefix2 = "van-";
|
|
221
|
+
var VantResolver = (opts) => {
|
|
222
|
+
const { prefix, resolve } = (0, import_shared2.defu)(opts, {
|
|
223
|
+
prefix: defaultPrefix2,
|
|
224
|
+
resolve({ name, prefix: prefix2 }) {
|
|
225
|
+
return {
|
|
226
|
+
key: `${prefix2}${name}`,
|
|
227
|
+
// 最后 + /index 似乎有问题
|
|
228
|
+
value: `@vant/weapp/${name}`
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
const map = vant_default.reduce((acc, cur) => {
|
|
233
|
+
const { key, value } = resolve({
|
|
234
|
+
name: cur,
|
|
235
|
+
prefix
|
|
236
|
+
});
|
|
237
|
+
acc[key] = value;
|
|
112
238
|
return acc;
|
|
113
239
|
}, {});
|
|
114
240
|
return (componentName) => {
|
|
@@ -123,5 +249,6 @@ var TDesignResolver = () => {
|
|
|
123
249
|
};
|
|
124
250
|
// Annotate the CommonJS export names for ESM import in node:
|
|
125
251
|
0 && (module.exports = {
|
|
126
|
-
TDesignResolver
|
|
252
|
+
TDesignResolver,
|
|
253
|
+
VantResolver
|
|
127
254
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { C as CreateResolver } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { C as CreateResolver } from '../types-D7SAXpSN.cjs';
|
|
2
|
+
export { O as Options, a as ResolvedValue, R as Resolver } from '../types-D7SAXpSN.cjs';
|
|
3
3
|
|
|
4
4
|
declare const TDesignResolver: CreateResolver;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
declare const VantResolver: CreateResolver;
|
|
7
|
+
|
|
8
|
+
export { CreateResolver, TDesignResolver, VantResolver };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { C as CreateResolver } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { C as CreateResolver } from '../types-D7SAXpSN.js';
|
|
2
|
+
export { O as Options, a as ResolvedValue, R as Resolver } from '../types-D7SAXpSN.js';
|
|
3
3
|
|
|
4
4
|
declare const TDesignResolver: CreateResolver;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
declare const VantResolver: CreateResolver;
|
|
7
|
+
|
|
8
|
+
export { CreateResolver, TDesignResolver, VantResolver };
|
|
@@ -7,90 +7,107 @@ init_esm_shims();
|
|
|
7
7
|
|
|
8
8
|
// src/auto-import-components/resolvers/tdesign.ts
|
|
9
9
|
init_esm_shims();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
10
|
+
import { defu } from "@weapp-core/shared";
|
|
11
|
+
|
|
12
|
+
// src/auto-import-components/resolvers/json/tdesign.json
|
|
13
|
+
var tdesign_default = [
|
|
14
|
+
"action-sheet",
|
|
15
|
+
"avatar",
|
|
16
|
+
"avatar-group",
|
|
17
|
+
"back-top",
|
|
18
|
+
"badge",
|
|
19
|
+
"button",
|
|
20
|
+
"calendar",
|
|
21
|
+
"cascader",
|
|
22
|
+
"cell",
|
|
23
|
+
"cell-group",
|
|
24
|
+
"check-tag",
|
|
25
|
+
"checkbox",
|
|
26
|
+
"checkbox-group",
|
|
27
|
+
"col",
|
|
28
|
+
"collapse",
|
|
29
|
+
"collapse-panel",
|
|
30
|
+
"color-picker",
|
|
31
|
+
"count-down",
|
|
32
|
+
"date-time-picker",
|
|
33
|
+
"dialog",
|
|
34
|
+
"divider",
|
|
35
|
+
"drawer",
|
|
36
|
+
"dropdown-item",
|
|
37
|
+
"dropdown-menu",
|
|
38
|
+
"empty",
|
|
39
|
+
"fab",
|
|
40
|
+
"footer",
|
|
41
|
+
"grid",
|
|
42
|
+
"grid-item",
|
|
43
|
+
"guide",
|
|
44
|
+
"icon",
|
|
45
|
+
"image",
|
|
46
|
+
"image-viewer",
|
|
47
|
+
"indexes",
|
|
48
|
+
"indexes-anchor",
|
|
49
|
+
"input",
|
|
50
|
+
"link",
|
|
51
|
+
"loading",
|
|
52
|
+
"message",
|
|
53
|
+
"message-item",
|
|
54
|
+
"navbar",
|
|
55
|
+
"notice-bar",
|
|
56
|
+
"overlay",
|
|
57
|
+
"picker",
|
|
58
|
+
"picker-item",
|
|
59
|
+
"popup",
|
|
60
|
+
"progress",
|
|
61
|
+
"pull-down-refresh",
|
|
62
|
+
"radio",
|
|
63
|
+
"radio-group",
|
|
64
|
+
"rate",
|
|
65
|
+
"result",
|
|
66
|
+
"row",
|
|
67
|
+
"search",
|
|
68
|
+
"side-bar",
|
|
69
|
+
"side-bar-item",
|
|
70
|
+
"skeleton",
|
|
71
|
+
"slider",
|
|
72
|
+
"step-item",
|
|
73
|
+
"stepper",
|
|
74
|
+
"steps",
|
|
75
|
+
"sticky",
|
|
76
|
+
"swipe-cell",
|
|
77
|
+
"swiper",
|
|
78
|
+
"swiper-nav",
|
|
79
|
+
"switch",
|
|
80
|
+
"tab-bar",
|
|
81
|
+
"tab-bar-item",
|
|
82
|
+
"tab-panel",
|
|
83
|
+
"tabs",
|
|
84
|
+
"tag",
|
|
85
|
+
"textarea",
|
|
86
|
+
"toast",
|
|
87
|
+
"transition",
|
|
88
|
+
"tree-select",
|
|
89
|
+
"upload"
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
// src/auto-import-components/resolvers/tdesign.ts
|
|
93
|
+
var defaultPrefix = "t-";
|
|
94
|
+
var TDesignResolver = (opts) => {
|
|
95
|
+
const { prefix, resolve } = defu(opts, {
|
|
96
|
+
prefix: defaultPrefix,
|
|
97
|
+
resolve({ name, prefix: prefix2 }) {
|
|
98
|
+
return {
|
|
99
|
+
key: `${prefix2}${name}`,
|
|
100
|
+
// 最后 + /index 似乎有问题
|
|
101
|
+
value: `tdesign-miniprogram/${name}/${name}`
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const map = tdesign_default.reduce((acc, cur) => {
|
|
106
|
+
const { key, value } = resolve({
|
|
107
|
+
name: cur,
|
|
108
|
+
prefix
|
|
109
|
+
});
|
|
110
|
+
acc[key] = value;
|
|
94
111
|
return acc;
|
|
95
112
|
}, {});
|
|
96
113
|
return (componentName) => {
|
|
@@ -106,6 +123,116 @@ var TDesignResolver = () => {
|
|
|
106
123
|
|
|
107
124
|
// src/auto-import-components/resolvers/types.ts
|
|
108
125
|
init_esm_shims();
|
|
126
|
+
|
|
127
|
+
// src/auto-import-components/resolvers/vant.ts
|
|
128
|
+
init_esm_shims();
|
|
129
|
+
import { defu as defu2 } from "@weapp-core/shared";
|
|
130
|
+
|
|
131
|
+
// src/auto-import-components/resolvers/json/vant.json
|
|
132
|
+
var vant_default = [
|
|
133
|
+
"action-sheet",
|
|
134
|
+
"area",
|
|
135
|
+
"button",
|
|
136
|
+
"calendar",
|
|
137
|
+
"card",
|
|
138
|
+
"cascader",
|
|
139
|
+
"cell",
|
|
140
|
+
"cell-group",
|
|
141
|
+
"checkbox",
|
|
142
|
+
"checkbox-group",
|
|
143
|
+
"circle",
|
|
144
|
+
"col",
|
|
145
|
+
"collapse",
|
|
146
|
+
"collapse-item",
|
|
147
|
+
"config-provider",
|
|
148
|
+
"count-down",
|
|
149
|
+
"datetime-picker",
|
|
150
|
+
"definitions",
|
|
151
|
+
"dialog",
|
|
152
|
+
"divider",
|
|
153
|
+
"dropdown-item",
|
|
154
|
+
"dropdown-menu",
|
|
155
|
+
"empty",
|
|
156
|
+
"field",
|
|
157
|
+
"goods-action",
|
|
158
|
+
"goods-action-button",
|
|
159
|
+
"goods-action-icon",
|
|
160
|
+
"grid",
|
|
161
|
+
"grid-item",
|
|
162
|
+
"icon",
|
|
163
|
+
"image",
|
|
164
|
+
"index-anchor",
|
|
165
|
+
"index-bar",
|
|
166
|
+
"info",
|
|
167
|
+
"loading",
|
|
168
|
+
"nav-bar",
|
|
169
|
+
"notice-bar",
|
|
170
|
+
"notify",
|
|
171
|
+
"overlay",
|
|
172
|
+
"panel",
|
|
173
|
+
"picker",
|
|
174
|
+
"picker-column",
|
|
175
|
+
"popup",
|
|
176
|
+
"progress",
|
|
177
|
+
"radio",
|
|
178
|
+
"radio-group",
|
|
179
|
+
"rate",
|
|
180
|
+
"row",
|
|
181
|
+
"search",
|
|
182
|
+
"share-sheet",
|
|
183
|
+
"sidebar",
|
|
184
|
+
"sidebar-item",
|
|
185
|
+
"skeleton",
|
|
186
|
+
"slider",
|
|
187
|
+
"stepper",
|
|
188
|
+
"steps",
|
|
189
|
+
"sticky",
|
|
190
|
+
"submit-bar",
|
|
191
|
+
"swipe-cell",
|
|
192
|
+
"switch",
|
|
193
|
+
"tab",
|
|
194
|
+
"tabbar",
|
|
195
|
+
"tabbar-item",
|
|
196
|
+
"tabs",
|
|
197
|
+
"tag",
|
|
198
|
+
"toast",
|
|
199
|
+
"transition",
|
|
200
|
+
"tree-select",
|
|
201
|
+
"uploader"
|
|
202
|
+
];
|
|
203
|
+
|
|
204
|
+
// src/auto-import-components/resolvers/vant.ts
|
|
205
|
+
var defaultPrefix2 = "van-";
|
|
206
|
+
var VantResolver = (opts) => {
|
|
207
|
+
const { prefix, resolve } = defu2(opts, {
|
|
208
|
+
prefix: defaultPrefix2,
|
|
209
|
+
resolve({ name, prefix: prefix2 }) {
|
|
210
|
+
return {
|
|
211
|
+
key: `${prefix2}${name}`,
|
|
212
|
+
// 最后 + /index 似乎有问题
|
|
213
|
+
value: `@vant/weapp/${name}`
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const map = vant_default.reduce((acc, cur) => {
|
|
218
|
+
const { key, value } = resolve({
|
|
219
|
+
name: cur,
|
|
220
|
+
prefix
|
|
221
|
+
});
|
|
222
|
+
acc[key] = value;
|
|
223
|
+
return acc;
|
|
224
|
+
}, {});
|
|
225
|
+
return (componentName) => {
|
|
226
|
+
const from = map[componentName];
|
|
227
|
+
if (from) {
|
|
228
|
+
return {
|
|
229
|
+
name: componentName,
|
|
230
|
+
from
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
};
|
|
109
235
|
export {
|
|
110
|
-
TDesignResolver
|
|
236
|
+
TDesignResolver,
|
|
237
|
+
VantResolver
|
|
111
238
|
};
|
|
@@ -90,7 +90,7 @@ var require_debounce = __commonJS({
|
|
|
90
90
|
init_esm_shims();
|
|
91
91
|
|
|
92
92
|
// package.json
|
|
93
|
-
var version = "1.
|
|
93
|
+
var version = "1.9.0";
|
|
94
94
|
|
|
95
95
|
// src/constants.ts
|
|
96
96
|
var VERSION = version;
|
|
@@ -1792,7 +1792,7 @@ var CompilerContext = class {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
} else if (Array.isArray(this.inlineConfig.weapp?.enhance?.autoImportComponents?.resolvers)) {
|
|
1794
1794
|
for (const resolver of this.inlineConfig.weapp.enhance.autoImportComponents.resolvers) {
|
|
1795
|
-
const value = resolver(depComponentName);
|
|
1795
|
+
const value = resolver(depComponentName, baseName);
|
|
1796
1796
|
if (value) {
|
|
1797
1797
|
if (!(isObject5(jsonFragment.json.usingComponents) && Reflect.has(jsonFragment.json.usingComponents, value.name))) {
|
|
1798
1798
|
set2(jsonFragment.json, `usingComponents.${value.name}`, value.from);
|
package/dist/cli.cjs
CHANGED
|
@@ -130,7 +130,7 @@ var import_weapp_ide_cli = require("weapp-ide-cli");
|
|
|
130
130
|
init_cjs_shims();
|
|
131
131
|
|
|
132
132
|
// package.json
|
|
133
|
-
var version = "1.
|
|
133
|
+
var version = "1.9.0";
|
|
134
134
|
|
|
135
135
|
// src/constants.ts
|
|
136
136
|
var VERSION = version;
|
|
@@ -1839,7 +1839,7 @@ var CompilerContext = class {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
} else if (Array.isArray(this.inlineConfig.weapp?.enhance?.autoImportComponents?.resolvers)) {
|
|
1841
1841
|
for (const resolver of this.inlineConfig.weapp.enhance.autoImportComponents.resolvers) {
|
|
1842
|
-
const value = resolver(depComponentName);
|
|
1842
|
+
const value = resolver(depComponentName, baseName);
|
|
1843
1843
|
if (value) {
|
|
1844
1844
|
if (!((0, import_shared13.isObject)(jsonFragment.json.usingComponents) && Reflect.has(jsonFragment.json.usingComponents, value.name))) {
|
|
1845
1845
|
(0, import_shared13.set)(jsonFragment.json, `usingComponents.${value.name}`, value.from);
|
package/dist/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Theme, Sitemap, App, Page, Component } from '@weapp-core/schematics';
|
|
|
3
3
|
import { PackageJson } from 'pkg-types';
|
|
4
4
|
import { Options } from 'tsup';
|
|
5
5
|
import { PluginOptions } from 'vite-tsconfig-paths';
|
|
6
|
-
import {
|
|
6
|
+
import { R as Resolver } from './types-D7SAXpSN.js';
|
|
7
7
|
|
|
8
8
|
interface Alias {
|
|
9
9
|
find: string | RegExp;
|
|
@@ -3,7 +3,7 @@ import { Theme, Sitemap, App, Page, Component } from '@weapp-core/schematics';
|
|
|
3
3
|
import { PackageJson } from 'pkg-types';
|
|
4
4
|
import { Options } from 'tsup';
|
|
5
5
|
import { PluginOptions } from 'vite-tsconfig-paths';
|
|
6
|
-
import {
|
|
6
|
+
import { R as Resolver } from './types-D7SAXpSN.cjs';
|
|
7
7
|
|
|
8
8
|
interface Alias {
|
|
9
9
|
find: string | RegExp;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
|
|
2
|
-
export { d as defineConfig } from './config-
|
|
2
|
+
export { d as defineConfig } from './config-Cs01aZpF.cjs';
|
|
3
3
|
import '@weapp-core/schematics';
|
|
4
4
|
import 'pkg-types';
|
|
5
5
|
import 'tsup';
|
|
6
6
|
import 'vite-tsconfig-paths';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-D7SAXpSN.cjs';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
|
|
2
|
-
export { d as defineConfig } from './config-
|
|
2
|
+
export { d as defineConfig } from './config-C0N6oM5k.js';
|
|
3
3
|
import '@weapp-core/schematics';
|
|
4
4
|
import 'pkg-types';
|
|
5
5
|
import 'tsup';
|
|
6
6
|
import 'vite-tsconfig-paths';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-D7SAXpSN.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1838,7 +1838,7 @@ var CompilerContext = class {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
} else if (Array.isArray(this.inlineConfig.weapp?.enhance?.autoImportComponents?.resolvers)) {
|
|
1840
1840
|
for (const resolver of this.inlineConfig.weapp.enhance.autoImportComponents.resolvers) {
|
|
1841
|
-
const value = resolver(depComponentName);
|
|
1841
|
+
const value = resolver(depComponentName, baseName);
|
|
1842
1842
|
if (value) {
|
|
1843
1843
|
if (!((0, import_shared13.isObject)(jsonFragment.json.usingComponents) && Reflect.has(jsonFragment.json.usingComponents, value.name))) {
|
|
1844
1844
|
(0, import_shared13.set)(jsonFragment.json, `usingComponents.${value.name}`, value.from);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as CompilerContextOptions } from './config-
|
|
2
|
-
import { C as CompilerContext } from './CompilerContext-
|
|
1
|
+
import { C as CompilerContextOptions } from './config-Cs01aZpF.cjs';
|
|
2
|
+
import { C as CompilerContext } from './CompilerContext-CXqr9z7E.cjs';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import '@weapp-core/schematics';
|
|
5
5
|
import 'pkg-types';
|
|
6
6
|
import 'tsup';
|
|
7
7
|
import 'vite-tsconfig-paths';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-D7SAXpSN.cjs';
|
|
9
9
|
import 'rollup';
|
|
10
10
|
|
|
11
11
|
interface CreateCompilerContextOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as CompilerContextOptions } from './config-
|
|
2
|
-
import { C as CompilerContext } from './CompilerContext-
|
|
1
|
+
import { C as CompilerContextOptions } from './config-C0N6oM5k.js';
|
|
2
|
+
import { C as CompilerContext } from './CompilerContext-DY3tiUDT.js';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import '@weapp-core/schematics';
|
|
5
5
|
import 'pkg-types';
|
|
6
6
|
import 'tsup';
|
|
7
7
|
import 'vite-tsconfig-paths';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-D7SAXpSN.js';
|
|
9
9
|
import 'rollup';
|
|
10
10
|
|
|
11
11
|
interface CreateCompilerContextOptions {
|
package/dist/index.mjs
CHANGED
package/dist/json.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { App, Page, Component, Sitemap, Theme } from '@weapp-core/schematics';
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
|
|
3
|
-
import { C as CompilerContext } from './CompilerContext-
|
|
3
|
+
import { C as CompilerContext } from './CompilerContext-CXqr9z7E.cjs';
|
|
4
4
|
import 'pkg-types';
|
|
5
5
|
import 'rollup';
|
|
6
|
-
import './types-
|
|
7
|
-
import './config-
|
|
6
|
+
import './types-D7SAXpSN.cjs';
|
|
7
|
+
import './config-Cs01aZpF.cjs';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import 'tsup';
|
|
10
10
|
import 'vite-tsconfig-paths';
|
package/dist/json.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { App, Page, Component, Sitemap, Theme } from '@weapp-core/schematics';
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
|
|
3
|
-
import { C as CompilerContext } from './CompilerContext-
|
|
3
|
+
import { C as CompilerContext } from './CompilerContext-DY3tiUDT.js';
|
|
4
4
|
import 'pkg-types';
|
|
5
5
|
import 'rollup';
|
|
6
|
-
import './types-
|
|
7
|
-
import './config-
|
|
6
|
+
import './types-D7SAXpSN.js';
|
|
7
|
+
import './config-C0N6oM5k.js';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import 'tsup';
|
|
10
10
|
import 'vite-tsconfig-paths';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface ResolvedValue {
|
|
2
|
+
name: string;
|
|
3
|
+
from: string;
|
|
4
|
+
}
|
|
5
|
+
type Resolver = (componentName: string, baseName: string) => ResolvedValue | void;
|
|
6
|
+
interface ResolveOptions {
|
|
7
|
+
name: string;
|
|
8
|
+
prefix: string;
|
|
9
|
+
}
|
|
10
|
+
interface Options {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
resolve?: (options: ResolveOptions) => {
|
|
13
|
+
key: string;
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
type CreateResolver = (options?: Options) => Resolver;
|
|
18
|
+
|
|
19
|
+
export type { CreateResolver as C, Options as O, Resolver as R, ResolvedValue as a };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface ResolvedValue {
|
|
2
|
+
name: string;
|
|
3
|
+
from: string;
|
|
4
|
+
}
|
|
5
|
+
type Resolver = (componentName: string, baseName: string) => ResolvedValue | void;
|
|
6
|
+
interface ResolveOptions {
|
|
7
|
+
name: string;
|
|
8
|
+
prefix: string;
|
|
9
|
+
}
|
|
10
|
+
interface Options {
|
|
11
|
+
prefix?: string;
|
|
12
|
+
resolve?: (options: ResolveOptions) => {
|
|
13
|
+
key: string;
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
type CreateResolver = (options?: Options) => Resolver;
|
|
18
|
+
|
|
19
|
+
export type { CreateResolver as C, Options as O, Resolver as R, ResolvedValue as a };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.9.0",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"@babel/core": "^7.26.0",
|
|
72
72
|
"@babel/preset-env": "^7.26.0",
|
|
73
73
|
"@babel/preset-typescript": "^7.26.0",
|
|
74
|
-
"@babel/types": "^7.26.
|
|
74
|
+
"@babel/types": "^7.26.3",
|
|
75
75
|
"bundle-require": "^5.0.0",
|
|
76
76
|
"cac": "^6.7.14",
|
|
77
77
|
"comment-json": "^4.2.5",
|
|
78
|
-
"debug": "^4.
|
|
78
|
+
"debug": "^4.4.0",
|
|
79
79
|
"del": "^8.0.0",
|
|
80
80
|
"esbuild": "^0.24.0",
|
|
81
81
|
"fdir": "^6.4.2",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
"picomatch": "^4.0.2",
|
|
88
88
|
"tsup": "^8.3.5",
|
|
89
89
|
"vite": "^5.4.11",
|
|
90
|
-
"vite-tsconfig-paths": "^5.1.
|
|
90
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
91
|
+
"@weapp-core/logger": "^1.0.1",
|
|
91
92
|
"@weapp-core/init": "^1.1.11",
|
|
93
|
+
"@weapp-core/shared": "^1.0.4",
|
|
92
94
|
"@weapp-core/schematics": "^1.0.7",
|
|
93
|
-
"
|
|
94
|
-
"weapp-ide-cli": "^2.0.6",
|
|
95
|
-
"@weapp-core/shared": "^1.0.4"
|
|
95
|
+
"weapp-ide-cli": "^2.0.6"
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public",
|
package/dist/types-Cvkpy1-u.d.ts
DELETED