weapp-vite 6.18.3 → 6.18.4
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-routes.mjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/{createContext-D0jhm5Nj.mjs → createContext-giYv1R-U.mjs} +52 -59
- package/dist/{file-BFzjMcYM.mjs → file-CWu9BDPF.mjs} +1 -1
- package/dist/file-Dbg8ttkV.mjs +2 -0
- package/dist/getInstance-DDUp2h9o.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/package.json +9 -9
- package/dist/file-DYC-Rc4v.mjs +0 -2
- package/dist/getInstance-CnWLlG_P.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRouteRuntimeGlobalKeys, n as getCompilerContext } from "./createContext-
|
|
1
|
+
import { g as getRouteRuntimeGlobalKeys, n as getCompilerContext } from "./createContext-giYv1R-U.mjs";
|
|
2
2
|
//#region src/auto-routes.ts
|
|
3
3
|
const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
|
|
4
4
|
function createGetter(resolver) {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as createCjsConfigLoadError, E as isPathInside, S as parseCommentJson, T as shouldPassPlatformArgToIdeOpen, _ as createBuildScopeConfigFromCli, a as formatBytes, b as getProjectConfigFileName, d as syncProjectSupportFiles, f as syncManagedTsconfigBootstrapFiles, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, p as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappViteTarget, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-
|
|
1
|
+
import { C as createCjsConfigLoadError, E as isPathInside, S as parseCommentJson, T as shouldPassPlatformArgToIdeOpen, _ as createBuildScopeConfigFromCli, a as formatBytes, b as getProjectConfigFileName, d as syncProjectSupportFiles, f as syncManagedTsconfigBootstrapFiles, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, p as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappViteTarget, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-giYv1R-U.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { h as VERSION } from "./file-
|
|
3
|
+
import { h as VERSION } from "./file-CWu9BDPF.mjs";
|
|
4
4
|
import { c as startWeappViteMcpServer, l as detectAiDevelopmentEnvironment, s as resolveWeappMcpConfig } from "./mcp-BG6TliEg.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -4496,7 +4496,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4496
4496
|
}
|
|
4497
4497
|
//#endregion
|
|
4498
4498
|
//#region package.json
|
|
4499
|
-
var version = "6.18.
|
|
4499
|
+
var version = "6.18.4";
|
|
4500
4500
|
//#endregion
|
|
4501
4501
|
//#region src/cli/devHotkeys/format.ts
|
|
4502
4502
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost--CaeyWpA.mjs";
|
|
2
2
|
import { n as configureLogger, r as logger_default } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as supportedCssLangs, y as templateExtensions } from "./file-
|
|
3
|
+
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as supportedCssLangs, y as templateExtensions } from "./file-CWu9BDPF.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import path, { posix } from "pathe";
|
|
6
6
|
import path$1, { normalize, relative, win32 } from "node:path";
|
|
@@ -29190,71 +29190,64 @@ function createVueTransformPlugin(ctx) {
|
|
|
29190
29190
|
readFile: fs.readFile
|
|
29191
29191
|
});
|
|
29192
29192
|
},
|
|
29193
|
-
resolveId
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
|
|
29197
|
-
|
|
29198
|
-
|
|
29199
|
-
|
|
29200
|
-
|
|
29201
|
-
|
|
29202
|
-
recordHmrProfileOperation(profile, "resolveCount");
|
|
29203
|
-
}
|
|
29193
|
+
resolveId(id) {
|
|
29194
|
+
if (!SCOPED_SLOT_VIRTUAL_ID_RE.test(id)) return null;
|
|
29195
|
+
const startedAt = performance.now();
|
|
29196
|
+
try {
|
|
29197
|
+
return resolveScopedSlotVirtualId(id);
|
|
29198
|
+
} finally {
|
|
29199
|
+
const profile = ctx.runtimeState?.build?.hmr?.profile;
|
|
29200
|
+
recordHmrProfileDuration(profile, "pluginResolveMs", performance.now() - startedAt);
|
|
29201
|
+
recordHmrProfileOperation(profile, "resolveCount");
|
|
29204
29202
|
}
|
|
29205
29203
|
},
|
|
29206
|
-
load
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29204
|
+
async load(id) {
|
|
29205
|
+
if (!VUE_LOAD_FILTER_RE.test(id)) return null;
|
|
29206
|
+
return await loadTransformStyleBlock({
|
|
29207
|
+
id,
|
|
29208
|
+
pluginCtx: this,
|
|
29209
|
+
ctx,
|
|
29210
|
+
configService: ctx.configService,
|
|
29211
|
+
styleBlocksCache,
|
|
29212
|
+
loadScopedSlotModule: (id) => {
|
|
29213
|
+
return loadScopedSlotModule(id, scopedSlotModules)?.code ?? null;
|
|
29214
|
+
},
|
|
29215
|
+
scopedSlotModules,
|
|
29216
|
+
parseWeappVueStyleRequest: (id) => parseWeappVueStyleRequest(id) ?? null,
|
|
29217
|
+
readAndParseSfc,
|
|
29218
|
+
createReadAndParseSfcOptions
|
|
29219
|
+
});
|
|
29220
|
+
},
|
|
29221
|
+
async transform(code, id) {
|
|
29222
|
+
if (!VUE_TRANSFORM_FILTER_RE.test(id) || !isVueLikeId(id)) return null;
|
|
29223
|
+
const startedAt = performance.now();
|
|
29224
|
+
try {
|
|
29225
|
+
return await transformVueLikeFile({
|
|
29212
29226
|
ctx,
|
|
29213
|
-
|
|
29227
|
+
pluginCtx: this,
|
|
29228
|
+
code,
|
|
29229
|
+
id,
|
|
29230
|
+
compilationCache,
|
|
29231
|
+
setAppShell: (shell) => appShell = shell,
|
|
29232
|
+
pageMatcher,
|
|
29233
|
+
setPageMatcher: (matcher) => pageMatcher = matcher,
|
|
29234
|
+
scanDirtySynced,
|
|
29235
|
+
setScanDirtySynced: (synced) => scanDirtySynced = synced,
|
|
29236
|
+
reExportResolutionCache,
|
|
29237
|
+
compileOptionsCache,
|
|
29238
|
+
componentMetaCache,
|
|
29214
29239
|
styleBlocksCache,
|
|
29215
|
-
|
|
29216
|
-
return loadScopedSlotModule(id, scopedSlotModules)?.code ?? null;
|
|
29217
|
-
},
|
|
29240
|
+
styleRefreshTokens,
|
|
29218
29241
|
scopedSlotModules,
|
|
29219
|
-
|
|
29242
|
+
emittedScopedSlotChunks,
|
|
29243
|
+
classStyleRuntimeWarned,
|
|
29220
29244
|
readAndParseSfc,
|
|
29221
29245
|
createReadAndParseSfcOptions
|
|
29222
29246
|
});
|
|
29223
|
-
}
|
|
29224
|
-
|
|
29225
|
-
|
|
29226
|
-
|
|
29227
|
-
async handler(code, id) {
|
|
29228
|
-
if (!isVueLikeId(id)) return null;
|
|
29229
|
-
const startedAt = performance.now();
|
|
29230
|
-
try {
|
|
29231
|
-
return await transformVueLikeFile({
|
|
29232
|
-
ctx,
|
|
29233
|
-
pluginCtx: this,
|
|
29234
|
-
code,
|
|
29235
|
-
id,
|
|
29236
|
-
compilationCache,
|
|
29237
|
-
setAppShell: (shell) => appShell = shell,
|
|
29238
|
-
pageMatcher,
|
|
29239
|
-
setPageMatcher: (matcher) => pageMatcher = matcher,
|
|
29240
|
-
scanDirtySynced,
|
|
29241
|
-
setScanDirtySynced: (synced) => scanDirtySynced = synced,
|
|
29242
|
-
reExportResolutionCache,
|
|
29243
|
-
compileOptionsCache,
|
|
29244
|
-
componentMetaCache,
|
|
29245
|
-
styleBlocksCache,
|
|
29246
|
-
styleRefreshTokens,
|
|
29247
|
-
scopedSlotModules,
|
|
29248
|
-
emittedScopedSlotChunks,
|
|
29249
|
-
classStyleRuntimeWarned,
|
|
29250
|
-
readAndParseSfc,
|
|
29251
|
-
createReadAndParseSfcOptions
|
|
29252
|
-
});
|
|
29253
|
-
} finally {
|
|
29254
|
-
const durationMs = performance.now() - startedAt;
|
|
29255
|
-
recordHmrProfileDuration(ctx.runtimeState?.build?.hmr?.profile, "transformMs", durationMs);
|
|
29256
|
-
recordHmrProfileDuration(ctx.runtimeState?.build?.hmr?.profile, "vueTransformMs", durationMs);
|
|
29257
|
-
}
|
|
29247
|
+
} finally {
|
|
29248
|
+
const durationMs = performance.now() - startedAt;
|
|
29249
|
+
recordHmrProfileDuration(ctx.runtimeState?.build?.hmr?.profile, "transformMs", durationMs);
|
|
29250
|
+
recordHmrProfileDuration(ctx.runtimeState?.build?.hmr?.profile, "vueTransformMs", durationMs);
|
|
29258
29251
|
}
|
|
29259
29252
|
},
|
|
29260
29253
|
async generateBundle(_options, bundle) {
|
|
@@ -30563,7 +30556,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
30563
30556
|
const { path: appEntryPath } = appEntry;
|
|
30564
30557
|
let configFromVue;
|
|
30565
30558
|
if (!appConfigFile && vueAppPath) {
|
|
30566
|
-
const { extractConfigFromVue } = await import("./file-
|
|
30559
|
+
const { extractConfigFromVue } = await import("./file-Dbg8ttkV.mjs");
|
|
30567
30560
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
30568
30561
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
30569
30562
|
}
|
|
@@ -84,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
84
84
|
}
|
|
85
85
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
86
86
|
try {
|
|
87
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
87
|
+
const { getCompilerContext } = await import("./getInstance-DDUp2h9o.mjs");
|
|
88
88
|
const compilerContext = getCompilerContext();
|
|
89
89
|
const service = compilerContext.autoRoutesService;
|
|
90
90
|
const reference = service?.getReference?.();
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-BL8Dhhk6.mjs";
|
|
2
2
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost--CaeyWpA.mjs";
|
|
3
3
|
import { t as defineConfig } from "./config-DRGcCi3h.mjs";
|
|
4
|
-
import { c as getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-
|
|
4
|
+
import { c as getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-giYv1R-U.mjs";
|
|
5
5
|
import { a as resolveLayoutHost, c as createWevuComponent, i as registerLayoutHosts, n as defineProps, o as unregisterLayoutHosts, r as setPageLayout, s as waitForLayoutHost, t as defineEmits } from "./runtime-CRoKWQZn.mjs";
|
|
6
6
|
export { WEAPP_VITE_HOST_NAME, WEB_PLATFORM_ALIASES, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, getSupportedWeappVitePlatforms, getSupportedWeappViteTargetDescriptors, isWeappViteHost, isWebPlatform, registerLayoutHosts, resolveLayoutHost, resolveWeappViteHostMeta, resolveWeappViteTarget, setPageLayout, unregisterLayoutHosts, waitForLayoutHost };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.18.
|
|
4
|
+
"version": "6.18.4",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -115,33 +115,33 @@
|
|
|
115
115
|
"rolldown-plugin-dts": "0.27.9",
|
|
116
116
|
"semver": "^7.8.5",
|
|
117
117
|
"typescript": "^6.0.3",
|
|
118
|
-
"vite": "8.1.
|
|
118
|
+
"vite": "8.1.5",
|
|
119
119
|
"vite-tsconfig-paths": "^6.1.1",
|
|
120
|
-
"vue": "^3.5.
|
|
120
|
+
"vue": "^3.5.40",
|
|
121
121
|
"vue-tsc": "^3.3.7",
|
|
122
122
|
"@weapp-core/constants": "0.1.13",
|
|
123
123
|
"@weapp-core/init": "6.0.11",
|
|
124
124
|
"@weapp-core/logger": "3.1.1",
|
|
125
125
|
"@weapp-core/schematics": "6.0.4",
|
|
126
126
|
"@weapp-core/shared": "3.0.5",
|
|
127
|
-
"@weapp-vite/ast": "6.18.3",
|
|
128
127
|
"@weapp-vite/mcp": "1.4.8",
|
|
129
128
|
"@weapp-vite/miniprogram-automator": "1.2.7",
|
|
130
|
-
"@weapp-vite/
|
|
129
|
+
"@weapp-vite/ast": "6.18.4",
|
|
130
|
+
"@weapp-vite/web": "1.3.36",
|
|
131
131
|
"@wevu/api": "0.2.11",
|
|
132
|
-
"@weapp-vite/volar": "2.1.
|
|
132
|
+
"@weapp-vite/volar": "2.1.2",
|
|
133
133
|
"@wevu/web-apis": "1.2.27",
|
|
134
|
-
"rolldown-require": "2.0.
|
|
134
|
+
"rolldown-require": "2.0.21",
|
|
135
135
|
"vite-plugin-performance": "2.0.1",
|
|
136
136
|
"weapp-ide-cli": "5.4.12",
|
|
137
|
-
"wevu": "6.18.
|
|
137
|
+
"wevu": "6.18.4"
|
|
138
138
|
},
|
|
139
139
|
"publishConfig": {
|
|
140
140
|
"access": "public",
|
|
141
141
|
"registry": "https://registry.npmjs.org"
|
|
142
142
|
},
|
|
143
143
|
"devDependencies": {
|
|
144
|
-
"oxc-parser": "^0.
|
|
144
|
+
"oxc-parser": "^0.140.0",
|
|
145
145
|
"oxc-walker": "^1.0.0",
|
|
146
146
|
"tailwindcss": "^4.3.2",
|
|
147
147
|
"ts-morph": "^28.0.0"
|
package/dist/file-DYC-Rc4v.mjs
DELETED