weapp-vite 6.15.4 → 6.15.5
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 +11 -2
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +26 -4
- package/dist/{config-B5YFoO3u.d.mts → config-BbL8Gqez.d.mts} +7 -0
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-BuwQryVc.mjs → createContext-BJXXIcT5.mjs} +75 -8
- package/dist/docs/README.md +11 -2
- package/dist/docs/vue-sfc.md +27 -0
- package/dist/docs/weapp-config.md +10 -0
- package/dist/file-D-LpaSgY.mjs +2 -0
- package/dist/{file-x_pM3sdN.mjs → file-DllJX3aP.mjs} +1 -1
- package/dist/getInstance-BuIdW4Wd.mjs +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/json.d.mts +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +5 -5
- package/dist/file-BVlUDAip.mjs +0 -2
- package/dist/getInstance-DPy6RmDl.mjs +0 -2
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
### Vue 项目
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
// vite.config.ts
|
|
39
|
+
// vite.config.ts 或 weapp-vite.config.ts
|
|
40
40
|
import { defineConfig } from 'weapp-vite/config'
|
|
41
41
|
|
|
42
42
|
export default defineConfig({
|
|
@@ -46,12 +46,21 @@ export default defineConfig({
|
|
|
46
46
|
enable: true,
|
|
47
47
|
template: {
|
|
48
48
|
removeComments: true,
|
|
49
|
+
htmlTagToWxml: true,
|
|
50
|
+
htmlTagToWxmlTagClass: true,
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
},
|
|
52
54
|
})
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
如果你在把传统 HTML/Vue 模板迁移到小程序 `.vue`,这两个模板配置通常最有用:
|
|
58
|
+
|
|
59
|
+
- `weapp.vue.template.htmlTagToWxml`
|
|
60
|
+
把 `div/span/img/a/h1...` 等常见 HTML 标签映射成小程序内置标签。
|
|
61
|
+
- `weapp.vue.template.htmlTagToWxmlTagClass`
|
|
62
|
+
默认开启。在映射发生时追加原标签名 class,例如 `h3 -> <view class="h3">`、`br -> <view class="br" />`,便于你自己写 CSS 低成本恢复默认外观;不需要时可设为 `false`。
|
|
63
|
+
|
|
55
64
|
```vue
|
|
56
65
|
<!-- App.vue -->
|
|
57
66
|
<script setup>
|
|
@@ -239,7 +248,7 @@ weapp-vite mcp --workspace-root /absolute/path/to/weapp-vite
|
|
|
239
248
|
wv mcp --workspace-root /absolute/path/to/weapp-vite
|
|
240
249
|
```
|
|
241
250
|
|
|
242
|
-
在 `vite.config.ts` 中开启自动启动:
|
|
251
|
+
在 `vite.config.ts` 或 `weapp-vite.config.ts` 中开启自动启动:
|
|
243
252
|
|
|
244
253
|
```ts
|
|
245
254
|
import { defineConfig } from 'weapp-vite/config'
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getCompilerContext, u as getRouteRuntimeGlobalKeys } from "./createContext-
|
|
1
|
+
import { i as getCompilerContext, u as getRouteRuntimeGlobalKeys } from "./createContext-BJXXIcT5.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 { S as isPathInside, _ as DEFAULT_MP_PLATFORM, b as resolveMiniPlatform, c as createSharedBuildConfig, d as resolveWeappConfigFile, f as checkRuntime, g as createCjsConfigLoadError, h as parseCommentJson, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as loadViteConfigFile, n as syncProjectSupportFiles, p as getProjectConfigFileName, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as getDefaultIdeProjectRoot, x as shouldPassPlatformArgToIdeOpen, y as normalizeMiniPlatform } from "./createContext-
|
|
1
|
+
import { S as isPathInside, _ as DEFAULT_MP_PLATFORM, b as resolveMiniPlatform, c as createSharedBuildConfig, d as resolveWeappConfigFile, f as checkRuntime, g as createCjsConfigLoadError, h as parseCommentJson, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as loadViteConfigFile, n as syncProjectSupportFiles, p as getProjectConfigFileName, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as getDefaultIdeProjectRoot, x as shouldPassPlatformArgToIdeOpen, y as normalizeMiniPlatform } from "./createContext-BJXXIcT5.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-CgxdNjvb.mjs";
|
|
3
|
-
import { h as VERSION } from "./file-
|
|
3
|
+
import { h as VERSION } from "./file-DllJX3aP.mjs";
|
|
4
4
|
import { a as resolveWeappMcpConfig, o as startWeappViteMcpServer } from "./mcp-DRlj32v4.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -1076,8 +1076,27 @@ async function tryReuseOpenedWechatIde(projectPath) {
|
|
|
1076
1076
|
reused: false
|
|
1077
1077
|
};
|
|
1078
1078
|
}
|
|
1079
|
+
async function reopenOpenedWechatIde(projectPath) {
|
|
1080
|
+
let miniProgram;
|
|
1081
|
+
try {
|
|
1082
|
+
miniProgram = await connectOpenedAutomator({
|
|
1083
|
+
projectPath,
|
|
1084
|
+
timeout: 3e3
|
|
1085
|
+
});
|
|
1086
|
+
} catch {
|
|
1087
|
+
return false;
|
|
1088
|
+
}
|
|
1089
|
+
miniProgram.disconnect();
|
|
1090
|
+
logger_default.info("目标项目已在微信开发者工具中打开,当前命令将主动重开以刷新最新构建产物。");
|
|
1091
|
+
if (!await closeIde()) logger_default.warn("关闭当前微信开发者工具失败,仍继续尝试重新打开目标项目。");
|
|
1092
|
+
await openWechatIdeByAutomator(projectPath);
|
|
1093
|
+
return true;
|
|
1094
|
+
}
|
|
1079
1095
|
async function openIde(platform, projectPath, options = {}) {
|
|
1080
1096
|
if (platform === "weapp" && projectPath && options.trustProject !== false) try {
|
|
1097
|
+
if (options.reuseOpenedProject === false) {
|
|
1098
|
+
if (await reopenOpenedWechatIde(projectPath)) return;
|
|
1099
|
+
}
|
|
1081
1100
|
const reuseResult = await tryReuseOpenedWechatIde(projectPath);
|
|
1082
1101
|
if (reuseResult?.reused || reuseResult?.reopened) return;
|
|
1083
1102
|
await openWechatIdeByAutomator(projectPath);
|
|
@@ -2077,7 +2096,7 @@ function registerPrepareCommand(cli) {
|
|
|
2077
2096
|
}
|
|
2078
2097
|
//#endregion
|
|
2079
2098
|
//#region package.json
|
|
2080
|
-
var version = "6.15.
|
|
2099
|
+
var version = "6.15.5";
|
|
2081
2100
|
//#endregion
|
|
2082
2101
|
//#region src/cli/devHotkeys/format.ts
|
|
2083
2102
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -2781,7 +2800,10 @@ function registerServeCommand(cli) {
|
|
|
2781
2800
|
mpDistRoot: configService.mpDistRoot,
|
|
2782
2801
|
cwd: configService.cwd,
|
|
2783
2802
|
weappViteConfig: configService.weappViteConfig
|
|
2784
|
-
})) await openIde(configService.platform, resolveIdeProjectRoot(configService.mpDistRoot, configService.cwd), {
|
|
2803
|
+
})) await openIde(configService.platform, resolveIdeProjectRoot(configService.mpDistRoot, configService.cwd), {
|
|
2804
|
+
reuseOpenedProject: false,
|
|
2805
|
+
trustProject: options.trustProject
|
|
2806
|
+
});
|
|
2785
2807
|
devHotkeysSession?.restore();
|
|
2786
2808
|
}
|
|
2787
2809
|
if (analyzeHandle) await analyzeController.waitForExit();
|
|
@@ -496,6 +496,7 @@ interface WeappVueTemplateConfig {
|
|
|
496
496
|
removeComments?: boolean;
|
|
497
497
|
simplifyWhitespace?: boolean;
|
|
498
498
|
htmlTagToWxml?: boolean | Record<string, string>;
|
|
499
|
+
htmlTagToWxmlTagClass?: boolean;
|
|
499
500
|
scopedSlotsCompiler?: 'auto' | 'augmented' | 'off';
|
|
500
501
|
scopedSlotsRequireProps?: boolean;
|
|
501
502
|
slotMultipleInstance?: boolean;
|
|
@@ -1092,6 +1093,12 @@ interface LoadConfigResult {
|
|
|
1092
1093
|
configFilePath?: string;
|
|
1093
1094
|
currentSubPackageRoot?: string;
|
|
1094
1095
|
weappWeb?: ResolvedWeappWebConfig;
|
|
1096
|
+
configMergeInfo?: ResolvedConfigMergeInfo;
|
|
1097
|
+
}
|
|
1098
|
+
interface ResolvedConfigMergeInfo {
|
|
1099
|
+
merged: boolean;
|
|
1100
|
+
viteConfigPath?: string;
|
|
1101
|
+
weappConfigPath?: string;
|
|
1095
1102
|
}
|
|
1096
1103
|
interface ResolvedWeappLibConfig {
|
|
1097
1104
|
enabled: boolean;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as resolveWeappViteHostMeta, Fn as WeappViteHostMeta, In as WeappViteRuntime, Ln as applyWeappViteHostMeta, Pn as WEAPP_VITE_HOST_NAME, Rn as createWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson, zn as isWeappViteHost } from "./config-
|
|
1
|
+
import { Bn as resolveWeappViteHostMeta, Fn as WeappViteHostMeta, In as WeappViteRuntime, Ln as applyWeappViteHostMeta, Pn as WEAPP_VITE_HOST_NAME, Rn as createWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson, zn as isWeappViteHost } from "./config-BbL8Gqez.mjs";
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, WeappViteConfig, WeappViteHostMeta, WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost-BzPJL4F-.mjs";
|
|
2
2
|
import { n as configureLogger, r as logger_default } from "./logger-CgxdNjvb.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-DllJX3aP.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import path, { posix } from "pathe";
|
|
6
6
|
import { normalize, relative, win32 } from "node:path";
|
|
@@ -4944,6 +4944,10 @@ const DEFAULT_VITE_CONFIG_FILES = [
|
|
|
4944
4944
|
"vite.config.mjs",
|
|
4945
4945
|
"vite.config.cjs"
|
|
4946
4946
|
];
|
|
4947
|
+
const DEFAULT_VITE_CONFIG_FILE_SET = new Set(DEFAULT_VITE_CONFIG_FILES);
|
|
4948
|
+
function isDefaultViteConfigBasename(filePath) {
|
|
4949
|
+
return DEFAULT_VITE_CONFIG_FILE_SET.has(path.basename(filePath));
|
|
4950
|
+
}
|
|
4947
4951
|
async function resolveImplicitConfigFile(configRoot) {
|
|
4948
4952
|
for (const fileName of DEFAULT_VITE_CONFIG_FILES) {
|
|
4949
4953
|
const filePath = path.resolve(configRoot, fileName);
|
|
@@ -5258,6 +5262,9 @@ function resolveSpecifiedWeappConfigPath(root, specified) {
|
|
|
5258
5262
|
function isWeappConfigBasename(filePath) {
|
|
5259
5263
|
return WEAPP_VITE_CONFIG_SET.has(path.basename(filePath));
|
|
5260
5264
|
}
|
|
5265
|
+
function isExplicitCustomConfigFile(filePath) {
|
|
5266
|
+
return path.basename(filePath).includes(".config.") && !isDefaultViteConfigBasename(filePath) && !isWeappConfigBasename(filePath);
|
|
5267
|
+
}
|
|
5261
5268
|
async function findWeappConfigInDirectory(directory) {
|
|
5262
5269
|
for (const filename of WEAPP_VITE_CONFIG_CANDIDATES) {
|
|
5263
5270
|
const candidatePath = path.resolve(directory, filename);
|
|
@@ -5272,6 +5279,7 @@ async function resolveWeappConfigFile(options) {
|
|
|
5272
5279
|
if (await fs.pathExists(resolvedSpecified)) return resolvedSpecified;
|
|
5273
5280
|
return;
|
|
5274
5281
|
}
|
|
5282
|
+
if (isExplicitCustomConfigFile(resolvedSpecified)) return;
|
|
5275
5283
|
const fromSpecifiedDirectory = await findWeappConfigInDirectory(path.dirname(resolvedSpecified));
|
|
5276
5284
|
if (fromSpecifiedDirectory) return fromSpecifiedDirectory;
|
|
5277
5285
|
}
|
|
@@ -9687,6 +9695,7 @@ function createAdvancedChunkNameResolver(options) {
|
|
|
9687
9695
|
const REG_NODE_MODULES_DIR = /[\\/]node_modules[\\/]/gi;
|
|
9688
9696
|
const REG_COMMONJS_HELPERS = /commonjsHelpers\.js$/;
|
|
9689
9697
|
const REG_REQUEST_GLOBAL_RUNTIME_VENDOR_ID = /(?:^|[/\\])(?:@wevu[/\\]web-apis|web-apis[/\\]dist[/\\]index\.(?:m?js|cjs)|weapp-vite[/\\](?:dist[/\\]web-apis\.mjs|src[/\\](?:webApis\.ts|runtime[/\\]webApis[/\\]index\.ts)))(?:$|[?#])/;
|
|
9698
|
+
const REG_HASHED_DIST_CHUNK_ID = /(?:^|[/\\])dist[/\\]([^/\\]+)-(\w{6,})\.(?:m?js|cjs)(?:$|[?#])/;
|
|
9690
9699
|
function resolveSharedPathRoot(configService, sharedPathRoot) {
|
|
9691
9700
|
const absoluteSrcRoot = configService.absoluteSrcRoot;
|
|
9692
9701
|
const configuredRoot = sharedPathRoot ? path.resolve(configService.cwd, sharedPathRoot) : absoluteSrcRoot;
|
|
@@ -9773,6 +9782,35 @@ function isRequestGlobalsRuntimeChunk(chunk) {
|
|
|
9773
9782
|
return REG_REQUEST_GLOBAL_RUNTIME_VENDOR_ID.test(id);
|
|
9774
9783
|
});
|
|
9775
9784
|
}
|
|
9785
|
+
function sanitizePackageToken(value) {
|
|
9786
|
+
return value.replace(/^@/, "").replaceAll(/[\\/]/g, "-").replaceAll(/[^\w-]/g, "-").replaceAll(/-+/g, "-").replace(/^-|-$/g, "");
|
|
9787
|
+
}
|
|
9788
|
+
function resolveDistChunkPackageToken(cleanedAbsoluteId) {
|
|
9789
|
+
const npmRelativePath = resolveNodeModulesSharedPath(cleanedAbsoluteId);
|
|
9790
|
+
if (npmRelativePath) {
|
|
9791
|
+
const [packagePath] = npmRelativePath.split("/dist/");
|
|
9792
|
+
if (packagePath) return sanitizePackageToken(packagePath);
|
|
9793
|
+
}
|
|
9794
|
+
const segments = cleanedAbsoluteId.replaceAll("\\", "/").split("/");
|
|
9795
|
+
const distIndex = segments.lastIndexOf("dist");
|
|
9796
|
+
if (distIndex <= 0) return;
|
|
9797
|
+
const packageToken = segments[distIndex - 1];
|
|
9798
|
+
if (!packageToken) return;
|
|
9799
|
+
return sanitizePackageToken(packageToken);
|
|
9800
|
+
}
|
|
9801
|
+
function resolveStableHashedDistChunkFileName(chunk) {
|
|
9802
|
+
const candidateIds = [chunk.facadeModuleId, ...chunk.moduleIds ?? []].filter((id) => typeof id === "string");
|
|
9803
|
+
for (const id of candidateIds) {
|
|
9804
|
+
const cleanedAbsoluteId = normalizeSharedPathCandidate(id);
|
|
9805
|
+
if (!path.isAbsolute(cleanedAbsoluteId)) continue;
|
|
9806
|
+
const matched = cleanedAbsoluteId.match(REG_HASHED_DIST_CHUNK_ID);
|
|
9807
|
+
if (!matched) continue;
|
|
9808
|
+
const baseName = matched[1];
|
|
9809
|
+
const packageToken = resolveDistChunkPackageToken(cleanedAbsoluteId);
|
|
9810
|
+
if (!baseName || !packageToken) continue;
|
|
9811
|
+
return `weapp-vendors/${packageToken}-${baseName}.js`;
|
|
9812
|
+
}
|
|
9813
|
+
}
|
|
9776
9814
|
function createSharedBuildResolver(configService, getSubPackageRoots) {
|
|
9777
9815
|
const nodeModulesDeps = [REG_NODE_MODULES_DIR];
|
|
9778
9816
|
const commonjsHelpersDeps = [REG_COMMONJS_HELPERS];
|
|
@@ -9797,6 +9835,8 @@ function createSharedBuildOutput(configService, getSubPackageRoots) {
|
|
|
9797
9835
|
codeSplitting: { groups: [{ name: (id, ctx) => resolveAdvancedChunkName(id, ctx) }] },
|
|
9798
9836
|
chunkFileNames: (chunk) => {
|
|
9799
9837
|
if (isRequestGlobalsRuntimeChunk(chunk)) return REQUEST_GLOBAL_RUNTIME_CHUNK_FILE_BASENAME;
|
|
9838
|
+
const stableHashedDistChunkFileName = resolveStableHashedDistChunkFileName(chunk);
|
|
9839
|
+
if (stableHashedDistChunkFileName) return stableHashedDistChunkFileName;
|
|
9800
9840
|
return "[name].js";
|
|
9801
9841
|
}
|
|
9802
9842
|
};
|
|
@@ -10081,9 +10121,9 @@ function checkWorkersOptions(target, configService, scanService) {
|
|
|
10081
10121
|
const workersDir = scanService.workersDir;
|
|
10082
10122
|
const hasWorkersDir = Boolean(workersDir);
|
|
10083
10123
|
if (hasWorkersDir && configService.weappViteConfig?.worker?.entry === void 0) {
|
|
10084
|
-
logger_default.error("检测到已经开启了 `worker`,请在 `vite.config.ts` 中设置 `weapp.worker.entry` 路径");
|
|
10124
|
+
logger_default.error("检测到已经开启了 `worker`,请在 `vite.config.ts` / `weapp-vite.config.ts` 中设置 `weapp.worker.entry` 路径");
|
|
10085
10125
|
logger_default.error("比如引入的 `worker` 路径为 `workers/index`, 此时 `weapp.worker.entry` 设置为 `[index]` ");
|
|
10086
|
-
throw new Error("请在 `vite.config.ts` 中设置 `weapp.worker.entry` 路径");
|
|
10126
|
+
throw new Error("请在 `vite.config.ts` / `weapp-vite.config.ts` 中设置 `weapp.worker.entry` 路径");
|
|
10087
10127
|
}
|
|
10088
10128
|
return {
|
|
10089
10129
|
hasWorkersDir,
|
|
@@ -11234,6 +11274,15 @@ function createLoadConfig(options) {
|
|
|
11234
11274
|
config.resolve.tsconfigPaths ??= true;
|
|
11235
11275
|
}
|
|
11236
11276
|
const configFilePath = weappLoaded?.path ?? loaded?.path ?? resolvedConfigFile;
|
|
11277
|
+
const configMergeInfo = loaded?.path && weappLoaded?.path && !shouldReuseLoadedWeappConfig(weappLoaded.path, loaded.path) ? {
|
|
11278
|
+
merged: true,
|
|
11279
|
+
viteConfigPath: loaded.path,
|
|
11280
|
+
weappConfigPath: weappLoaded.path
|
|
11281
|
+
} : {
|
|
11282
|
+
merged: false,
|
|
11283
|
+
viteConfigPath: loaded?.path,
|
|
11284
|
+
weappConfigPath: shouldReuseLoadedWeappConfig(weappLoaded?.path, loaded?.path) ? void 0 : weappLoaded?.path
|
|
11285
|
+
};
|
|
11237
11286
|
const outputExtensions = getOutputExtensions(platform);
|
|
11238
11287
|
const relativeSrcRoot = (p) => {
|
|
11239
11288
|
if (srcRoot) return path.relative(srcRoot, p);
|
|
@@ -11261,7 +11310,8 @@ function createLoadConfig(options) {
|
|
|
11261
11310
|
configFilePath,
|
|
11262
11311
|
currentSubPackageRoot: void 0,
|
|
11263
11312
|
weappWeb: resolvedWebConfig,
|
|
11264
|
-
weappLib: resolvedLibConfig
|
|
11313
|
+
weappLib: resolvedLibConfig,
|
|
11314
|
+
configMergeInfo
|
|
11265
11315
|
};
|
|
11266
11316
|
};
|
|
11267
11317
|
}
|
|
@@ -32393,6 +32443,7 @@ function createCompileVueFileOptions(ctx, pluginCtx, vuePath, isPage, isApp, con
|
|
|
32393
32443
|
const scopedSlotsRequireProps = configService.weappViteConfig?.vue?.template?.scopedSlotsRequireProps ?? scopedSlotsCompiler !== "augmented";
|
|
32394
32444
|
const slotMultipleInstance = configService.weappViteConfig?.vue?.template?.slotMultipleInstance ?? true;
|
|
32395
32445
|
const htmlTagToWxml = configService.weappViteConfig?.vue?.template?.htmlTagToWxml;
|
|
32446
|
+
const htmlTagToWxmlTagClass = configService.weappViteConfig?.vue?.template?.htmlTagToWxmlTagClass ?? true;
|
|
32396
32447
|
const classStyleRuntimeConfig = configService.weappViteConfig?.vue?.template?.classStyleRuntime ?? "js";
|
|
32397
32448
|
const objectLiteralBindMode = configService.weappViteConfig?.vue?.template?.objectLiteralBindMode ?? "runtime";
|
|
32398
32449
|
const mustacheInterpolation = configService.weappViteConfig?.vue?.template?.mustacheInterpolation ?? "compact";
|
|
@@ -32431,6 +32482,7 @@ function createCompileVueFileOptions(ctx, pluginCtx, vuePath, isPage, isApp, con
|
|
|
32431
32482
|
template: {
|
|
32432
32483
|
platform: templatePlatformOptions.templatePlatform,
|
|
32433
32484
|
htmlTagToWxml,
|
|
32485
|
+
htmlTagToWxmlTagClass,
|
|
32434
32486
|
scopedSlotsCompiler,
|
|
32435
32487
|
scopedSlotsRequireProps,
|
|
32436
32488
|
slotMultipleInstance,
|
|
@@ -34397,6 +34449,11 @@ function createConfigService(ctx) {
|
|
|
34397
34449
|
oxcRolldownPlugin: oxcRuntimeSupport.rolldownPlugin,
|
|
34398
34450
|
oxcVitePlugin: oxcRuntimeSupport.vitePlugin
|
|
34399
34451
|
});
|
|
34452
|
+
function formatConfigDisplayPath(filePath) {
|
|
34453
|
+
if (!filePath) return;
|
|
34454
|
+
const relative = normalizeRelativePath(path.relative(options.cwd, filePath));
|
|
34455
|
+
return relative && relative !== "" ? relative : path.basename(filePath);
|
|
34456
|
+
}
|
|
34400
34457
|
async function load(optionsInput) {
|
|
34401
34458
|
const defaultCwd = process$1.cwd();
|
|
34402
34459
|
const input = defu(optionsInput, {
|
|
@@ -34419,6 +34476,11 @@ function createConfigService(ctx) {
|
|
|
34419
34476
|
});
|
|
34420
34477
|
setOptions(resolvedConfig);
|
|
34421
34478
|
configureLogger(resolvedConfig.config.weapp?.logger);
|
|
34479
|
+
if (resolvedConfig.configMergeInfo?.merged) {
|
|
34480
|
+
const weappConfigDisplay = formatConfigDisplayPath(resolvedConfig.configMergeInfo.weappConfigPath) ?? "weapp-vite.config.ts";
|
|
34481
|
+
const viteConfigDisplay = formatConfigDisplayPath(resolvedConfig.configMergeInfo.viteConfigPath) ?? "vite.config.ts";
|
|
34482
|
+
logger_default.info(`[config] 检测到同时存在 ${weappConfigDisplay} 与 ${viteConfigDisplay},已合并其中的 \`weapp\` 配置,优先级:${weappConfigDisplay} > ${viteConfigDisplay}`);
|
|
34483
|
+
}
|
|
34422
34484
|
packageManager = await detect() ?? {
|
|
34423
34485
|
agent: "npm",
|
|
34424
34486
|
name: "npm"
|
|
@@ -34781,7 +34843,8 @@ function createDefaultLoadConfigResult() {
|
|
|
34781
34843
|
platform: "weapp",
|
|
34782
34844
|
srcRoot: "",
|
|
34783
34845
|
configFilePath: void 0,
|
|
34784
|
-
weappWeb: void 0
|
|
34846
|
+
weappWeb: void 0,
|
|
34847
|
+
configMergeInfo: void 0
|
|
34785
34848
|
};
|
|
34786
34849
|
}
|
|
34787
34850
|
function createDefaultPackageInfo() {
|
|
@@ -34996,7 +35059,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
34996
35059
|
const vueAppPath = await findVueEntry(appBasename);
|
|
34997
35060
|
let configFromVue;
|
|
34998
35061
|
if (!appConfigFile && vueAppPath) {
|
|
34999
|
-
const { extractConfigFromVue } = await import("./file-
|
|
35062
|
+
const { extractConfigFromVue } = await import("./file-D-LpaSgY.mjs");
|
|
35000
35063
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
35001
35064
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
35002
35065
|
}
|
|
@@ -35047,7 +35110,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
35047
35110
|
}
|
|
35048
35111
|
throw new Error("`app.json` 解析失败,请确保 `app.json` 文件格式正确");
|
|
35049
35112
|
}
|
|
35050
|
-
throw new Error(`在 ${appDirname} 目录下没有找到 \`app.json\` 或 \`app.vue\`,请确保你初始化了小程序项目,或者在 \`vite.config.ts\`
|
|
35113
|
+
throw new Error(`在 ${appDirname} 目录下没有找到 \`app.json\` 或 \`app.vue\`,请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
|
|
35051
35114
|
}
|
|
35052
35115
|
//#endregion
|
|
35053
35116
|
//#region src/runtime/scanPlugin/styleEntries/config.ts
|
|
@@ -35364,7 +35427,7 @@ function loadSubPackages(ctx) {
|
|
|
35364
35427
|
scanState.isDirty = false;
|
|
35365
35428
|
} else for (const meta of subPackageMap.values()) meta.entries = resolveSubPackageEntries(meta.subPackage);
|
|
35366
35429
|
if (scanState.appEntry) return [...subPackageMap.values()];
|
|
35367
|
-
throw new Error(`在 ${configService.absoluteSrcRoot} 目录下没有找到 \`app.json\`, 请确保你初始化了小程序项目,或者在 \`vite.config.ts\`
|
|
35430
|
+
throw new Error(`在 ${configService.absoluteSrcRoot} 目录下没有找到 \`app.json\`, 请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
|
|
35368
35431
|
}
|
|
35369
35432
|
//#endregion
|
|
35370
35433
|
//#region src/runtime/scanPlugin/service/index.ts
|
|
@@ -35901,6 +35964,10 @@ const DEFAULT_NODE_INCLUDE = [
|
|
|
35901
35964
|
"../vite.config.*.ts",
|
|
35902
35965
|
"../vite.config.mts",
|
|
35903
35966
|
"../vite.config.*.mts",
|
|
35967
|
+
"../weapp-vite.config.ts",
|
|
35968
|
+
"../weapp-vite.config.*.ts",
|
|
35969
|
+
"../weapp-vite.config.mts",
|
|
35970
|
+
"../weapp-vite.config.*.mts",
|
|
35904
35971
|
"../*.config.ts",
|
|
35905
35972
|
"../*.config.mts",
|
|
35906
35973
|
"../config/**/*.ts",
|
package/dist/docs/README.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
### Vue 项目
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
// vite.config.ts
|
|
39
|
+
// vite.config.ts 或 weapp-vite.config.ts
|
|
40
40
|
import { defineConfig } from 'weapp-vite/config'
|
|
41
41
|
|
|
42
42
|
export default defineConfig({
|
|
@@ -46,12 +46,21 @@ export default defineConfig({
|
|
|
46
46
|
enable: true,
|
|
47
47
|
template: {
|
|
48
48
|
removeComments: true,
|
|
49
|
+
htmlTagToWxml: true,
|
|
50
|
+
htmlTagToWxmlTagClass: true,
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
},
|
|
52
54
|
})
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
如果你在把传统 HTML/Vue 模板迁移到小程序 `.vue`,这两个模板配置通常最有用:
|
|
58
|
+
|
|
59
|
+
- `weapp.vue.template.htmlTagToWxml`
|
|
60
|
+
把 `div/span/img/a/h1...` 等常见 HTML 标签映射成小程序内置标签。
|
|
61
|
+
- `weapp.vue.template.htmlTagToWxmlTagClass`
|
|
62
|
+
默认开启。在映射发生时追加原标签名 class,例如 `h3 -> <view class="h3">`、`br -> <view class="br" />`,便于你自己写 CSS 低成本恢复默认外观;不需要时可设为 `false`。
|
|
63
|
+
|
|
55
64
|
```vue
|
|
56
65
|
<!-- App.vue -->
|
|
57
66
|
<script setup>
|
|
@@ -239,7 +248,7 @@ weapp-vite mcp --workspace-root /absolute/path/to/weapp-vite
|
|
|
239
248
|
wv mcp --workspace-root /absolute/path/to/weapp-vite
|
|
240
249
|
```
|
|
241
250
|
|
|
242
|
-
在 `vite.config.ts` 中开启自动启动:
|
|
251
|
+
在 `vite.config.ts` 或 `weapp-vite.config.ts` 中开启自动启动:
|
|
243
252
|
|
|
244
253
|
```ts
|
|
245
254
|
import { defineConfig } from 'weapp-vite/config'
|
package/dist/docs/vue-sfc.md
CHANGED
|
@@ -38,6 +38,33 @@
|
|
|
38
38
|
|
|
39
39
|
当你在页面或组件里需要显式注册原生小程序组件时,优先明确当前文件使用的 JSON 宏与配置来源,避免多个入口互相覆盖。
|
|
40
40
|
|
|
41
|
+
## HTML 标签迁移辅助
|
|
42
|
+
|
|
43
|
+
如果你把偏 Web 风格的模板迁到 `.vue`,可以优先关注这两个配置:
|
|
44
|
+
|
|
45
|
+
- `weapp.vue.template.htmlTagToWxml`
|
|
46
|
+
把常见 HTML 标签映射为小程序内置标签。
|
|
47
|
+
- `weapp.vue.template.htmlTagToWxmlTagClass`
|
|
48
|
+
默认开启。映射发生时,会再补一个原标签名 class,方便你自己用 CSS 恢复默认外观。
|
|
49
|
+
|
|
50
|
+
例如:
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<template>
|
|
54
|
+
<h3 class="title">
|
|
55
|
+
标题
|
|
56
|
+
</h3>
|
|
57
|
+
<br>
|
|
58
|
+
</template>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
启用默认行为后,会得到类似:
|
|
62
|
+
|
|
63
|
+
```wxml
|
|
64
|
+
<view class="h3 title">标题</view>
|
|
65
|
+
<view class="br" />
|
|
66
|
+
```
|
|
67
|
+
|
|
41
68
|
## 何时继续看其他文档
|
|
42
69
|
|
|
43
70
|
- 需要更完整的编辑器提示说明:[`../volar.md`](../volar.md)
|
|
@@ -32,6 +32,16 @@ export default defineConfig({
|
|
|
32
32
|
|
|
33
33
|
用于给页面路由追加规则,例如 layout、运行时行为等。它属于项目级编排,而不是组件内部语义。
|
|
34
34
|
|
|
35
|
+
### `vue.template.htmlTagToWxml`
|
|
36
|
+
|
|
37
|
+
适合从 Web/Vue 模板迁移到小程序 `.vue` 的项目。开启后,会把常见 HTML 标签映射成小程序内置标签,例如 `div -> view`、`span -> text`、`img -> image`、`a -> navigator`,也包含 `br/hr` 这类容易在迁移时“消失”的标签。
|
|
38
|
+
|
|
39
|
+
### `vue.template.htmlTagToWxmlTagClass`
|
|
40
|
+
|
|
41
|
+
默认开启。仅当 `htmlTagToWxml` 发生标签映射时,为输出节点追加原标签名 class,例如 `h3 -> <view class="h3">`、`br -> <view class="br" />`。
|
|
42
|
+
|
|
43
|
+
如果你的迁移策略是“先跑通,再用 CSS 逐步恢复默认外观”,这个开关很有价值;如果不希望产物里自动带这层语义 class,可以显式设为 `false`。
|
|
44
|
+
|
|
35
45
|
### `layout`
|
|
36
46
|
|
|
37
47
|
页面 layout 既可能来自项目级规则,也可能来自页面侧 `definePageMeta`。排查时先确认是哪一层生效。
|
|
@@ -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-BuIdW4Wd.mjs");
|
|
88
88
|
const compilerContext = getCompilerContext();
|
|
89
89
|
const service = compilerContext.autoRoutesService;
|
|
90
90
|
const reference = service?.getReference?.();
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Ref, Bn as resolveWeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, I as RolldownPluginOption, In as WeappViteRuntime, L as RolldownWatchOptions, Ln as applyWeappViteHostMeta, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Pn as WEAPP_VITE_HOST_NAME, R as RolldownWatcher, Rn as createWeappViteHostMeta, S as CompilerContext, T as ConfigEnv, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as isWeappViteHost } from "./config-
|
|
1
|
+
import { A as Ref, Bn as resolveWeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, I as RolldownPluginOption, In as WeappViteRuntime, L as RolldownWatchOptions, Ln as applyWeappViteHostMeta, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Pn as WEAPP_VITE_HOST_NAME, R as RolldownWatcher, Rn as createWeappViteHostMeta, S as CompilerContext, T as ConfigEnv, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as isWeappViteHost } from "./config-BbL8Gqez.mjs";
|
|
2
2
|
import { a as createWevuComponent, i as WevuComponentOptions, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-DSLk7kWi.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/createContext.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createCompilerContext } from "./createContext-
|
|
1
|
+
import { t as createCompilerContext } from "./createContext-BJXXIcT5.mjs";
|
|
2
2
|
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-wnfVS9jE.mjs";
|
|
3
3
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-BzPJL4F-.mjs";
|
|
4
4
|
import { t as defineConfig } from "./config-B2xtjEug.mjs";
|
package/dist/json.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-
|
|
1
|
+
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-BbL8Gqez.mjs";
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme, defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { xt as WeappMcpConfig } from "./config-
|
|
1
|
+
import { xt as WeappMcpConfig } from "./config-BbL8Gqez.mjs";
|
|
2
2
|
import { CreateServerOptions, DEFAULT_MCP_ENDPOINT, DEFAULT_MCP_HOST, DEFAULT_MCP_PORT, McpServerHandle, StartMcpServerOptions, createWeappViteMcpServer } from "@weapp-vite/mcp";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as Resolver } from "./index-6QUk3Zbc.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-DiEBrMtj.mjs";
|
|
3
|
-
import { $ as WeappDebugConfig, $t as JsonConfig, A as Ref, An as WeappManagedServerTsconfigConfig, At as WeappWevuConfig, B as BindingErrorLike, Bt as GenerateExtensionsOptions, Cn as WeappLibDtsOptions, Ct as WeappRequestRuntimeConfig, D as MethodDefinitions, Dn as WeappLibVueTscOptions, Dt as WeappVueConfig, E as InlineConfig, En as WeappLibInternalDtsOptions, Et as WeappSubPackageConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, Ft as BuildNpmPackageMeta, G as EntryJsonFragment, Gt as GenerateTemplateContext, H as BaseEntry, Ht as GenerateFilenamesOptions, I as RolldownPluginOption, In as WeappViteRuntime, It as ChunksConfig, J as ScanComponentItem, Jt as GenerateTemplateFileSource, K as PageEntry, Kt as GenerateTemplateEntry, L as RolldownWatchOptions, Lt as CopyGlobs, M as RolldownBuild, Mn as WeappManagedTypeScriptConfig, Mt as Alias, N as RolldownOptions, Nn as WeappWebConfig, Nt as AliasOptions, O as Plugin, On as WeappManagedAppTsconfigConfig, Ot as WeappVueTemplateConfig, P as RolldownOutput, Pt as AlipayNpmMode, Q as UserConfig, Qt as JsFormat, R as RolldownWatcher, Rt as CopyOptions, Sn as WeappLibConfig, St as WeappNpmConfig, T as ConfigEnv, Tn as WeappLibFileName, Tt as WeappRouteRules, U as ComponentEntry, Ut as GenerateOptions, V as AppEntry, Vt as GenerateFileType, W as Entry, Wt as GenerateTemplate, X as ProjectConfig, Xt as GenerateTemplateScope, Y as WxmlDep, Yt as GenerateTemplateInlineSource, Z as SubPackageMetaValue, Zt as GenerateTemplatesConfig, _n as SubPackageStyleConfigEntry, _t as WeappInjectRequestGlobalsTarget, an as NpmBuildOptions, at as EnhanceOptions, b as ChangeEvent, bn as SubPackageStyleScope, bt as WeappInjectWebRuntimeGlobalsTarget, cn as NpmPluginPackageConfig, ct as MultiPlatformConfig, dn as ResolvedAlias, dt as WeappAppPreludeMode, en as JsonMergeContext, et as WeappForwardConsoleConfig, fn as SharedChunkDynamicImports, ft as WeappAutoRoutesConfig, gn as SubPackage, gt as WeappInjectRequestGlobalsConfig, hn as SharedChunkStrategy, ht as WeappHmrConfig, in as MpPlatform, it as AutoImportComponentsOption, j as ResolvedConfig, jn as WeappManagedSharedTsconfigConfig, jt as WeappWorkerConfig, k as PluginOption, kn as WeappManagedNodeTsconfigConfig, kt as WeappWebRuntimeConfig, ln as NpmStrategy, lt as ScanWxmlOptions, mn as SharedChunkOverride, mt as WeappAutoRoutesIncludePattern, nn as JsonMergeStage, nt as WeappViteConfig, on as NpmDependencyPattern, ot as EnhanceWxmlOptions, pn as SharedChunkMode, pt as WeappAutoRoutesInclude, q as ComponentsMap, qt as GenerateTemplateFactory, rn as JsonMergeStrategy, rt as AutoImportComponents, sn as NpmMainPackageConfig, st as HandleWxmlOptions, tn as JsonMergeFunction, tt as WeappForwardConsoleLogLevel, un as NpmSubPackageConfig, ut as WeappAppPreludeConfig, vn as SubPackageStyleConfigObject, vt as WeappInjectWeapiConfig, w as ComputedDefinitions, wn as WeappLibEntryContext, wt as WeappRouteRule, x as WeappVitePluginApi, xn as WeappLibComponentJson, xt as WeappMcpConfig, yn as SubPackageStyleEntry, yt as WeappInjectWebRuntimeGlobalsConfig, z as ViteDevServer, zt as GenerateDirsOptions } from "./config-
|
|
3
|
+
import { $ as WeappDebugConfig, $t as JsonConfig, A as Ref, An as WeappManagedServerTsconfigConfig, At as WeappWevuConfig, B as BindingErrorLike, Bt as GenerateExtensionsOptions, Cn as WeappLibDtsOptions, Ct as WeappRequestRuntimeConfig, D as MethodDefinitions, Dn as WeappLibVueTscOptions, Dt as WeappVueConfig, E as InlineConfig, En as WeappLibInternalDtsOptions, Et as WeappSubPackageConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, Ft as BuildNpmPackageMeta, G as EntryJsonFragment, Gt as GenerateTemplateContext, H as BaseEntry, Ht as GenerateFilenamesOptions, I as RolldownPluginOption, In as WeappViteRuntime, It as ChunksConfig, J as ScanComponentItem, Jt as GenerateTemplateFileSource, K as PageEntry, Kt as GenerateTemplateEntry, L as RolldownWatchOptions, Lt as CopyGlobs, M as RolldownBuild, Mn as WeappManagedTypeScriptConfig, Mt as Alias, N as RolldownOptions, Nn as WeappWebConfig, Nt as AliasOptions, O as Plugin, On as WeappManagedAppTsconfigConfig, Ot as WeappVueTemplateConfig, P as RolldownOutput, Pt as AlipayNpmMode, Q as UserConfig, Qt as JsFormat, R as RolldownWatcher, Rt as CopyOptions, Sn as WeappLibConfig, St as WeappNpmConfig, T as ConfigEnv, Tn as WeappLibFileName, Tt as WeappRouteRules, U as ComponentEntry, Ut as GenerateOptions, V as AppEntry, Vt as GenerateFileType, W as Entry, Wt as GenerateTemplate, X as ProjectConfig, Xt as GenerateTemplateScope, Y as WxmlDep, Yt as GenerateTemplateInlineSource, Z as SubPackageMetaValue, Zt as GenerateTemplatesConfig, _n as SubPackageStyleConfigEntry, _t as WeappInjectRequestGlobalsTarget, an as NpmBuildOptions, at as EnhanceOptions, b as ChangeEvent, bn as SubPackageStyleScope, bt as WeappInjectWebRuntimeGlobalsTarget, cn as NpmPluginPackageConfig, ct as MultiPlatformConfig, dn as ResolvedAlias, dt as WeappAppPreludeMode, en as JsonMergeContext, et as WeappForwardConsoleConfig, fn as SharedChunkDynamicImports, ft as WeappAutoRoutesConfig, gn as SubPackage, gt as WeappInjectRequestGlobalsConfig, hn as SharedChunkStrategy, ht as WeappHmrConfig, in as MpPlatform, it as AutoImportComponentsOption, j as ResolvedConfig, jn as WeappManagedSharedTsconfigConfig, jt as WeappWorkerConfig, k as PluginOption, kn as WeappManagedNodeTsconfigConfig, kt as WeappWebRuntimeConfig, ln as NpmStrategy, lt as ScanWxmlOptions, mn as SharedChunkOverride, mt as WeappAutoRoutesIncludePattern, nn as JsonMergeStage, nt as WeappViteConfig, on as NpmDependencyPattern, ot as EnhanceWxmlOptions, pn as SharedChunkMode, pt as WeappAutoRoutesInclude, q as ComponentsMap, qt as GenerateTemplateFactory, rn as JsonMergeStrategy, rt as AutoImportComponents, sn as NpmMainPackageConfig, st as HandleWxmlOptions, tn as JsonMergeFunction, tt as WeappForwardConsoleLogLevel, un as NpmSubPackageConfig, ut as WeappAppPreludeConfig, vn as SubPackageStyleConfigObject, vt as WeappInjectWeapiConfig, w as ComputedDefinitions, wn as WeappLibEntryContext, wt as WeappRouteRule, x as WeappVitePluginApi, xn as WeappLibComponentJson, xt as WeappMcpConfig, yn as SubPackageStyleEntry, yt as WeappInjectWebRuntimeGlobalsConfig, z as ViteDevServer, zt as GenerateDirsOptions } from "./config-BbL8Gqez.mjs";
|
|
4
4
|
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, ComputedDefinitions, ConfigEnv, CopyGlobs, CopyOptions, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, Plugin, PluginOption, ProjectConfig, Ref, ResolvedAlias, ResolvedConfig, Resolver, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatchOptions, RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, ViteDevServer, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappViteConfig, WeappViteHostMeta, WeappVitePluginApi, WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.15.
|
|
4
|
+
"version": "6.15.5",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -117,21 +117,21 @@
|
|
|
117
117
|
"vue": "^3.5.32",
|
|
118
118
|
"vue-tsc": "^3.2.6",
|
|
119
119
|
"@weapp-core/constants": "^0.1.1",
|
|
120
|
-
"@weapp-core/init": "6.0.
|
|
120
|
+
"@weapp-core/init": "6.0.7",
|
|
121
121
|
"@weapp-core/logger": "3.1.1",
|
|
122
122
|
"@weapp-core/schematics": "6.0.4",
|
|
123
123
|
"@weapp-core/shared": "3.0.3",
|
|
124
|
-
"@weapp-vite/ast": "6.15.
|
|
124
|
+
"@weapp-vite/ast": "6.15.5",
|
|
125
125
|
"@weapp-vite/mcp": "1.2.1",
|
|
126
126
|
"@weapp-vite/miniprogram-automator": "1.0.2",
|
|
127
127
|
"@weapp-vite/volar": "2.0.8",
|
|
128
128
|
"@weapp-vite/web": "1.3.15",
|
|
129
129
|
"@wevu/api": "0.2.3",
|
|
130
|
-
"@wevu/web-apis": "1.2.
|
|
130
|
+
"@wevu/web-apis": "1.2.7",
|
|
131
131
|
"rolldown-require": "2.0.13",
|
|
132
132
|
"vite-plugin-performance": "2.0.1",
|
|
133
133
|
"weapp-ide-cli": "5.2.2",
|
|
134
|
-
"wevu": "6.15.
|
|
134
|
+
"wevu": "6.15.5"
|
|
135
135
|
},
|
|
136
136
|
"publishConfig": {
|
|
137
137
|
"access": "public",
|
package/dist/file-BVlUDAip.mjs
DELETED