weapp-vite 7.4.0 → 7.6.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/README.md +59 -3
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/bin/bootstrap.js +14 -1
- package/dist/action-B3YZMA-h.mjs +255 -0
- package/dist/action-BELcDNNv.mjs +139 -0
- package/dist/action-BOk3vGI7.mjs +1110 -0
- package/dist/action-DlC6JYpt.mjs +95 -0
- package/dist/action-zEDY7oh_.mjs +247 -0
- package/dist/adapters-CcHrsYaj.mjs +1 -0
- package/dist/analyze-DN79YOAH.mjs +184 -0
- package/dist/artifacts-BOyC9Fy-.mjs +106 -0
- package/dist/assets-C5_YYXNk.mjs +637 -0
- package/dist/auto-import-components/resolvers.mjs +1 -2
- package/dist/auto-import-presets/wevu-router.mjs +1 -2
- package/dist/auto-import-presets/wevu.mjs +1 -2
- package/dist/auto-routes.mjs +2 -1
- package/dist/budget-CTLOHwgI.d.mts +177 -0
- package/dist/budget-EOeEycc_.mjs +65 -0
- package/dist/builtProject-C29udgXY.mjs +541 -0
- package/dist/chunkStrategy-DY_LZIIe.mjs +1448 -0
- package/dist/classifier-DBJY__kg.mjs +88 -0
- package/dist/cli-acceptance.d.mts +1 -0
- package/dist/cli-acceptance.mjs +21 -0
- package/dist/cli.mjs +519 -5049
- package/dist/compatibility.mjs +1 -2
- package/dist/{config-Dbvj5yK7.d.mts → config-Bf6DWhyb.d.mts} +220 -76
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/{constants-WOsG3Eqd.mjs → constants-DEZdcsMn.mjs} +1 -1
- package/dist/{createContext-UOEgeYnA.mjs → createCompilerContextInstance-aYwi8wQt.mjs} +36862 -32020
- package/dist/createContext-tApLtII-.mjs +15 -0
- package/dist/dashboard/analyze.d.mts +48 -0
- package/dist/dashboard/analyze.mjs +3 -0
- package/dist/dashboard/vite.d.mts +1 -1
- package/dist/dashboard.d.mts +3 -2
- package/dist/dashboard.mjs +1748 -1
- package/dist/dashboardTransport-C_Y6jMp-.mjs +16 -0
- package/dist/dashboardViteBridge-DCGR43aM.mjs +302 -0
- package/dist/dev-C2fgr_Xd.mjs +67 -0
- package/dist/devProvider-D-hTfsEO.mjs +3027 -0
- package/dist/docs/README.md +59 -3
- package/dist/docs/ai-workflows.md +4 -0
- package/dist/docs/doctor.md +38 -0
- package/dist/docs/getting-started.md +3 -1
- package/dist/docs/index.md +3 -1
- package/dist/docs/mcp.md +104 -1
- package/dist/docs/testing.md +29 -2
- package/dist/docs/troubleshooting.md +16 -0
- package/dist/docs/uni-app-component-libraries.md +8 -7
- package/dist/docs/upload.md +40 -3
- package/dist/docs/vite-plugin.md +171 -0
- package/dist/docs/vue-sfc.md +42 -0
- package/dist/docs/weapp-config.md +54 -0
- package/dist/docs/wevu-authoring.md +10 -0
- package/dist/doctor-worker.d.mts +1 -0
- package/dist/doctor-worker.mjs +60 -0
- package/dist/doctor.d.mts +144 -0
- package/dist/doctor.mjs +850 -0
- package/dist/engine-C66J0HLz.mjs +54 -0
- package/dist/eslint.mjs +1 -2
- package/dist/{file-giE9UMZa.mjs → file-CcIOmqhC.mjs} +58 -24
- package/dist/file-DtcteQ4G.mjs +1 -0
- package/dist/files-BqxFIPRp.mjs +45 -0
- package/dist/forwardConsole-B0Reo8Lf.mjs +511 -0
- package/dist/getInstance-BAIaU2y9.mjs +1 -0
- package/dist/getInstance-Dt9IQDKr.mjs +28 -0
- package/dist/history-BIiRCzbq.mjs +784 -0
- package/dist/i18n.d.mts +1 -1
- package/dist/index-D5rgBzYZ.d.mts +740 -0
- package/dist/index.d.mts +12 -10
- package/dist/index.mjs +3 -2
- package/dist/json.d.mts +1 -1
- package/dist/json.mjs +1 -2
- package/dist/lib-DjccSI1B.mjs +143 -0
- package/dist/lifecycle-C36WSbQS.mjs +413 -0
- package/dist/loadConfig-BWIsDXR4.mjs +59 -0
- package/dist/loadConfig-D-BpBgsk.mjs +1 -0
- package/dist/logBuildAppFinish-ChjwATMv.mjs +57 -0
- package/dist/logger-DGn5iEVN.mjs +1 -0
- package/dist/mcp-CYgX9HpO.mjs +86 -0
- package/dist/{mcp-BG6TliEg.mjs → mcp-Cj8Maqo6.mjs} +16 -7
- package/dist/mcp.d.mts +6 -3
- package/dist/mcp.mjs +1 -2
- package/dist/mcpClient-DVLvFLZv.mjs +287 -0
- package/dist/metadata-hwF7QRcS.mjs +59 -0
- package/dist/nodeEnv-BmH8UZPR.mjs +7 -0
- package/dist/openIde-CroqOgk5.mjs +648 -0
- package/dist/options-jqFwfD1G.mjs +34 -0
- package/dist/package-Cmakyy3J.mjs +4 -0
- package/dist/path-CYYIQGS7.mjs +44 -0
- package/dist/{platform-DTWs5QRi.mjs → platform-CnkySBKz.mjs} +1 -1
- package/dist/processCleanup-BQn2kTcK.mjs +19 -0
- package/dist/protocol-Cg6Jdlvb.mjs +141 -0
- package/dist/reader-sh_POQ9-.mjs +93 -0
- package/dist/realpathScope-Tf9mz-fh.mjs +23 -0
- package/dist/report-hyonPGbZ.mjs +107 -0
- package/dist/resolvedId-CiDl7SC1.mjs +60 -0
- package/dist/{resolvers-icNxkpcy.mjs → resolvers-Dod-euqX.mjs} +4 -1
- package/dist/resolvers.mjs +1 -2
- package/dist/runtime-CLUhQsdA.mjs +43 -0
- package/dist/{runtime-Ee2HY6gR.d.mts → runtime-DpVf714f.d.mts} +1 -1
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +1 -2
- package/dist/schematics-kO26eQRT.mjs +91 -0
- package/dist/session-D3zsdzIy.mjs +452 -0
- package/dist/test.d.mts +1 -0
- package/dist/test.mjs +204 -45
- package/dist/{types-CgZn5X6j.d.mts → types-D-kfuyVa.d.mts} +1 -2
- package/dist/types-D0FFexRF.d.mts +39 -0
- package/dist/types.d.mts +3 -3
- package/dist/{upload-D0RcEWrq.mjs → upload-DozK8UdN.mjs} +278 -15
- package/dist/upload-worker.mjs +136 -3
- package/dist/utils-Dy51PYAC.mjs +1034 -0
- package/dist/vite.d.mts +9 -0
- package/dist/vite.mjs +309 -0
- package/dist/volar.d.mts +2 -2
- package/dist/web-apis.mjs +1 -2
- package/dist/wxs-BT8btflA.mjs +112 -0
- package/dist/wxs-Z4VQDeJ_.mjs +1 -0
- package/package.json +80 -48
- package/dist/adapters-BwnMMIZR.mjs +0 -2
- package/dist/dashboard-BzaVesmQ.mjs +0 -558
- package/dist/file-D19nbDoN.mjs +0 -2
- package/dist/getInstance-CYF1vl5l.mjs +0 -2
- package/dist/index-DbqVupg0.d.mts +0 -246
- package/dist/logger-mt4mSTqV.mjs +0 -2
package/dist/vite.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./config-Bf6DWhyb.mjs";
|
|
2
|
+
import { ConfigEnv, Plugin } from "vite";
|
|
3
|
+
//#region src/vite/index.d.ts
|
|
4
|
+
/** 通过顶层 weapp 配置激活标准 Vite 小程序编译。 */
|
|
5
|
+
export declare function weapp(): Plugin[];
|
|
6
|
+
declare module 'vite' {
|
|
7
|
+
function defineConfig<T extends (env: ConfigEnv) => UserConfig | Promise<UserConfig>>(config: T): T;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
package/dist/vite.mjs
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { i as isWeappViteHost } from "./pluginHost--CaeyWpA.mjs";
|
|
2
|
+
import { i as takeHostLifecycle, n as setHostRestartData, r as takeHostConfigRestartData, t as bindHostLifecycle } from "./lifecycle-C36WSbQS.mjs";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { WEAPP_VITE_HMR_RUNTIME_SESSION_HANDOFF_KEY } from "@weapp-core/constants";
|
|
5
|
+
import path from "pathe";
|
|
6
|
+
//#region src/vite/classicFallback.ts
|
|
7
|
+
/** 停止失败的宿主时同时保留原始错误与清理错误。 */
|
|
8
|
+
async function rethrowAfterHostCleanup(error, cleanup) {
|
|
9
|
+
try {
|
|
10
|
+
await cleanup();
|
|
11
|
+
} catch (cleanupError) {
|
|
12
|
+
if (cleanupError === error) throw error;
|
|
13
|
+
throw new AggregateError([error, cleanupError], "Host operation and cleanup failed", { cause: error });
|
|
14
|
+
}
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
/** 通过公共宿主重启交接到 classic,当前构建只发布请求,不等待关闭自己。 */
|
|
18
|
+
function bindClassicFallback(server, runtime) {
|
|
19
|
+
return runtime.bindRequest(async () => {
|
|
20
|
+
try {
|
|
21
|
+
await server.restart();
|
|
22
|
+
} catch (error) {
|
|
23
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
24
|
+
server.config.logger.error("[weapp-vite] classic 回退失败,开发会话已停止。", { error: failure });
|
|
25
|
+
await rethrowAfterHostCleanup(failure, () => server.close());
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/vite/environment.ts
|
|
31
|
+
/** 环境钩子捕获本轮会话,旧环境关闭不能清理重启后的新会话。 */
|
|
32
|
+
function createSessionEnvironmentPlugin(session, serve) {
|
|
33
|
+
return {
|
|
34
|
+
name: "weapp-vite:session-environment",
|
|
35
|
+
enforce: "pre",
|
|
36
|
+
options: {
|
|
37
|
+
order: "pre",
|
|
38
|
+
async handler() {
|
|
39
|
+
if (serve) return;
|
|
40
|
+
try {
|
|
41
|
+
await session.validateEntries();
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (!this.meta.watchMode) await session.close().catch(() => {});
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
buildStart: {
|
|
49
|
+
order: "pre",
|
|
50
|
+
async handler() {
|
|
51
|
+
if (serve) return;
|
|
52
|
+
if (this.meta.watchMode) await session.validateEntries();
|
|
53
|
+
const dependencies = await session.buildDependencies();
|
|
54
|
+
for (const file of dependencies.watchFiles) this.addWatchFile(file);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
generateBundle: {
|
|
58
|
+
order: "post",
|
|
59
|
+
async handler() {
|
|
60
|
+
if (!serve) {
|
|
61
|
+
const dependencies = await session.buildDependencies();
|
|
62
|
+
for (const asset of dependencies.assets) this.emitFile(asset);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
writeBundle: {
|
|
67
|
+
order: "post",
|
|
68
|
+
sequential: true,
|
|
69
|
+
async handler() {
|
|
70
|
+
if (!serve) await session.publishDependencies();
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
closeBundle: {
|
|
74
|
+
order: "post",
|
|
75
|
+
sequential: true,
|
|
76
|
+
async handler() {
|
|
77
|
+
if (!serve && !this.meta.watchMode) await session.close();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
async closeWatcher() {
|
|
81
|
+
if (serve) await session.closeHostGeneration("close");
|
|
82
|
+
else await session.close();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/vite/options.ts
|
|
88
|
+
async function resolvePlugins(options) {
|
|
89
|
+
const result = [];
|
|
90
|
+
for (const option of options ?? []) {
|
|
91
|
+
const resolved = await option;
|
|
92
|
+
if (Array.isArray(resolved)) result.push(...await resolvePlugins(resolved));
|
|
93
|
+
else if (resolved) result.push(resolved);
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/vite/slots.ts
|
|
99
|
+
const descriptors = [
|
|
100
|
+
["weapp-vite:runtime-provider:web-runtime", "pre"],
|
|
101
|
+
["@weapp-vite/web", "pre"],
|
|
102
|
+
["weapp-vite:module-graph-provider", "pre"],
|
|
103
|
+
["weapp-vite:stateful-style-client", "pre"],
|
|
104
|
+
["weapp-vite:hmr-input", "pre"],
|
|
105
|
+
["weapp-vite:stateful-hmr-sidecar", "pre"],
|
|
106
|
+
["weapp-vite:stateful-hmr-session", "post"],
|
|
107
|
+
...[
|
|
108
|
+
"config",
|
|
109
|
+
"watcher",
|
|
110
|
+
"wxml",
|
|
111
|
+
"json",
|
|
112
|
+
"scan",
|
|
113
|
+
"auto-routes",
|
|
114
|
+
"auto-import",
|
|
115
|
+
"npm",
|
|
116
|
+
"build",
|
|
117
|
+
"web"
|
|
118
|
+
].map((name) => [`weapp-runtime:${name}-service`]),
|
|
119
|
+
["weapp-vite:context", "pre"],
|
|
120
|
+
["weapp-vite:runtime-provider:native-miniprogram", "pre"],
|
|
121
|
+
["weapp-vite:runtime-provider:wevu-miniprogram", "pre"],
|
|
122
|
+
["weapp-vite:preflight", "pre"],
|
|
123
|
+
["weapp-vite:set-env", "pre"],
|
|
124
|
+
["weapp-vite:uni-app-compatibility", "pre"],
|
|
125
|
+
["weapp-vite:react", "pre"],
|
|
126
|
+
["weapp-vite:vue:resolver"],
|
|
127
|
+
["weapp-vite:vue:transform"],
|
|
128
|
+
["weapp-vite:vue:watch"],
|
|
129
|
+
["weapp-vite:wevu:page-features", "pre"],
|
|
130
|
+
["weapp-vite:asset", "post"],
|
|
131
|
+
["weapp-vite:auto-routes", "pre"],
|
|
132
|
+
["weapp-vite:auto-import", "pre"],
|
|
133
|
+
["weapp-vite:i18n", "pre"],
|
|
134
|
+
["weapp-vite:pre:native-style", "pre"],
|
|
135
|
+
["weapp-vite:pre", "pre"],
|
|
136
|
+
["weapp-vite:post", "post"],
|
|
137
|
+
["weapp-vite:wxs", "post"],
|
|
138
|
+
["weapp-vite:css-sidecar-source"],
|
|
139
|
+
["weapp-vite:oxc-runtime-helpers", "pre"],
|
|
140
|
+
["vite-tsconfig-paths", "pre"],
|
|
141
|
+
["weapp-vite:compiler:source", "pre"],
|
|
142
|
+
["weapp-vite:tailwindcss", "pre"],
|
|
143
|
+
["weapp-vite:css", "pre"],
|
|
144
|
+
["weapp-vite:project-config"],
|
|
145
|
+
["weapp-vite:project-config-directory"],
|
|
146
|
+
["weapp-vite:app-builder"],
|
|
147
|
+
["weapp-vite:worker-output"],
|
|
148
|
+
["weapp-vite:plugin-project-output"],
|
|
149
|
+
["weapp-vite:output-finalizer", "post"],
|
|
150
|
+
["weapp-vite:tailwindcss:output", "post"],
|
|
151
|
+
["weapp-vite:compiler:output", "post"],
|
|
152
|
+
["weapp-vite:lib-dts", "post"],
|
|
153
|
+
["weapp-vite:output-publication", "post"]
|
|
154
|
+
];
|
|
155
|
+
/** 延迟绑定保留钩子对象、过滤器与原始 this,转换链及 sourcemap 仍由 Vite 调度。 */
|
|
156
|
+
function createPluginSlots(apply) {
|
|
157
|
+
const delegates = /* @__PURE__ */ new Map();
|
|
158
|
+
const plugins = descriptors.map(([name, enforce]) => {
|
|
159
|
+
return {
|
|
160
|
+
name: name === "vite-tsconfig-paths" ? "weapp-vite:tsconfig-paths-slot" : name,
|
|
161
|
+
enforce,
|
|
162
|
+
apply,
|
|
163
|
+
config(config, env) {
|
|
164
|
+
const hook = delegates.get(name)?.config;
|
|
165
|
+
if (!hook) return;
|
|
166
|
+
return (typeof hook === "function" ? hook : hook.handler).call(this, config, env);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
const originals = plugins.map((plugin) => ({ ...plugin }));
|
|
171
|
+
return {
|
|
172
|
+
plugins,
|
|
173
|
+
bind(implementations) {
|
|
174
|
+
delegates.clear();
|
|
175
|
+
for (const [index, plugin] of plugins.entries()) {
|
|
176
|
+
for (const key of Reflect.ownKeys(plugin)) Reflect.deleteProperty(plugin, key);
|
|
177
|
+
Object.assign(plugin, originals[index]);
|
|
178
|
+
}
|
|
179
|
+
for (const implementation of implementations) {
|
|
180
|
+
const slot = descriptors.find(([name]) => name === implementation.name);
|
|
181
|
+
if (!slot || slot[1] !== implementation.enforce || delegates.has(implementation.name)) throw new Error(`[weapp-vite] 插件槽不匹配:${implementation.name}。请检查宿主插件支持矩阵。`);
|
|
182
|
+
delegates.set(implementation.name, implementation);
|
|
183
|
+
const target = plugins[descriptors.indexOf(slot)];
|
|
184
|
+
const config = target.config;
|
|
185
|
+
Object.assign(target, implementation, {
|
|
186
|
+
config,
|
|
187
|
+
apply
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/vite/index.ts
|
|
195
|
+
const PLUGIN_NAME = "weapp-vite:host";
|
|
196
|
+
const hmrRuntimeSessionKey = Symbol.for(WEAPP_VITE_HMR_RUNTIME_SESSION_HANDOFF_KEY);
|
|
197
|
+
/** 通过顶层 weapp 配置激活标准 Vite 小程序编译。 */
|
|
198
|
+
function weapp() {
|
|
199
|
+
let session;
|
|
200
|
+
let initializing = false;
|
|
201
|
+
let inactive = false;
|
|
202
|
+
let serveRequested = false;
|
|
203
|
+
let inheritedLifecycle;
|
|
204
|
+
const apply = (config) => !isWeappViteHost(config);
|
|
205
|
+
const slots = createPluginSlots(apply);
|
|
206
|
+
const coordinator = {
|
|
207
|
+
name: PLUGIN_NAME,
|
|
208
|
+
enforce: "pre",
|
|
209
|
+
apply,
|
|
210
|
+
config: {
|
|
211
|
+
order: "pre",
|
|
212
|
+
async handler(config, env) {
|
|
213
|
+
if (initializing || session && session.state !== "closed") throw new Error("[weapp-vite] 同一插件实例不能被多个活动宿主复用,请为每个宿主调用 weapp()。");
|
|
214
|
+
initializing = true;
|
|
215
|
+
try {
|
|
216
|
+
inheritedLifecycle = takeHostLifecycle(config);
|
|
217
|
+
session = void 0;
|
|
218
|
+
serveRequested = false;
|
|
219
|
+
slots.bind([]);
|
|
220
|
+
const configuredPlugins = await resolvePlugins(config.plugins);
|
|
221
|
+
if (configuredPlugins.filter((plugin) => plugin.name === PLUGIN_NAME).length !== 1) throw new Error("[weapp-vite] 同一宿主只能安装一次 weapp()。");
|
|
222
|
+
inactive = configuredPlugins.some((plugin) => plugin.name === "vitest:config" || plugin.name === "vitest:project") || env.isPreview === true;
|
|
223
|
+
if (inactive) return;
|
|
224
|
+
serveRequested = env.command === "serve";
|
|
225
|
+
const options = config.weapp;
|
|
226
|
+
if (options?.web?.enable !== false && options?.web && options.platform !== "web") throw new Error("[weapp-vite] Web 与小程序混合宿主尚未开放;纯 Web 请设置 weapp.platform=web。");
|
|
227
|
+
const userPlugins = configuredPlugins.filter((plugin) => plugin !== coordinator && !slots.plugins.includes(plugin));
|
|
228
|
+
const hostConfig = {
|
|
229
|
+
...config,
|
|
230
|
+
plugins: serveRequested ? userPlugins : []
|
|
231
|
+
};
|
|
232
|
+
const { WeappBuildSession } = await import("./session-D3zsdzIy.mjs");
|
|
233
|
+
session = new WeappBuildSession(takeHostConfigRestartData(inheritedLifecycle, hmrRuntimeSessionKey));
|
|
234
|
+
try {
|
|
235
|
+
const fallbackBeforePrepare = session.hmrRuntimeSession.fallback;
|
|
236
|
+
let merged = await session.prepare(hostConfig, path.resolve(config.root ?? process.cwd()), env.mode, serveRequested);
|
|
237
|
+
if (session.hmrRuntimeSession.phase === "switching" && session.hmrRuntimeSession.fallback !== fallbackBeforePrepare) {
|
|
238
|
+
const runtime = session.hmrRuntimeSession;
|
|
239
|
+
await session.close("restart");
|
|
240
|
+
session = new WeappBuildSession(runtime);
|
|
241
|
+
merged = await session.prepare(hostConfig, path.resolve(config.root ?? process.cwd()), env.mode, serveRequested);
|
|
242
|
+
}
|
|
243
|
+
session.context.configService.options.sourceConfig = {
|
|
244
|
+
...hostConfig,
|
|
245
|
+
root: session.context.configService.cwd,
|
|
246
|
+
plugins: userPlugins
|
|
247
|
+
};
|
|
248
|
+
if (session.isWeb) {
|
|
249
|
+
slots.bind((await resolvePlugins(merged.plugins)).filter((plugin) => !configuredPlugins.includes(plugin)));
|
|
250
|
+
const { plugins: _plugins, configFile: _configFile, ...normalized } = merged;
|
|
251
|
+
normalized.logLevel = config.logLevel;
|
|
252
|
+
return normalized;
|
|
253
|
+
}
|
|
254
|
+
if (serveRequested) {
|
|
255
|
+
const { prepareDevHostConfig } = await import("./dev-C2fgr_Xd.mjs");
|
|
256
|
+
if (!session.statefulController && config.experimental?.bundledDev && !session.hmrRuntimeSession.fallback) throw new Error("[weapp-vite] classic 开发模式暂不支持 experimental.bundledDev,请关闭此选项。");
|
|
257
|
+
const host = prepareDevHostConfig(session, merged, config);
|
|
258
|
+
slots.bind((await resolvePlugins(host.plugins)).filter((plugin) => !configuredPlugins.includes(plugin)));
|
|
259
|
+
return host.config;
|
|
260
|
+
}
|
|
261
|
+
slots.bind(await resolvePlugins(merged.plugins));
|
|
262
|
+
const { plugins: _plugins, configFile: _configFile, ...normalized } = merged;
|
|
263
|
+
normalized.logLevel = config.logLevel;
|
|
264
|
+
if (normalized.build) normalized.build.emptyOutDir = config.build?.emptyOutDir;
|
|
265
|
+
return normalized;
|
|
266
|
+
} catch (error) {
|
|
267
|
+
return await rethrowAfterHostCleanup(error, () => session.close(inheritedLifecycle ? "restart" : "close"));
|
|
268
|
+
}
|
|
269
|
+
} finally {
|
|
270
|
+
initializing = false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
async configureServer(server) {
|
|
275
|
+
if (inactive || !serveRequested || !session) return;
|
|
276
|
+
const active = session;
|
|
277
|
+
if (active.statefulController) {
|
|
278
|
+
const listen = server.listen.bind(server);
|
|
279
|
+
server.listen = async (...args) => {
|
|
280
|
+
const result = await listen(...args);
|
|
281
|
+
await active.refreshHostControl();
|
|
282
|
+
return result;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
bindHostLifecycle(server, (reason) => active.closeHostGeneration(reason), inheritedLifecycle, () => active.hmrRuntimeSession.phase === "switching", () => active.releaseHostClassicIdeConfig());
|
|
286
|
+
inheritedLifecycle = void 0;
|
|
287
|
+
try {
|
|
288
|
+
await setHostRestartData(server, hmrRuntimeSessionKey, active.hmrRuntimeSession);
|
|
289
|
+
await active.startDev(server);
|
|
290
|
+
} catch (error) {
|
|
291
|
+
return await rethrowAfterHostCleanup(error, () => server.close());
|
|
292
|
+
}
|
|
293
|
+
return () => {
|
|
294
|
+
if (!active.isClosing) active.onClose(bindClassicFallback(server, active.hmrRuntimeSession));
|
|
295
|
+
};
|
|
296
|
+
},
|
|
297
|
+
configResolved(config) {
|
|
298
|
+
if (inactive || !session) return;
|
|
299
|
+
session.context.configService.options.configFilePath = config.configFile || void 0;
|
|
300
|
+
session.context.configService.options.configFileDependencies = config.configFileDependencies;
|
|
301
|
+
},
|
|
302
|
+
applyToEnvironment() {
|
|
303
|
+
return session && !inactive ? createSessionEnvironmentPlugin(session, serveRequested) : false;
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
return [coordinator, ...slots.plugins];
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
export { weapp };
|
package/dist/volar.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
1
|
+
import volar_default from "@weapp-vite/volar";
|
|
2
|
+
export { volar_default as default };
|
package/dist/web-apis.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export { installAbortGlobals, installRequestGlobals, installWebRuntimeGlobals } from "@wevu/web-apis";
|
|
2
2
|
export * from "@wevu/web-apis";
|
|
3
|
-
export { installAbortGlobals, installRequestGlobals, installWebRuntimeGlobals };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { addExtension } from "@weapp-core/shared";
|
|
3
|
+
import * as t from "@weapp-vite/ast/babelTypes";
|
|
4
|
+
import * as babel from "@weapp-vite/ast/babelCore";
|
|
5
|
+
//#region src/wxs/utils.ts
|
|
6
|
+
function normalizeWxsFilename(value, extension = "wxs") {
|
|
7
|
+
const normalized = extension.startsWith(".") ? extension.slice(1) : extension;
|
|
8
|
+
let filename = value;
|
|
9
|
+
filename = filename.replace(/\.[jt]s$/i, "");
|
|
10
|
+
filename = filename.replace(/\.(wxs|sjs)$/i, "");
|
|
11
|
+
return addExtension(filename, `.${normalized}`);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/wxs/index.ts
|
|
15
|
+
const nodeRequire = createRequire(import.meta.url);
|
|
16
|
+
let babelPresets;
|
|
17
|
+
/** 首次转换才加载 presets,兼容 Babel 的 ESM default 与 CommonJS 导出。 */
|
|
18
|
+
function loadBabelPreset(name) {
|
|
19
|
+
const loaded = nodeRequire(name);
|
|
20
|
+
return loaded.default ?? loaded;
|
|
21
|
+
}
|
|
22
|
+
function getBabelPresets() {
|
|
23
|
+
return babelPresets ??= {
|
|
24
|
+
env: loadBabelPreset("@babel/preset-env"),
|
|
25
|
+
typescript: loadBabelPreset("@babel/preset-typescript")
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function transformWxsCode(code, options) {
|
|
29
|
+
const presets = getBabelPresets();
|
|
30
|
+
const filename = options?.filename ?? "script.ts";
|
|
31
|
+
const extension = options?.extension ?? "wxs";
|
|
32
|
+
const preserveEsmExports = extension.replace(/^\./, "") === "sjs";
|
|
33
|
+
const importees = [];
|
|
34
|
+
const maybePushImportee = (value) => {
|
|
35
|
+
if (typeof value !== "string" || !value) return;
|
|
36
|
+
importees.push({ source: value });
|
|
37
|
+
};
|
|
38
|
+
const tryCollectArgument = (path) => {
|
|
39
|
+
const node = path.node;
|
|
40
|
+
if (t.isStringLiteral(node)) {
|
|
41
|
+
maybePushImportee(node.value);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (t.isTemplateLiteral(node) && node.expressions.length === 0) {
|
|
45
|
+
const value = node.quasis.map((q) => q.value.cooked ?? q.value.raw ?? "").join("");
|
|
46
|
+
maybePushImportee(value);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const evaluated = path.evaluate();
|
|
51
|
+
if (evaluated.confident) maybePushImportee(evaluated.value);
|
|
52
|
+
} catch {}
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
result: babel.transformSync(code, {
|
|
56
|
+
babelrc: false,
|
|
57
|
+
configFile: false,
|
|
58
|
+
presets: [[presets.env, {
|
|
59
|
+
modules: preserveEsmExports ? false : "commonjs",
|
|
60
|
+
targets: { ie: "11" }
|
|
61
|
+
}], presets.typescript],
|
|
62
|
+
filename,
|
|
63
|
+
plugins: [{ visitor: {
|
|
64
|
+
Directive: { enter(p) {
|
|
65
|
+
p.remove();
|
|
66
|
+
} },
|
|
67
|
+
CallExpression: { enter(p) {
|
|
68
|
+
const node = p.node;
|
|
69
|
+
if (!t.isIdentifier(node.callee, { name: "require" })) return;
|
|
70
|
+
if (node.arguments.length !== 1) return;
|
|
71
|
+
const argPath = p.get("arguments.0");
|
|
72
|
+
tryCollectArgument(argPath);
|
|
73
|
+
const arg = node.arguments[0];
|
|
74
|
+
if (t.isStringLiteral(arg)) arg.value = normalizeWxsFilename(arg.value, extension);
|
|
75
|
+
} },
|
|
76
|
+
ExpressionStatement(p) {
|
|
77
|
+
const expression = p.node.expression;
|
|
78
|
+
if (expression.type === "CallExpression" && expression.callee.type === "MemberExpression" && t.isIdentifier(expression.callee.object) && expression.callee.object.name === "Object" && t.isIdentifier(expression.callee.property) && expression.callee.property.name === "defineProperty" && expression.arguments.length >= 2 && t.isIdentifier(expression.arguments[0]) && expression.arguments[0].name === "exports" && t.isStringLiteral(expression.arguments[1]) && expression.arguments[1].value === "__esModule") p.remove();
|
|
79
|
+
},
|
|
80
|
+
AssignmentExpression: { enter(p) {
|
|
81
|
+
if (!preserveEsmExports || p.node.operator !== "=") return;
|
|
82
|
+
const left = p.node.left;
|
|
83
|
+
if (!t.isMemberExpression(left) || left.computed || !t.isIdentifier(left.object, { name: "module" }) || !t.isIdentifier(left.property, { name: "exports" }) || !p.parentPath.isExpressionStatement()) return;
|
|
84
|
+
p.parentPath.replaceWith(t.exportDefaultDeclaration(p.node.right));
|
|
85
|
+
} },
|
|
86
|
+
NewExpression: { enter(p) {
|
|
87
|
+
const node = p.node;
|
|
88
|
+
if (t.isIdentifier(node.callee, { name: "RegExp" })) p.replaceWith(t.callExpression(t.identifier("getRegExp"), node.arguments));
|
|
89
|
+
else if (t.isIdentifier(node.callee, { name: "Date" })) p.replaceWith(t.callExpression(t.identifier("getDate"), node.arguments));
|
|
90
|
+
} },
|
|
91
|
+
RegExpLiteral: { enter(p) {
|
|
92
|
+
const args = [t.stringLiteral(p.node.pattern)];
|
|
93
|
+
if (p.node.flags) args.push(t.stringLiteral(p.node.flags));
|
|
94
|
+
p.replaceWith(t.callExpression(t.identifier("getRegExp"), args));
|
|
95
|
+
} },
|
|
96
|
+
MemberExpression: { enter(p) {
|
|
97
|
+
if (preserveEsmExports) return;
|
|
98
|
+
const node = p.node;
|
|
99
|
+
if (!t.isIdentifier(node.object, { name: "exports" })) return;
|
|
100
|
+
const moduleExports = t.memberExpression(t.identifier("module"), t.identifier("exports"));
|
|
101
|
+
p.replaceWith(t.memberExpression(moduleExports, node.property, node.computed));
|
|
102
|
+
} },
|
|
103
|
+
ImportDeclaration: { enter(p) {
|
|
104
|
+
maybePushImportee(p.node.source.value);
|
|
105
|
+
} }
|
|
106
|
+
} }]
|
|
107
|
+
}),
|
|
108
|
+
importees
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { normalizeWxsFilename as n, transformWxsCode as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as transformWxsCode } from "./wxs-BT8btflA.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.6.0",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./dist/index.d.mts",
|
|
33
33
|
"import": "./dist/index.mjs"
|
|
34
34
|
},
|
|
35
|
+
"./vite": {
|
|
36
|
+
"types": "./dist/vite.d.mts",
|
|
37
|
+
"import": "./dist/vite.mjs"
|
|
38
|
+
},
|
|
35
39
|
"./config": {
|
|
36
40
|
"types": "./dist/config.d.mts",
|
|
37
41
|
"import": "./dist/config.mjs"
|
|
@@ -40,6 +44,10 @@
|
|
|
40
44
|
"types": "./dist/dashboard.d.mts",
|
|
41
45
|
"import": "./dist/dashboard.mjs"
|
|
42
46
|
},
|
|
47
|
+
"./dashboard/analyze": {
|
|
48
|
+
"types": "./dist/dashboard/analyze.d.mts",
|
|
49
|
+
"import": "./dist/dashboard/analyze.mjs"
|
|
50
|
+
},
|
|
43
51
|
"./dashboard/vite": {
|
|
44
52
|
"types": "./dist/dashboard/vite.d.mts",
|
|
45
53
|
"import": "./dist/dashboard/vite.mjs"
|
|
@@ -113,6 +121,10 @@
|
|
|
113
121
|
"./auto-import-presets/wevu-router": {
|
|
114
122
|
"types": "./dist/auto-import-presets/wevu-router.d.mts",
|
|
115
123
|
"import": "./dist/auto-import-presets/wevu-router.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./doctor": {
|
|
126
|
+
"types": "./dist/doctor.d.mts",
|
|
127
|
+
"import": "./dist/doctor.mjs"
|
|
116
128
|
}
|
|
117
129
|
},
|
|
118
130
|
"main": "./dist/index.mjs",
|
|
@@ -123,6 +135,7 @@
|
|
|
123
135
|
"wv": "bin/weapp-vite.js"
|
|
124
136
|
},
|
|
125
137
|
"files": [
|
|
138
|
+
"THIRD_PARTY_NOTICES.md",
|
|
126
139
|
"bin",
|
|
127
140
|
"client.d.ts",
|
|
128
141
|
"dist",
|
|
@@ -130,14 +143,14 @@
|
|
|
130
143
|
"volar.cjs"
|
|
131
144
|
],
|
|
132
145
|
"engines": {
|
|
133
|
-
"node": "^
|
|
146
|
+
"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
|
|
134
147
|
},
|
|
135
148
|
"publishConfig": {
|
|
136
149
|
"access": "public",
|
|
137
150
|
"registry": "https://registry.npmjs.org"
|
|
138
151
|
},
|
|
139
152
|
"peerDependencies": {
|
|
140
|
-
"@vitejs/devtools-kit": "^0.
|
|
153
|
+
"@vitejs/devtools-kit": "^0.8.0"
|
|
141
154
|
},
|
|
142
155
|
"peerDependenciesMeta": {
|
|
143
156
|
"@vitejs/devtools-kit": {
|
|
@@ -145,75 +158,93 @@
|
|
|
145
158
|
}
|
|
146
159
|
},
|
|
147
160
|
"dependencies": {
|
|
148
|
-
"@babel/
|
|
149
|
-
"@babel/
|
|
161
|
+
"@babel/core": "^8.0.7",
|
|
162
|
+
"@babel/plugin-transform-modules-commonjs": "^8.0.1",
|
|
163
|
+
"@babel/preset-env": "^8.0.7",
|
|
164
|
+
"@babel/preset-typescript": "^8.0.7",
|
|
150
165
|
"@jridgewell/remapping": "^2.3.5",
|
|
151
|
-
"@
|
|
166
|
+
"@modelcontextprotocol/node": "^2.1.1",
|
|
167
|
+
"@modelcontextprotocol/server": "^2.3.1",
|
|
168
|
+
"@types/picomatch": "^4.0.3",
|
|
169
|
+
"@types/set-value": "^4.0.3",
|
|
170
|
+
"@typescript-eslint/parser": "^8.71.2",
|
|
171
|
+
"@vercel/detect-agent": "^1.2.7",
|
|
172
|
+
"@volar/language-service": "^2.4.28",
|
|
152
173
|
"@volar/typescript": "^2.4.28",
|
|
153
|
-
"@vue/language-core": "^3.3.
|
|
154
|
-
"@weapp-core/constants": "0.
|
|
155
|
-
"@weapp-core/init": "6.0.
|
|
156
|
-
"@weapp-core/logger": "3.1.
|
|
157
|
-
"@weapp-core/schematics": "6.2.
|
|
158
|
-
"@weapp-core/shared": "3.
|
|
159
|
-
"@weapp-tailwindcss/engine": "0.1.
|
|
160
|
-
"@weapp-vite/
|
|
161
|
-
"@weapp-vite/
|
|
162
|
-
"@weapp-vite/
|
|
163
|
-
"@weapp-vite/
|
|
164
|
-
"@weapp-vite/
|
|
165
|
-
"@weapp-vite/
|
|
166
|
-
"@weapp-vite/
|
|
167
|
-
"@weapp-vite/
|
|
168
|
-
"@weapp-vite/
|
|
169
|
-
"@
|
|
170
|
-
"@wevu/
|
|
171
|
-
"
|
|
174
|
+
"@vue/language-core": "^3.3.13",
|
|
175
|
+
"@weapp-core/constants": "0.4.0",
|
|
176
|
+
"@weapp-core/init": "6.0.26",
|
|
177
|
+
"@weapp-core/logger": "3.1.10",
|
|
178
|
+
"@weapp-core/schematics": "6.2.10",
|
|
179
|
+
"@weapp-core/shared": "3.3.0",
|
|
180
|
+
"@weapp-tailwindcss/engine": "0.1.6",
|
|
181
|
+
"@weapp-vite/acceptance": "0.1.1",
|
|
182
|
+
"@weapp-vite/ast": "7.6.0",
|
|
183
|
+
"@weapp-vite/eslint": "0.2.11",
|
|
184
|
+
"@weapp-vite/hmr": "0.2.2",
|
|
185
|
+
"@weapp-vite/i18n": "0.2.10",
|
|
186
|
+
"@weapp-vite/mcp": "2.1.0",
|
|
187
|
+
"@weapp-vite/miniprogram-automator": "1.4.0",
|
|
188
|
+
"@weapp-vite/tailwindcss": "1.0.1",
|
|
189
|
+
"@weapp-vite/volar": "2.1.14",
|
|
190
|
+
"@weapp-vite/web": "2.0.1",
|
|
191
|
+
"@wevu/api": "0.3.9",
|
|
192
|
+
"@wevu/web-apis": "1.3.6",
|
|
193
|
+
"cac": "^7.1.0",
|
|
172
194
|
"chokidar": "^5.0.0",
|
|
173
195
|
"comment-json": "^5.0.0",
|
|
174
|
-
"devframe": "1.
|
|
175
|
-
"dotenv
|
|
196
|
+
"devframe": "1.2.5",
|
|
197
|
+
"dotenv": "^18.0.8",
|
|
198
|
+
"dotenv-expand": "^1000.0.0",
|
|
199
|
+
"eslint": "^10.13.0",
|
|
176
200
|
"fdir": "^6.5.0",
|
|
201
|
+
"get-tsconfig": "^4.14.3",
|
|
177
202
|
"htmlparser2": "^12.0.0",
|
|
178
203
|
"local-pkg": "^1.2.1",
|
|
179
204
|
"lru-cache": "^11.5.3",
|
|
180
|
-
"magic-string": "^1.4.
|
|
205
|
+
"magic-string": "^1.4.3",
|
|
181
206
|
"merge": "^2.1.1",
|
|
182
207
|
"obug": "^3.0.0",
|
|
183
|
-
"p-queue": "^9.3.
|
|
184
|
-
"package-manager-detector": "^1.
|
|
208
|
+
"p-queue": "^9.3.5",
|
|
209
|
+
"package-manager-detector": "^1.9.0",
|
|
185
210
|
"pathe": "^2.0.3",
|
|
186
211
|
"picomatch": "^4.0.7",
|
|
187
|
-
"postcss": "^8.5.
|
|
212
|
+
"postcss": "^8.5.30",
|
|
188
213
|
"postcss-selector-parser": "^7.1.6",
|
|
189
214
|
"postcss-value-parser": "4.2.0",
|
|
190
|
-
"rolldown": "1.2.
|
|
191
|
-
"rolldown-plugin-dts": "0.28.
|
|
192
|
-
"rolldown-require": "2.0.
|
|
215
|
+
"rolldown": "1.2.14",
|
|
216
|
+
"rolldown-plugin-dts": "0.28.8",
|
|
217
|
+
"rolldown-require": "2.0.36",
|
|
193
218
|
"semver": "^7.8.5",
|
|
194
219
|
"tinyexec": "^1.3.1",
|
|
195
220
|
"typescript": "^6.0.3",
|
|
196
|
-
"vite": "8.3.
|
|
197
|
-
"vite-plugin-performance": "2.0.
|
|
198
|
-
"vite-tsconfig-paths": "^
|
|
199
|
-
"vue": "^3.5.
|
|
200
|
-
"vue-
|
|
201
|
-
"
|
|
202
|
-
"weapp-
|
|
203
|
-
"
|
|
221
|
+
"vite": "8.3.4",
|
|
222
|
+
"vite-plugin-performance": "2.0.9",
|
|
223
|
+
"vite-tsconfig-paths": "^7.0.0-alpha.3",
|
|
224
|
+
"vue": "^3.5.44",
|
|
225
|
+
"vue-eslint-parser": "^10.4.1",
|
|
226
|
+
"vue-tsc": "^3.3.13",
|
|
227
|
+
"weapp-ide-cli": "6.3.0",
|
|
228
|
+
"weapp-tailwindcss": "^5.6.3",
|
|
229
|
+
"wevu": "7.6.0",
|
|
230
|
+
"zod": "^4.6.7"
|
|
204
231
|
},
|
|
205
232
|
"optionalDependencies": {
|
|
206
|
-
"@swc/core": "^1.16.
|
|
233
|
+
"@swc/core": "^1.16.18"
|
|
207
234
|
},
|
|
208
235
|
"devDependencies": {
|
|
209
|
-
"@
|
|
210
|
-
"
|
|
236
|
+
"@devframes/agentic": "1.2.5",
|
|
237
|
+
"@devframes/hub": "1.2.5",
|
|
238
|
+
"@devframes/hub-ui": "1.2.5",
|
|
239
|
+
"@modelcontextprotocol/client": "^2.3.1",
|
|
240
|
+
"@vitejs/devtools": "0.8.0",
|
|
241
|
+
"@vitejs/devtools-kit": "0.8.0",
|
|
242
|
+
"oxc-parser": "^0.154.0",
|
|
211
243
|
"oxc-walker": "^1.1.1",
|
|
212
244
|
"tailwindcss": "^4.3.3",
|
|
213
245
|
"ts-morph": "^28.0.0"
|
|
214
246
|
},
|
|
215
247
|
"scripts": {
|
|
216
|
-
"stub": "unbuild --stub",
|
|
217
248
|
"dev": "tsdown -w --sourcemap",
|
|
218
249
|
"build": "tsdown",
|
|
219
250
|
"release": "tsx scripts/release.ts",
|
|
@@ -225,9 +256,10 @@
|
|
|
225
256
|
"benchmark:auto-import:ci": "node --import tsx scripts/benchmark-auto-import-ci.ts",
|
|
226
257
|
"test:dev": "vitest",
|
|
227
258
|
"test": "vitest run",
|
|
228
|
-
"test:types": "
|
|
259
|
+
"test:types": "pnpm run test:types:check",
|
|
260
|
+
"test:types:check": "cd test-d/auto-import-presets && tsd --files \"**/*.test-d.ts\" && cd ../auto-routes-define-app-json && tsd --files \"**/*.test-d.ts\" && cd ../config-define-config && tsd --files \"**/*.test-d.ts\" && cd ../config-public-types && tsd --files \"**/*.test-d.ts\" && cd ../upload-config && tsd --files \"**/*.test-d.ts\" && cd ../i18n-public-types && tsd --files \"**/*.test-d.ts\" && cd ../internal-src-types && tsd --files \"**/*.test-d.ts\" && cd ../resolvers-public-types && tsd --files \"**/*.test-d.ts\" && cd ../runtime-public-types && tsd --files \"**/*.test-d.ts\" && cd ../test-artifact-public-types && tsd --files \"**/*.test-d.ts\" && cd ../dashboard-public-types && tsd --files \"**/*.test-d.ts\" && cd ../vite-public-types && tsd --files \"**/*.test-d.ts\" && cd ../doctor-public-types && tsd --files \"**/*.test-d.ts\"",
|
|
229
261
|
"lint:src": "eslint src --ext .ts",
|
|
230
262
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
231
|
-
"sync": "
|
|
263
|
+
"sync": "repo release sync-npmmirror --package weapp-vite"
|
|
232
264
|
}
|
|
233
265
|
}
|