weapp-vite 5.11.3 → 5.12.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/auto-import-components/resolvers.cjs +6 -6
- package/dist/auto-import-components/resolvers.mjs +1 -1
- package/dist/auto-routes.cjs +8 -8
- package/dist/auto-routes.mjs +4 -4
- package/dist/chunk-2KCQ5UBK.cjs +6 -0
- package/dist/{chunk-PEV37KCS.mjs → chunk-46VA2TEF.mjs} +1 -1
- package/dist/{chunk-HJIQ5LPK.cjs → chunk-7DRE4BEK.cjs} +6 -6
- package/dist/{chunk-TYFSFH5L.mjs → chunk-7KGGMLZZ.mjs} +1 -1
- package/dist/{chunk-OHNCYFYF.cjs → chunk-ANDG4OME.cjs} +283 -264
- package/dist/{chunk-DJQDNKZV.cjs → chunk-INJNZ3X2.cjs} +2 -2
- package/dist/{chunk-HXREOGBF.mjs → chunk-IVFT4TLR.mjs} +1 -1
- package/dist/{chunk-I2SATVTN.mjs → chunk-LLYDSPS7.mjs} +2 -2
- package/dist/{chunk-FRDBMQFQ.mjs → chunk-MDUMD5GP.mjs} +2 -2
- package/dist/{chunk-SDBHHXQJ.cjs → chunk-MTUYQJIF.cjs} +2 -2
- package/dist/{chunk-Q4XJZVQL.cjs → chunk-N5FVU7GR.cjs} +2 -2
- package/dist/{chunk-LPIU437C.mjs → chunk-TS7WK45E.mjs} +61 -42
- package/dist/cli.cjs +77 -77
- package/dist/cli.mjs +3 -3
- package/dist/{config-D1eBLaq2.d.cts → config-DgMm7Geo.d.cts} +19 -19
- package/dist/{config-9JglUSN2.d.ts → config-sFIhUM69.d.ts} +19 -19
- package/dist/config.cjs +4 -4
- package/dist/config.d.cts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/config.mjs +3 -3
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +6 -6
- package/dist/json.cjs +3 -3
- package/dist/json.d.cts +1 -2
- package/dist/json.d.ts +1 -2
- package/dist/json.mjs +2 -2
- package/dist/types.cjs +9 -9
- package/dist/types.d.cts +1 -2
- package/dist/types.d.ts +1 -2
- package/dist/types.mjs +2 -2
- package/dist/volar.cjs +2 -2
- package/dist/volar.mjs +1 -1
- package/modules/analyze-dashboard/assets/vue.js +1 -1
- package/package.json +15 -16
- package/dist/chunk-FKD2WGWW.cjs +0 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
|
|
4
4
|
|
|
5
5
|
// src/config.ts
|
|
6
|
-
|
|
6
|
+
_chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
|
|
7
7
|
function defineConfig(config) {
|
|
8
8
|
return config;
|
|
9
9
|
}
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getCompilerContext,
|
|
3
3
|
resetCompilerContext,
|
|
4
4
|
setActiveCompilerContextKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TS7WK45E.mjs";
|
|
6
6
|
import {
|
|
7
7
|
init_esm_shims
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MDUMD5GP.mjs";
|
|
9
9
|
|
|
10
10
|
// src/createContext.ts
|
|
11
11
|
init_esm_shims();
|
|
@@ -33,11 +33,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.7_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
|
|
37
37
|
import path from "path";
|
|
38
38
|
import { fileURLToPath } from "url";
|
|
39
39
|
var init_esm_shims = __esm({
|
|
40
|
-
"../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.
|
|
40
|
+
"../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.7_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
|
|
41
41
|
"use strict";
|
|
42
42
|
}
|
|
43
43
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
|
|
4
4
|
|
|
5
5
|
// src/json.ts
|
|
6
|
-
|
|
6
|
+
_chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
|
|
7
7
|
var defineAppJson = (config) => {
|
|
8
8
|
return config;
|
|
9
9
|
};
|
|
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.7_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.7_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__require,
|
|
4
4
|
__toESM,
|
|
5
5
|
init_esm_shims
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MDUMD5GP.mjs";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
9
9
|
var require_debug = __commonJS({
|
|
@@ -10069,7 +10069,7 @@ var PathScurryBase = class {
|
|
|
10069
10069
|
const dirs = /* @__PURE__ */ new Set();
|
|
10070
10070
|
const queue = [entry];
|
|
10071
10071
|
let processing = 0;
|
|
10072
|
-
const
|
|
10072
|
+
const process11 = () => {
|
|
10073
10073
|
let paused = false;
|
|
10074
10074
|
while (!paused) {
|
|
10075
10075
|
const dir = queue.shift();
|
|
@@ -10110,9 +10110,9 @@ var PathScurryBase = class {
|
|
|
10110
10110
|
}
|
|
10111
10111
|
}
|
|
10112
10112
|
if (paused && !results.flowing) {
|
|
10113
|
-
results.once("drain",
|
|
10113
|
+
results.once("drain", process11);
|
|
10114
10114
|
} else if (!sync2) {
|
|
10115
|
-
|
|
10115
|
+
process11();
|
|
10116
10116
|
}
|
|
10117
10117
|
};
|
|
10118
10118
|
let sync2 = true;
|
|
@@ -10120,7 +10120,7 @@ var PathScurryBase = class {
|
|
|
10120
10120
|
sync2 = false;
|
|
10121
10121
|
}
|
|
10122
10122
|
};
|
|
10123
|
-
|
|
10123
|
+
process11();
|
|
10124
10124
|
return results;
|
|
10125
10125
|
}
|
|
10126
10126
|
streamSync(entry = this.cwd, opts = {}) {
|
|
@@ -10138,7 +10138,7 @@ var PathScurryBase = class {
|
|
|
10138
10138
|
}
|
|
10139
10139
|
const queue = [entry];
|
|
10140
10140
|
let processing = 0;
|
|
10141
|
-
const
|
|
10141
|
+
const process11 = () => {
|
|
10142
10142
|
let paused = false;
|
|
10143
10143
|
while (!paused) {
|
|
10144
10144
|
const dir = queue.shift();
|
|
@@ -10172,9 +10172,9 @@ var PathScurryBase = class {
|
|
|
10172
10172
|
}
|
|
10173
10173
|
}
|
|
10174
10174
|
if (paused && !results.flowing)
|
|
10175
|
-
results.once("drain",
|
|
10175
|
+
results.once("drain", process11);
|
|
10176
10176
|
};
|
|
10177
|
-
|
|
10177
|
+
process11();
|
|
10178
10178
|
return results;
|
|
10179
10179
|
}
|
|
10180
10180
|
chdir(path37 = this.cwd) {
|
|
@@ -26313,13 +26313,14 @@ function createJsonServicePlugin(ctx) {
|
|
|
26313
26313
|
// src/runtime/npmPlugin.ts
|
|
26314
26314
|
init_esm_shims();
|
|
26315
26315
|
import { isBuiltin } from "module";
|
|
26316
|
+
import process9 from "process";
|
|
26316
26317
|
import { defu as defu6, isObject as isObject9, objectHash } from "@weapp-core/shared";
|
|
26317
26318
|
import fs21 from "fs-extra";
|
|
26318
26319
|
import path34 from "pathe";
|
|
26319
|
-
import { build as
|
|
26320
|
+
import { build as viteBuild } from "vite";
|
|
26320
26321
|
function createNpmService(ctx) {
|
|
26321
26322
|
const oxcRuntimeSupport = createOxcRuntimeSupport();
|
|
26322
|
-
const
|
|
26323
|
+
const oxcVitePlugin = oxcRuntimeSupport.vitePlugin;
|
|
26323
26324
|
function getDependenciesCacheFilePath(key = "/") {
|
|
26324
26325
|
if (!ctx.configService) {
|
|
26325
26326
|
throw new Error("configService must be initialized before generating npm cache path");
|
|
@@ -26366,27 +26367,32 @@ function createNpmService(ctx) {
|
|
|
26366
26367
|
}
|
|
26367
26368
|
async function bundleBuild({ entry, name, options, outDir }) {
|
|
26368
26369
|
const mergedOptions = defu6(options, {
|
|
26369
|
-
|
|
26370
|
-
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
|
|
26374
|
-
|
|
26375
|
-
return {
|
|
26376
|
-
js: ".js"
|
|
26377
|
-
};
|
|
26378
|
-
},
|
|
26379
|
-
outputOptions: {
|
|
26380
|
-
exports: "named"
|
|
26370
|
+
configFile: false,
|
|
26371
|
+
publicDir: false,
|
|
26372
|
+
logLevel: "silent",
|
|
26373
|
+
root: ctx.configService?.cwd ?? process9.cwd(),
|
|
26374
|
+
define: {
|
|
26375
|
+
"process.env.NODE_ENV": JSON.stringify("production")
|
|
26381
26376
|
},
|
|
26382
|
-
|
|
26383
|
-
|
|
26384
|
-
|
|
26385
|
-
|
|
26386
|
-
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
|
|
26377
|
+
plugins: [],
|
|
26378
|
+
build: {
|
|
26379
|
+
lib: {
|
|
26380
|
+
entry,
|
|
26381
|
+
formats: ["cjs"],
|
|
26382
|
+
fileName: (_format, entryName) => `${entryName}.js`
|
|
26383
|
+
},
|
|
26384
|
+
outDir,
|
|
26385
|
+
emptyOutDir: true,
|
|
26386
|
+
sourcemap: false,
|
|
26387
|
+
minify: true,
|
|
26388
|
+
target: "es6",
|
|
26389
|
+
rollupOptions: {
|
|
26390
|
+
external: [],
|
|
26391
|
+
output: {
|
|
26392
|
+
exports: "named"
|
|
26393
|
+
}
|
|
26394
|
+
}
|
|
26395
|
+
}
|
|
26390
26396
|
});
|
|
26391
26397
|
const resolvedOptions = ctx.configService?.weappViteConfig?.npm?.buildOptions?.(
|
|
26392
26398
|
mergedOptions,
|
|
@@ -26399,19 +26405,32 @@ function createNpmService(ctx) {
|
|
|
26399
26405
|
finalOptions = resolvedOptions;
|
|
26400
26406
|
}
|
|
26401
26407
|
if (finalOptions) {
|
|
26402
|
-
if (
|
|
26403
|
-
const
|
|
26404
|
-
|
|
26405
|
-
|
|
26408
|
+
if (oxcVitePlugin) {
|
|
26409
|
+
const toPluginArray = (plugins) => {
|
|
26410
|
+
const queue = [];
|
|
26411
|
+
const result = [];
|
|
26412
|
+
if (plugins) {
|
|
26413
|
+
queue.push(plugins);
|
|
26406
26414
|
}
|
|
26407
|
-
|
|
26415
|
+
while (queue.length > 0) {
|
|
26416
|
+
const current2 = queue.shift();
|
|
26417
|
+
if (!current2) {
|
|
26418
|
+
continue;
|
|
26419
|
+
}
|
|
26420
|
+
if (Array.isArray(current2)) {
|
|
26421
|
+
queue.unshift(...current2);
|
|
26422
|
+
continue;
|
|
26423
|
+
}
|
|
26424
|
+
result.push(current2);
|
|
26425
|
+
}
|
|
26426
|
+
return result;
|
|
26408
26427
|
};
|
|
26409
|
-
const existing =
|
|
26410
|
-
const hasPlugin = existing.includes(
|
|
26411
|
-
const nextPlugins = hasPlugin ? existing : [
|
|
26412
|
-
finalOptions.plugins = nextPlugins
|
|
26428
|
+
const existing = toPluginArray(finalOptions.plugins);
|
|
26429
|
+
const hasPlugin = existing.includes(oxcVitePlugin);
|
|
26430
|
+
const nextPlugins = hasPlugin ? existing : [oxcVitePlugin, ...existing];
|
|
26431
|
+
finalOptions.plugins = nextPlugins;
|
|
26413
26432
|
}
|
|
26414
|
-
await
|
|
26433
|
+
await viteBuild(finalOptions);
|
|
26415
26434
|
}
|
|
26416
26435
|
}
|
|
26417
26436
|
async function copyBuild({ from, to }) {
|
|
@@ -26608,7 +26627,7 @@ function createNpmServicePlugin(ctx) {
|
|
|
26608
26627
|
|
|
26609
26628
|
// src/runtime/runtimeState.ts
|
|
26610
26629
|
init_esm_shims();
|
|
26611
|
-
import
|
|
26630
|
+
import process10 from "process";
|
|
26612
26631
|
|
|
26613
26632
|
// ../../node_modules/.pnpm/p-queue@9.0.1/node_modules/p-queue/dist/index.js
|
|
26614
26633
|
init_esm_shims();
|
|
@@ -27425,7 +27444,7 @@ function createDefaultLoadConfigResult() {
|
|
|
27425
27444
|
outputExtensions: getOutputExtensions("weapp"),
|
|
27426
27445
|
packageJson: {},
|
|
27427
27446
|
relativeSrcRoot: (p) => p,
|
|
27428
|
-
cwd:
|
|
27447
|
+
cwd: process10.cwd(),
|
|
27429
27448
|
isDev: false,
|
|
27430
27449
|
mode: "development",
|
|
27431
27450
|
projectConfig: {},
|