weapp-vite 1.7.6 → 1.7.7
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-NWYDKKXS.mjs → chunk-K6LFTXPJ.mjs} +1 -1
- package/dist/{chunk-LPM5NKJS.mjs → chunk-NBYOQ6NU.mjs} +31 -16
- package/dist/{chunk-F57UPGHA.mjs → chunk-UZ7WU232.mjs} +2 -2
- package/dist/cli.cjs +32 -20
- package/dist/cli.mjs +3 -3
- package/dist/config.mjs +2 -2
- package/dist/index.cjs +31 -19
- package/dist/index.mjs +3 -3
- package/dist/json.mjs +1 -1
- package/package.json +7 -5
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__commonJS,
|
|
3
3
|
__toESM,
|
|
4
4
|
init_esm_shims
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UZ7WU232.mjs";
|
|
6
6
|
|
|
7
7
|
// ../../node_modules/.pnpm/debounce@2.2.0/node_modules/debounce/index.js
|
|
8
8
|
var require_debounce = __commonJS({
|
|
@@ -95,7 +95,7 @@ var logger_default = logger;
|
|
|
95
95
|
init_esm_shims();
|
|
96
96
|
|
|
97
97
|
// package.json
|
|
98
|
-
var version = "1.7.
|
|
98
|
+
var version = "1.7.7";
|
|
99
99
|
|
|
100
100
|
// src/constants.ts
|
|
101
101
|
var VERSION = version;
|
|
@@ -105,10 +105,11 @@ var supportedCssLangs = ["wxss", "scss", "less", "sass", "styl"];
|
|
|
105
105
|
|
|
106
106
|
// src/context.ts
|
|
107
107
|
init_esm_shims();
|
|
108
|
-
import { createRequire } from "node:module";
|
|
109
108
|
import process from "node:process";
|
|
110
109
|
import { addExtension as addExtension2, defu as defu2, get as get2, isObject as isObject3, objectHash, removeExtension as removeExtension2 } from "@weapp-core/shared";
|
|
110
|
+
import { deleteAsync } from "del";
|
|
111
111
|
import fs5 from "fs-extra";
|
|
112
|
+
import { getPackageInfo, resolveModule } from "local-pkg";
|
|
112
113
|
import path5 from "pathe";
|
|
113
114
|
import { build, loadConfigFromFile } from "vite";
|
|
114
115
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
@@ -890,7 +891,6 @@ function vitePluginWeapp(ctx, subPackageMeta) {
|
|
|
890
891
|
|
|
891
892
|
// src/context.ts
|
|
892
893
|
var debug2 = createDebugger("weapp-vite:context");
|
|
893
|
-
var require2 = createRequire(import.meta.url);
|
|
894
894
|
var once = false;
|
|
895
895
|
function logBuildIndependentSubPackageFinish(root) {
|
|
896
896
|
if (!once) {
|
|
@@ -1068,7 +1068,15 @@ var CompilerContext = class {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
async build() {
|
|
1070
1070
|
if (this.mpDistRoot) {
|
|
1071
|
-
await
|
|
1071
|
+
const deletedFilePaths = await deleteAsync(
|
|
1072
|
+
[
|
|
1073
|
+
path5.resolve(this.outDir, "**")
|
|
1074
|
+
],
|
|
1075
|
+
{
|
|
1076
|
+
ignore: ["**/miniprogram_npm/**"]
|
|
1077
|
+
}
|
|
1078
|
+
);
|
|
1079
|
+
debug2?.("deletedFilePaths", deletedFilePaths);
|
|
1072
1080
|
logger_default.success(`\u5DF2\u6E05\u7A7A ${this.mpDistRoot} \u76EE\u5F55`);
|
|
1073
1081
|
}
|
|
1074
1082
|
debug2?.("build start");
|
|
@@ -1178,6 +1186,7 @@ var CompilerContext = class {
|
|
|
1178
1186
|
}
|
|
1179
1187
|
];
|
|
1180
1188
|
}
|
|
1189
|
+
const heading = subPackage?.root ? `\u5206\u5305[${subPackage.root}]:` : "";
|
|
1181
1190
|
for (const relation of packNpmRelationList) {
|
|
1182
1191
|
const packageJsonPath = path5.resolve(this.cwd, relation.packageJsonPath);
|
|
1183
1192
|
if (await fs5.exists(packageJsonPath)) {
|
|
@@ -1192,31 +1201,37 @@ var CompilerContext = class {
|
|
|
1192
1201
|
continue;
|
|
1193
1202
|
}
|
|
1194
1203
|
}
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1204
|
+
const packageInfo = await getPackageInfo(dep);
|
|
1205
|
+
if (!packageInfo) {
|
|
1206
|
+
continue;
|
|
1207
|
+
}
|
|
1208
|
+
const { packageJson: targetJson, rootPath } = packageInfo;
|
|
1197
1209
|
if (Reflect.has(targetJson, "miniprogram") && targetJson.miniprogram) {
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
debug2?.(`${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1210
|
+
const destOutDir = path5.join(outDir, dep);
|
|
1211
|
+
if (!isDependenciesCacheOutdate && await fs5.exists(destOutDir)) {
|
|
1212
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1202
1213
|
continue;
|
|
1203
1214
|
}
|
|
1204
1215
|
await fs5.copy(
|
|
1205
1216
|
path5.resolve(
|
|
1206
|
-
|
|
1217
|
+
rootPath,
|
|
1207
1218
|
targetJson.miniprogram
|
|
1208
1219
|
),
|
|
1209
|
-
|
|
1220
|
+
destOutDir
|
|
1210
1221
|
);
|
|
1211
1222
|
} else {
|
|
1212
1223
|
const destOutDir = path5.join(outDir, dep);
|
|
1213
1224
|
if (!isDependenciesCacheOutdate && await fs5.exists(destOutDir)) {
|
|
1214
|
-
|
|
1225
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1226
|
+
continue;
|
|
1227
|
+
}
|
|
1228
|
+
const index = resolveModule(dep);
|
|
1229
|
+
if (!index) {
|
|
1215
1230
|
continue;
|
|
1216
1231
|
}
|
|
1217
1232
|
const mergedOptions = defu2(options, {
|
|
1218
1233
|
entry: {
|
|
1219
|
-
index
|
|
1234
|
+
index
|
|
1220
1235
|
},
|
|
1221
1236
|
format: ["cjs"],
|
|
1222
1237
|
outDir: destOutDir,
|
|
@@ -1241,7 +1256,7 @@ var CompilerContext = class {
|
|
|
1241
1256
|
}
|
|
1242
1257
|
finalOptions && await tsupBuild(finalOptions);
|
|
1243
1258
|
}
|
|
1244
|
-
logger_default.success(`${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1259
|
+
logger_default.success(`${heading} ${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1245
1260
|
}
|
|
1246
1261
|
}
|
|
1247
1262
|
}
|
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
package/dist/cli.cjs
CHANGED
|
@@ -28,13 +28,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
mod
|
|
29
29
|
));
|
|
30
30
|
|
|
31
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
32
|
-
var getImportMetaUrl, importMetaUrl;
|
|
31
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
33
32
|
var init_cjs_shims = __esm({
|
|
34
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
33
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
35
34
|
"use strict";
|
|
36
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
37
|
-
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
37
|
|
|
@@ -132,7 +129,7 @@ var import_weapp_ide_cli = require("weapp-ide-cli");
|
|
|
132
129
|
init_cjs_shims();
|
|
133
130
|
|
|
134
131
|
// package.json
|
|
135
|
-
var version = "1.7.
|
|
132
|
+
var version = "1.7.7";
|
|
136
133
|
|
|
137
134
|
// src/constants.ts
|
|
138
135
|
var VERSION = version;
|
|
@@ -142,10 +139,11 @@ var supportedCssLangs = ["wxss", "scss", "less", "sass", "styl"];
|
|
|
142
139
|
|
|
143
140
|
// src/context.ts
|
|
144
141
|
init_cjs_shims();
|
|
145
|
-
var import_node_module = require("module");
|
|
146
142
|
var import_node_process = __toESM(require("process"), 1);
|
|
147
143
|
var import_shared5 = require("@weapp-core/shared");
|
|
144
|
+
var import_del = require("del");
|
|
148
145
|
var import_fs_extra5 = __toESM(require("fs-extra"), 1);
|
|
146
|
+
var import_local_pkg = require("local-pkg");
|
|
149
147
|
var import_pathe5 = __toESM(require("pathe"), 1);
|
|
150
148
|
var import_vite2 = require("vite");
|
|
151
149
|
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1);
|
|
@@ -935,7 +933,6 @@ init_cjs_shims();
|
|
|
935
933
|
|
|
936
934
|
// src/context.ts
|
|
937
935
|
var debug2 = createDebugger("weapp-vite:context");
|
|
938
|
-
var require2 = (0, import_node_module.createRequire)(importMetaUrl);
|
|
939
936
|
var once = false;
|
|
940
937
|
function logBuildIndependentSubPackageFinish(root) {
|
|
941
938
|
if (!once) {
|
|
@@ -1113,7 +1110,15 @@ var CompilerContext = class {
|
|
|
1113
1110
|
}
|
|
1114
1111
|
async build() {
|
|
1115
1112
|
if (this.mpDistRoot) {
|
|
1116
|
-
await
|
|
1113
|
+
const deletedFilePaths = await (0, import_del.deleteAsync)(
|
|
1114
|
+
[
|
|
1115
|
+
import_pathe5.default.resolve(this.outDir, "**")
|
|
1116
|
+
],
|
|
1117
|
+
{
|
|
1118
|
+
ignore: ["**/miniprogram_npm/**"]
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
debug2?.("deletedFilePaths", deletedFilePaths);
|
|
1117
1122
|
logger_default.success(`\u5DF2\u6E05\u7A7A ${this.mpDistRoot} \u76EE\u5F55`);
|
|
1118
1123
|
}
|
|
1119
1124
|
debug2?.("build start");
|
|
@@ -1223,6 +1228,7 @@ var CompilerContext = class {
|
|
|
1223
1228
|
}
|
|
1224
1229
|
];
|
|
1225
1230
|
}
|
|
1231
|
+
const heading = subPackage?.root ? `\u5206\u5305[${subPackage.root}]:` : "";
|
|
1226
1232
|
for (const relation of packNpmRelationList) {
|
|
1227
1233
|
const packageJsonPath = import_pathe5.default.resolve(this.cwd, relation.packageJsonPath);
|
|
1228
1234
|
if (await import_fs_extra5.default.exists(packageJsonPath)) {
|
|
@@ -1237,31 +1243,37 @@ var CompilerContext = class {
|
|
|
1237
1243
|
continue;
|
|
1238
1244
|
}
|
|
1239
1245
|
}
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1246
|
+
const packageInfo = await (0, import_local_pkg.getPackageInfo)(dep);
|
|
1247
|
+
if (!packageInfo) {
|
|
1248
|
+
continue;
|
|
1249
|
+
}
|
|
1250
|
+
const { packageJson: targetJson, rootPath } = packageInfo;
|
|
1242
1251
|
if (Reflect.has(targetJson, "miniprogram") && targetJson.miniprogram) {
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
debug2?.(`${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1252
|
+
const destOutDir = import_pathe5.default.join(outDir, dep);
|
|
1253
|
+
if (!isDependenciesCacheOutdate && await import_fs_extra5.default.exists(destOutDir)) {
|
|
1254
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1247
1255
|
continue;
|
|
1248
1256
|
}
|
|
1249
1257
|
await import_fs_extra5.default.copy(
|
|
1250
1258
|
import_pathe5.default.resolve(
|
|
1251
|
-
|
|
1259
|
+
rootPath,
|
|
1252
1260
|
targetJson.miniprogram
|
|
1253
1261
|
),
|
|
1254
|
-
|
|
1262
|
+
destOutDir
|
|
1255
1263
|
);
|
|
1256
1264
|
} else {
|
|
1257
1265
|
const destOutDir = import_pathe5.default.join(outDir, dep);
|
|
1258
1266
|
if (!isDependenciesCacheOutdate && await import_fs_extra5.default.exists(destOutDir)) {
|
|
1259
|
-
|
|
1267
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
1270
|
+
const index = (0, import_local_pkg.resolveModule)(dep);
|
|
1271
|
+
if (!index) {
|
|
1260
1272
|
continue;
|
|
1261
1273
|
}
|
|
1262
1274
|
const mergedOptions = (0, import_shared5.defu)(options, {
|
|
1263
1275
|
entry: {
|
|
1264
|
-
index
|
|
1276
|
+
index
|
|
1265
1277
|
},
|
|
1266
1278
|
format: ["cjs"],
|
|
1267
1279
|
outDir: destOutDir,
|
|
@@ -1286,7 +1298,7 @@ var CompilerContext = class {
|
|
|
1286
1298
|
}
|
|
1287
1299
|
finalOptions && await tsupBuild(finalOptions);
|
|
1288
1300
|
}
|
|
1289
|
-
logger_default.success(`${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1301
|
+
logger_default.success(`${heading} ${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1290
1302
|
}
|
|
1291
1303
|
}
|
|
1292
1304
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
VERSION,
|
|
3
3
|
createCompilerContext,
|
|
4
4
|
logger_default
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NBYOQ6NU.mjs";
|
|
6
|
+
import "./chunk-K6LFTXPJ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UZ7WU232.mjs";
|
|
10
10
|
|
|
11
11
|
// src/cli.ts
|
|
12
12
|
init_esm_shims();
|
package/dist/config.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -33,13 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
37
|
-
var getImportMetaUrl, importMetaUrl;
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
38
37
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
39
|
"use strict";
|
|
41
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
42
|
-
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
42
|
|
|
@@ -136,10 +133,11 @@ init_cjs_shims();
|
|
|
136
133
|
|
|
137
134
|
// src/context.ts
|
|
138
135
|
init_cjs_shims();
|
|
139
|
-
var import_node_module = require("module");
|
|
140
136
|
var import_node_process = __toESM(require("process"), 1);
|
|
141
137
|
var import_shared5 = require("@weapp-core/shared");
|
|
138
|
+
var import_del = require("del");
|
|
142
139
|
var import_fs_extra5 = __toESM(require("fs-extra"), 1);
|
|
140
|
+
var import_local_pkg = require("local-pkg");
|
|
143
141
|
var import_pathe5 = __toESM(require("pathe"), 1);
|
|
144
142
|
var import_vite2 = require("vite");
|
|
145
143
|
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1);
|
|
@@ -935,7 +933,6 @@ init_cjs_shims();
|
|
|
935
933
|
|
|
936
934
|
// src/context.ts
|
|
937
935
|
var debug2 = createDebugger("weapp-vite:context");
|
|
938
|
-
var require2 = (0, import_node_module.createRequire)(importMetaUrl);
|
|
939
936
|
var once = false;
|
|
940
937
|
function logBuildIndependentSubPackageFinish(root) {
|
|
941
938
|
if (!once) {
|
|
@@ -1113,7 +1110,15 @@ var CompilerContext = class {
|
|
|
1113
1110
|
}
|
|
1114
1111
|
async build() {
|
|
1115
1112
|
if (this.mpDistRoot) {
|
|
1116
|
-
await
|
|
1113
|
+
const deletedFilePaths = await (0, import_del.deleteAsync)(
|
|
1114
|
+
[
|
|
1115
|
+
import_pathe5.default.resolve(this.outDir, "**")
|
|
1116
|
+
],
|
|
1117
|
+
{
|
|
1118
|
+
ignore: ["**/miniprogram_npm/**"]
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
debug2?.("deletedFilePaths", deletedFilePaths);
|
|
1117
1122
|
logger_default.success(`\u5DF2\u6E05\u7A7A ${this.mpDistRoot} \u76EE\u5F55`);
|
|
1118
1123
|
}
|
|
1119
1124
|
debug2?.("build start");
|
|
@@ -1223,6 +1228,7 @@ var CompilerContext = class {
|
|
|
1223
1228
|
}
|
|
1224
1229
|
];
|
|
1225
1230
|
}
|
|
1231
|
+
const heading = subPackage?.root ? `\u5206\u5305[${subPackage.root}]:` : "";
|
|
1226
1232
|
for (const relation of packNpmRelationList) {
|
|
1227
1233
|
const packageJsonPath = import_pathe5.default.resolve(this.cwd, relation.packageJsonPath);
|
|
1228
1234
|
if (await import_fs_extra5.default.exists(packageJsonPath)) {
|
|
@@ -1237,31 +1243,37 @@ var CompilerContext = class {
|
|
|
1237
1243
|
continue;
|
|
1238
1244
|
}
|
|
1239
1245
|
}
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1246
|
+
const packageInfo = await (0, import_local_pkg.getPackageInfo)(dep);
|
|
1247
|
+
if (!packageInfo) {
|
|
1248
|
+
continue;
|
|
1249
|
+
}
|
|
1250
|
+
const { packageJson: targetJson, rootPath } = packageInfo;
|
|
1242
1251
|
if (Reflect.has(targetJson, "miniprogram") && targetJson.miniprogram) {
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
debug2?.(`${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1252
|
+
const destOutDir = import_pathe5.default.join(outDir, dep);
|
|
1253
|
+
if (!isDependenciesCacheOutdate && await import_fs_extra5.default.exists(destOutDir)) {
|
|
1254
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1247
1255
|
continue;
|
|
1248
1256
|
}
|
|
1249
1257
|
await import_fs_extra5.default.copy(
|
|
1250
1258
|
import_pathe5.default.resolve(
|
|
1251
|
-
|
|
1259
|
+
rootPath,
|
|
1252
1260
|
targetJson.miniprogram
|
|
1253
1261
|
),
|
|
1254
|
-
|
|
1262
|
+
destOutDir
|
|
1255
1263
|
);
|
|
1256
1264
|
} else {
|
|
1257
1265
|
const destOutDir = import_pathe5.default.join(outDir, dep);
|
|
1258
1266
|
if (!isDependenciesCacheOutdate && await import_fs_extra5.default.exists(destOutDir)) {
|
|
1259
|
-
|
|
1267
|
+
logger_default.info(`${heading} ${dep} \u4F9D\u8D56\u672A\u53D1\u751F\u53D8\u5316\uFF0C\u8DF3\u8FC7\u5904\u7406!`);
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
1270
|
+
const index = (0, import_local_pkg.resolveModule)(dep);
|
|
1271
|
+
if (!index) {
|
|
1260
1272
|
continue;
|
|
1261
1273
|
}
|
|
1262
1274
|
const mergedOptions = (0, import_shared5.defu)(options, {
|
|
1263
1275
|
entry: {
|
|
1264
|
-
index
|
|
1276
|
+
index
|
|
1265
1277
|
},
|
|
1266
1278
|
format: ["cjs"],
|
|
1267
1279
|
outDir: destOutDir,
|
|
@@ -1286,7 +1298,7 @@ var CompilerContext = class {
|
|
|
1286
1298
|
}
|
|
1287
1299
|
finalOptions && await tsupBuild(finalOptions);
|
|
1288
1300
|
}
|
|
1289
|
-
logger_default.success(`${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1301
|
+
logger_default.success(`${heading} ${dep} \u4F9D\u8D56\u5904\u7406\u5B8C\u6210!`);
|
|
1290
1302
|
}
|
|
1291
1303
|
}
|
|
1292
1304
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompilerContext,
|
|
3
3
|
createCompilerContext
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NBYOQ6NU.mjs";
|
|
5
|
+
import "./chunk-K6LFTXPJ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
init_esm_shims
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UZ7WU232.mjs";
|
|
9
9
|
|
|
10
10
|
// src/index.ts
|
|
11
11
|
init_esm_shims();
|
package/dist/json.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.7",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -68,21 +68,23 @@
|
|
|
68
68
|
"cac": "^6.7.14",
|
|
69
69
|
"comment-json": "^4.2.5",
|
|
70
70
|
"debug": "^4.3.7",
|
|
71
|
+
"del": "^8.0.0",
|
|
71
72
|
"esbuild": "^0.24.0",
|
|
72
73
|
"fdir": "^6.4.2",
|
|
73
74
|
"fs-extra": "^11.2.0",
|
|
74
75
|
"htmlparser2": "^9.1.0",
|
|
75
|
-
"
|
|
76
|
+
"local-pkg": "^0.5.1",
|
|
77
|
+
"magic-string": "^0.30.13",
|
|
76
78
|
"pathe": "^1.1.2",
|
|
77
79
|
"picomatch": "^4.0.2",
|
|
78
80
|
"tsup": "^8.3.5",
|
|
79
81
|
"vite": "^5.4.11",
|
|
80
|
-
"vite-tsconfig-paths": "^5.1.
|
|
82
|
+
"vite-tsconfig-paths": "^5.1.3",
|
|
81
83
|
"@weapp-core/init": "^1.1.10",
|
|
82
84
|
"@weapp-core/logger": "^1.0.1",
|
|
83
85
|
"@weapp-core/schematics": "^1.0.5",
|
|
84
|
-
"weapp-
|
|
85
|
-
"
|
|
86
|
+
"@weapp-core/shared": "^1.0.4",
|
|
87
|
+
"weapp-ide-cli": "^2.0.6"
|
|
86
88
|
},
|
|
87
89
|
"publishConfig": {
|
|
88
90
|
"access": "public",
|