weapp-vite 6.17.5 → 6.17.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/auto-routes.mjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/{config-CaM_ZvH7.d.mts → config-DwMzkHsB.d.mts} +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-9Js_PRb0.mjs → createContext-DooWF5Wk.mjs} +428 -55
- package/dist/{file-C2QH0iM5.mjs → file-2ZpSECMP.mjs} +1 -1
- package/dist/file-8RU-zw8X.mjs +2 -0
- package/dist/getInstance-CcEF8k1Z.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 +3 -3
- package/dist/file-CqYuBh-m.mjs +0 -2
- package/dist/getInstance-Dd__T_L5.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-DooWF5Wk.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-DooWF5Wk.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-2ZpSECMP.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";
|
|
@@ -4122,7 +4122,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4122
4122
|
}
|
|
4123
4123
|
//#endregion
|
|
4124
4124
|
//#region package.json
|
|
4125
|
-
var version = "6.17.
|
|
4125
|
+
var version = "6.17.7";
|
|
4126
4126
|
//#endregion
|
|
4127
4127
|
//#region src/cli/devHotkeys/format.ts
|
|
4128
4128
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1546,6 +1546,7 @@ interface RuntimeState {
|
|
|
1546
1546
|
lastHmrEntryIds: Set<string>;
|
|
1547
1547
|
lastEmittedEntryIds: Set<string>;
|
|
1548
1548
|
lastEmittedChunkFileNames: Set<string>;
|
|
1549
|
+
sharedChunkSourceModuleIds: Set<string>;
|
|
1549
1550
|
recentProfiles: Array<{
|
|
1550
1551
|
timestamp?: string;
|
|
1551
1552
|
totalMs: number;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as WeappViteHostMeta, Hn as createWeappViteHostMeta, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Yn as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, 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, 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 WEAPP_VITE_HOST_NAME } from "./config-
|
|
1
|
+
import { Bn as WeappViteHostMeta, Hn as createWeappViteHostMeta, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Yn as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, 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, 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 WEAPP_VITE_HOST_NAME } from "./config-DwMzkHsB.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, type WeappViteConfig, WeappViteHostMeta, type WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|
|
@@ -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-2ZpSECMP.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";
|
|
@@ -9354,6 +9354,7 @@ function createRuntimeState() {
|
|
|
9354
9354
|
lastHmrEntryIds: /* @__PURE__ */ new Set(),
|
|
9355
9355
|
lastEmittedEntryIds: /* @__PURE__ */ new Set(),
|
|
9356
9356
|
lastEmittedChunkFileNames: /* @__PURE__ */ new Set(),
|
|
9357
|
+
sharedChunkSourceModuleIds: /* @__PURE__ */ new Set(),
|
|
9357
9358
|
recentProfiles: [],
|
|
9358
9359
|
profile: {}
|
|
9359
9360
|
}
|
|
@@ -12647,11 +12648,22 @@ function resolveSnapshotSidecarDirtySummary(filePath) {
|
|
|
12647
12648
|
if (ext && watchedTemplateExts.has(ext)) return "sidecar-direct:1";
|
|
12648
12649
|
return "sidecar-direct:1";
|
|
12649
12650
|
}
|
|
12650
|
-
|
|
12651
|
+
const watchedSnapshotScriptExts = /* @__PURE__ */ new Set([
|
|
12652
|
+
".ts",
|
|
12653
|
+
".tsx",
|
|
12654
|
+
".js",
|
|
12655
|
+
".jsx",
|
|
12656
|
+
".mts",
|
|
12657
|
+
".cts",
|
|
12658
|
+
".mjs",
|
|
12659
|
+
".cjs"
|
|
12660
|
+
]);
|
|
12661
|
+
function shouldHandleSnapshotSidecarFile(filePath, ctx) {
|
|
12662
|
+
const configService = ctx.configService;
|
|
12651
12663
|
if (isSidecarFile(filePath)) return true;
|
|
12652
12664
|
const normalizedFile = normalizeFsResolvedId(filePath);
|
|
12653
12665
|
const normalizedSrcRoot = normalizeFsResolvedId(configService.absoluteSrcRoot);
|
|
12654
|
-
if (normalizedFile === normalizedSrcRoot || normalizedFile.startsWith(`${normalizedSrcRoot}/`)) return
|
|
12666
|
+
if (normalizedFile === normalizedSrcRoot || normalizedFile.startsWith(`${normalizedSrcRoot}/`)) return ctx.runtimeState.build.hmr.sharedChunkSourceModuleIds.has(normalizedFile);
|
|
12655
12667
|
return path.extname(filePath) !== "";
|
|
12656
12668
|
}
|
|
12657
12669
|
function isGeneratedMiniprogramWatchInclude(pattern, configService) {
|
|
@@ -12679,7 +12691,8 @@ function createSnapshotSidecarWatchPatterns(configService, inlineConfig) {
|
|
|
12679
12691
|
...configSuffixes$1.map((suffix) => path.join(root, `**/*${suffix}`)),
|
|
12680
12692
|
...Array.from(watchedCssExts).map((ext) => path.join(root, `**/*${ext}`)),
|
|
12681
12693
|
...Array.from(watchedTemplateExts).map((ext) => path.join(root, `**/*${ext}`)),
|
|
12682
|
-
...Array.from(watchedScriptModuleExts).map((ext) => path.join(root, `**/*${ext}`))
|
|
12694
|
+
...Array.from(watchedScriptModuleExts).map((ext) => path.join(root, `**/*${ext}`)),
|
|
12695
|
+
...Array.from(watchedSnapshotScriptExts).map((ext) => path.join(root, `**/*${ext}`))
|
|
12683
12696
|
];
|
|
12684
12697
|
for (const include of resolveUserBuildWatchInclude(configService, inlineConfig)) patterns.push(include);
|
|
12685
12698
|
return patterns;
|
|
@@ -13165,7 +13178,7 @@ function createBuildService(ctx) {
|
|
|
13165
13178
|
snapshotWatcher.on("all", (event, id) => {
|
|
13166
13179
|
if (!id) return;
|
|
13167
13180
|
if (isDevOutputFile(id)) return;
|
|
13168
|
-
if (!shouldHandleSnapshotSidecarFile(id,
|
|
13181
|
+
if (!shouldHandleSnapshotSidecarFile(id, ctx)) return;
|
|
13169
13182
|
const sidecarStartedAt = performance.now();
|
|
13170
13183
|
runSnapshotBuild({
|
|
13171
13184
|
event: event.startsWith("unlink") ? "delete" : event.startsWith("add") ? "create" : "update",
|
|
@@ -17885,9 +17898,163 @@ function useLoadEntry(ctx, options) {
|
|
|
17885
17898
|
const IMPLICIT_REQUIRE_RE = /\b(?:const|let|var)\s+[A-Za-z_$][\w$]*\s*=\s*require\((`[^`]+`|'[^']+'|"[^"]+")\);?/g;
|
|
17886
17899
|
const REQUIRE_CALL_RE = /\brequire\((`[^`]+`|'[^']+'|"[^"]+")\)/g;
|
|
17887
17900
|
const WEVU_SRC_CHUNK_RE = /(?:^|\/)wevu-src\.js$/;
|
|
17901
|
+
const WEVU_VENDOR_RUNTIME_CHUNK_RE = /(?:^|\/)weapp-vendors\/wevu-[^/]+\.js$/;
|
|
17888
17902
|
const WEVU_EXPORT_ALIASES = [["defineComponent", "__wevuDefineComponent"], ["createWevuComponent", "__wevuCreateWevuComponent"]];
|
|
17889
|
-
const
|
|
17890
|
-
|
|
17903
|
+
const WEVU_SYNTHETIC_SINGLE_PAGE_HOOK_EXPORTS = [
|
|
17904
|
+
"onAddToFavorites",
|
|
17905
|
+
"onSaveExitState",
|
|
17906
|
+
"onShareAppMessage",
|
|
17907
|
+
"onShareTimeline"
|
|
17908
|
+
];
|
|
17909
|
+
const WEVU_INTERNAL_REACTIVITY_EXPORTS = [
|
|
17910
|
+
"addMutationRecorder",
|
|
17911
|
+
"batch",
|
|
17912
|
+
"computed",
|
|
17913
|
+
"customRef",
|
|
17914
|
+
"effect",
|
|
17915
|
+
"effectScope",
|
|
17916
|
+
"endBatch",
|
|
17917
|
+
"getCurrentScope",
|
|
17918
|
+
"getDeepWatchStrategy",
|
|
17919
|
+
"getReactiveVersion",
|
|
17920
|
+
"isProxy",
|
|
17921
|
+
"isRaw",
|
|
17922
|
+
"isReactive",
|
|
17923
|
+
"isReadonly",
|
|
17924
|
+
"isRef",
|
|
17925
|
+
"isShallowReactive",
|
|
17926
|
+
"isShallowRef",
|
|
17927
|
+
"markRaw",
|
|
17928
|
+
"nextTick",
|
|
17929
|
+
"onScopeDispose",
|
|
17930
|
+
"prelinkReactiveTree",
|
|
17931
|
+
"reactive",
|
|
17932
|
+
"readonly",
|
|
17933
|
+
"ref",
|
|
17934
|
+
"removeMutationRecorder",
|
|
17935
|
+
"setDeepWatchStrategy",
|
|
17936
|
+
"shallowReactive",
|
|
17937
|
+
"shallowReadonly",
|
|
17938
|
+
"shallowRef",
|
|
17939
|
+
"startBatch",
|
|
17940
|
+
"stop",
|
|
17941
|
+
"toRaw",
|
|
17942
|
+
"toRef",
|
|
17943
|
+
"toRefs",
|
|
17944
|
+
"toValue",
|
|
17945
|
+
"touchReactive",
|
|
17946
|
+
"traverse",
|
|
17947
|
+
"triggerRef",
|
|
17948
|
+
"unref",
|
|
17949
|
+
"watch",
|
|
17950
|
+
"watchEffect",
|
|
17951
|
+
"watchPostEffect",
|
|
17952
|
+
"watchSyncEffect"
|
|
17953
|
+
];
|
|
17954
|
+
const WEVU_INTERNAL_TEMPLATE_EXPORTS = [
|
|
17955
|
+
"normalizeClass",
|
|
17956
|
+
"normalizeStyle",
|
|
17957
|
+
"resolvePropValue"
|
|
17958
|
+
];
|
|
17959
|
+
const WEVU_INTERNAL_RUNTIME_EXPORTS = [
|
|
17960
|
+
"callHookList",
|
|
17961
|
+
"callHookReturn",
|
|
17962
|
+
"createApp",
|
|
17963
|
+
"createWevuComponent",
|
|
17964
|
+
"createWevuScopedSlotComponent",
|
|
17965
|
+
"defineAppSetup",
|
|
17966
|
+
"defineComponent",
|
|
17967
|
+
"getCurrentInstance",
|
|
17968
|
+
"getCurrentPageStackSnapshot",
|
|
17969
|
+
"getCurrentSetupContext",
|
|
17970
|
+
"getNavigationBarMetrics",
|
|
17971
|
+
"hasInjectionContext",
|
|
17972
|
+
"inject",
|
|
17973
|
+
"injectGlobal",
|
|
17974
|
+
"isNoSetData",
|
|
17975
|
+
"markNoSetData",
|
|
17976
|
+
"mergeModels",
|
|
17977
|
+
"mountRuntimeInstance",
|
|
17978
|
+
"onActivated",
|
|
17979
|
+
"onAddToFavorites",
|
|
17980
|
+
"onAttached",
|
|
17981
|
+
"onBeforeMount",
|
|
17982
|
+
"onBeforeUnmount",
|
|
17983
|
+
"onBeforeUpdate",
|
|
17984
|
+
"onDeactivated",
|
|
17985
|
+
"onDetached",
|
|
17986
|
+
"onError",
|
|
17987
|
+
"onErrorCaptured",
|
|
17988
|
+
"onHide",
|
|
17989
|
+
"onLaunch",
|
|
17990
|
+
"onLoad",
|
|
17991
|
+
"onMemoryWarning",
|
|
17992
|
+
"onMounted",
|
|
17993
|
+
"onMoved",
|
|
17994
|
+
"onPageNotFound",
|
|
17995
|
+
"onPageScroll",
|
|
17996
|
+
"onPullDownRefresh",
|
|
17997
|
+
"onReachBottom",
|
|
17998
|
+
"onReady",
|
|
17999
|
+
"onResize",
|
|
18000
|
+
"onRouteDone",
|
|
18001
|
+
"onSaveExitState",
|
|
18002
|
+
"onServerPrefetch",
|
|
18003
|
+
"onShareAppMessage",
|
|
18004
|
+
"onShareTimeline",
|
|
18005
|
+
"onShow",
|
|
18006
|
+
"onTabItemTap",
|
|
18007
|
+
"onThemeChange",
|
|
18008
|
+
"onUnhandledRejection",
|
|
18009
|
+
"onUnload",
|
|
18010
|
+
"onUnmounted",
|
|
18011
|
+
"onUpdated",
|
|
18012
|
+
"provide",
|
|
18013
|
+
"provideGlobal",
|
|
18014
|
+
"registerApp",
|
|
18015
|
+
"registerComponent",
|
|
18016
|
+
"resetWevuDefaults",
|
|
18017
|
+
"resolveLayoutBridge",
|
|
18018
|
+
"resolveLayoutHost",
|
|
18019
|
+
"resolveRuntimePageLayoutName",
|
|
18020
|
+
"runSetupFunction",
|
|
18021
|
+
"setCurrentInstance",
|
|
18022
|
+
"setCurrentSetupContext",
|
|
18023
|
+
"setGlobalProvidedValue",
|
|
18024
|
+
"setPageLayout",
|
|
18025
|
+
"setRuntimeSetDataVisibility",
|
|
18026
|
+
"setWevuDefaults",
|
|
18027
|
+
"syncRuntimePageLayoutState",
|
|
18028
|
+
"syncRuntimePageLayoutStateFromRuntime",
|
|
18029
|
+
"teardownRuntimeInstance",
|
|
18030
|
+
"use",
|
|
18031
|
+
"useAsyncPullDownRefresh",
|
|
18032
|
+
"useAttrs",
|
|
18033
|
+
"useBindModel",
|
|
18034
|
+
"useBoundingClientRect",
|
|
18035
|
+
"useChangeModel",
|
|
18036
|
+
"useDisposables",
|
|
18037
|
+
"useElementIntersectionObserver",
|
|
18038
|
+
"useIntersectionObserver",
|
|
18039
|
+
"useLayoutBridge",
|
|
18040
|
+
"useLayoutHosts",
|
|
18041
|
+
"useModel",
|
|
18042
|
+
"useNativeInstance",
|
|
18043
|
+
"useNativePageRouter",
|
|
18044
|
+
"useNativeRouter",
|
|
18045
|
+
"useNavigationBarMetrics",
|
|
18046
|
+
"usePageLayout",
|
|
18047
|
+
"usePageScrollThrottle",
|
|
18048
|
+
"usePageStack",
|
|
18049
|
+
"useScrollOffset",
|
|
18050
|
+
"useSelectorFields",
|
|
18051
|
+
"useSelectorQuery",
|
|
18052
|
+
"useSlots",
|
|
18053
|
+
"useTemplateRef",
|
|
18054
|
+
"useUpdatePerformanceListener",
|
|
18055
|
+
"version",
|
|
18056
|
+
"waitForLayoutHost"
|
|
18057
|
+
];
|
|
17891
18058
|
const WEVU_RUNTIME_MODULE_IDS = [
|
|
17892
18059
|
"wevu",
|
|
17893
18060
|
"wevu/router",
|
|
@@ -17918,20 +18085,12 @@ const WEVU_RUNTIME_MODULE_EXPORT_MARKERS = {
|
|
|
17918
18085
|
"wevu/fetch": ["createFetch", "useFetch"],
|
|
17919
18086
|
"wevu/web-apis": ["installWebApis", "createWebApis"],
|
|
17920
18087
|
"wevu/internal-runtime": WEVU_INTERNAL_RUNTIME_EXPORTS,
|
|
17921
|
-
"wevu/internal-reactivity":
|
|
17922
|
-
|
|
17923
|
-
"reactive",
|
|
17924
|
-
"computed",
|
|
17925
|
-
"watch",
|
|
17926
|
-
"watchEffect",
|
|
17927
|
-
"nextTick"
|
|
17928
|
-
],
|
|
17929
|
-
"wevu/internal-template": [
|
|
17930
|
-
"normalizeClass",
|
|
17931
|
-
"normalizeStyle",
|
|
17932
|
-
"resolvePropValue"
|
|
17933
|
-
]
|
|
18088
|
+
"wevu/internal-reactivity": WEVU_INTERNAL_REACTIVITY_EXPORTS,
|
|
18089
|
+
"wevu/internal-template": WEVU_INTERNAL_TEMPLATE_EXPORTS
|
|
17934
18090
|
};
|
|
18091
|
+
const WEVU_INTERNAL_REACTIVITY_EXPORT_SET = new Set(WEVU_INTERNAL_REACTIVITY_EXPORTS);
|
|
18092
|
+
const WEVU_INTERNAL_TEMPLATE_EXPORT_SET = new Set(WEVU_INTERNAL_TEMPLATE_EXPORTS);
|
|
18093
|
+
const WEVU_INTERNAL_RUNTIME_EXPORT_SET = new Set(WEVU_INTERNAL_RUNTIME_EXPORTS);
|
|
17935
18094
|
const JS_IDENTIFIER_RE = /^[A-Z_$][\w$]*$/i;
|
|
17936
18095
|
function filterPluginBundleOutputs(bundle, configService) {
|
|
17937
18096
|
if (configService.pluginOnly) return;
|
|
@@ -18102,6 +18261,7 @@ function rememberWevuRuntimeChunk(moduleId, chunk, options) {
|
|
|
18102
18261
|
function rememberCurrentWevuRuntimeChunks(bundle, options) {
|
|
18103
18262
|
const rememberedFileNames = /* @__PURE__ */ new Set();
|
|
18104
18263
|
for (const moduleId of WEVU_RUNTIME_MODULE_IDS) {
|
|
18264
|
+
if (moduleId === "wevu") continue;
|
|
18105
18265
|
const chunk = resolveWevuRuntimeChunkByModuleId(bundle, moduleId) ?? resolveWevuInternalChunkByExportMarkers(bundle, WEVU_RUNTIME_MODULE_EXPORT_MARKERS[moduleId], rememberedFileNames);
|
|
18106
18266
|
rememberWevuRuntimeChunk(moduleId, chunk, options);
|
|
18107
18267
|
if (chunk?.fileName) rememberedFileNames.add(chunk.fileName);
|
|
@@ -18125,6 +18285,61 @@ function formatNamedRequireBindings(bindings) {
|
|
|
18125
18285
|
return importedName === localName ? importedName : `${importedName}: ${localName}`;
|
|
18126
18286
|
}).join(", ");
|
|
18127
18287
|
}
|
|
18288
|
+
function resolveRootWevuInternalModuleId(importedName) {
|
|
18289
|
+
if (WEVU_INTERNAL_REACTIVITY_EXPORT_SET.has(importedName)) return "wevu/internal-reactivity";
|
|
18290
|
+
if (WEVU_INTERNAL_TEMPLATE_EXPORT_SET.has(importedName)) return "wevu/internal-template";
|
|
18291
|
+
if (WEVU_INTERNAL_RUNTIME_EXPORT_SET.has(importedName)) return "wevu/internal-runtime";
|
|
18292
|
+
}
|
|
18293
|
+
function resolveWevuRuntimeChunkForModuleId(bundle, moduleId, importedNames) {
|
|
18294
|
+
return resolveWevuRuntimeChunkByModuleId(bundle, moduleId) ?? resolveWevuInternalChunk(bundle, importedNames);
|
|
18295
|
+
}
|
|
18296
|
+
function resolveRememberedWevuRuntimeFileName(moduleId, importedNames, options) {
|
|
18297
|
+
const names = [...importedNames];
|
|
18298
|
+
const canUseLegacyRuntimeFileName = moduleId === "wevu/internal-runtime" && names.every((importedName) => WEVU_INTERNAL_RUNTIME_EXPORT_SET.has(importedName));
|
|
18299
|
+
return options.runtimeFileNames?.get(moduleId) ?? (canUseLegacyRuntimeFileName ? options.runtimeFileName : void 0);
|
|
18300
|
+
}
|
|
18301
|
+
function formatWevuRuntimeRequire(fileName, runtimeFileName, bindings) {
|
|
18302
|
+
const specifier = normalizeRelativeRequireSpecifier(fileName, runtimeFileName);
|
|
18303
|
+
return `const { ${formatNamedRequireBindings(bindings)} } = require(${JSON.stringify(specifier)});`;
|
|
18304
|
+
}
|
|
18305
|
+
function rewriteRootWevuImport(bundle, fileName, full, bindings, options, requiredRuntimeFileNames) {
|
|
18306
|
+
const groupedBindings = /* @__PURE__ */ new Map();
|
|
18307
|
+
const remainingBindings = [];
|
|
18308
|
+
for (const binding of bindings) {
|
|
18309
|
+
const moduleId = resolveRootWevuInternalModuleId(binding.importedName);
|
|
18310
|
+
if (!moduleId) {
|
|
18311
|
+
remainingBindings.push(binding);
|
|
18312
|
+
continue;
|
|
18313
|
+
}
|
|
18314
|
+
const group = groupedBindings.get(moduleId) ?? [];
|
|
18315
|
+
group.push(binding);
|
|
18316
|
+
groupedBindings.set(moduleId, group);
|
|
18317
|
+
}
|
|
18318
|
+
if (!groupedBindings.size) return {
|
|
18319
|
+
code: full,
|
|
18320
|
+
changed: false
|
|
18321
|
+
};
|
|
18322
|
+
const statements = [];
|
|
18323
|
+
for (const [moduleId, moduleBindings] of groupedBindings) {
|
|
18324
|
+
const importedNames = moduleBindings.map((binding) => binding.importedName);
|
|
18325
|
+
const runtimeChunk = resolveWevuRuntimeChunkForModuleId(bundle, moduleId, importedNames);
|
|
18326
|
+
const runtimeFileName = runtimeChunk?.fileName ?? resolveRememberedWevuRuntimeFileName(moduleId, importedNames, options);
|
|
18327
|
+
if (!runtimeFileName) return {
|
|
18328
|
+
code: full,
|
|
18329
|
+
changed: false
|
|
18330
|
+
};
|
|
18331
|
+
rememberWevuRuntimeChunk(moduleId, runtimeChunk, options);
|
|
18332
|
+
requiredRuntimeFileNames.add(runtimeFileName);
|
|
18333
|
+
statements.push(formatWevuRuntimeRequire(fileName, runtimeFileName, moduleBindings));
|
|
18334
|
+
}
|
|
18335
|
+
if (remainingBindings.length) statements.push(`import { ${remainingBindings.map(({ importedName, localName }) => {
|
|
18336
|
+
return importedName === localName ? importedName : `${importedName} as ${localName}`;
|
|
18337
|
+
}).join(", ")} } from "wevu";`);
|
|
18338
|
+
return {
|
|
18339
|
+
code: statements.join("\n"),
|
|
18340
|
+
changed: true
|
|
18341
|
+
};
|
|
18342
|
+
}
|
|
18128
18343
|
function rewriteWevuInternalRuntimeImports(bundle, options = {}) {
|
|
18129
18344
|
const importRe = /\bimport\s*\{([^}]*)\}\s*from\s*["'](wevu(?:\/(?:router|store|api|fetch|web-apis|internal-(?:runtime|reactivity|template)))?)["'];?/g;
|
|
18130
18345
|
const requireRe = /\brequire\(\s*(`wevu(?:\/(?:router|store|api|fetch|web-apis|internal-(?:runtime|reactivity|template)))?`|'wevu(?:\/(?:router|store|api|fetch|web-apis|internal-(?:runtime|reactivity|template)))?'|"wevu(?:\/(?:router|store|api|fetch|web-apis|internal-(?:runtime|reactivity|template)))?")\s*\)/g;
|
|
@@ -18143,10 +18358,14 @@ function rewriteWevuInternalRuntimeImports(bundle, options = {}) {
|
|
|
18143
18358
|
rewritten = rewritten.replace(importRe, (full, importClause, source) => {
|
|
18144
18359
|
const bindings = parseNamedImportBindings(importClause);
|
|
18145
18360
|
const importedNames = bindings.map((binding) => binding.importedName);
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
|
|
18149
|
-
|
|
18361
|
+
if (source === "wevu") {
|
|
18362
|
+
const result = rewriteRootWevuImport(bundle, fileName, full, bindings, options, requiredRuntimeFileNames);
|
|
18363
|
+
changed ||= result.changed;
|
|
18364
|
+
return result.code;
|
|
18365
|
+
}
|
|
18366
|
+
const resolvedInternalModuleId = source;
|
|
18367
|
+
const runtimeChunk = resolveWevuRuntimeChunkForModuleId(bundle, resolvedInternalModuleId, importedNames);
|
|
18368
|
+
const rememberedRuntimeFileName = resolveRememberedWevuRuntimeFileName(resolvedInternalModuleId, importedNames, options);
|
|
18150
18369
|
const runtimeFileName = runtimeChunk?.fileName ?? rememberedRuntimeFileName;
|
|
18151
18370
|
if (!runtimeFileName) return full;
|
|
18152
18371
|
rememberWevuRuntimeChunk(resolvedInternalModuleId, runtimeChunk, options);
|
|
@@ -18269,6 +18488,56 @@ function appendWevuRuntimeExports(chunk, aliases, importedMembers) {
|
|
|
18269
18488
|
}
|
|
18270
18489
|
if (lines.length) chunk.code = `${chunk.code}\n${lines.join("\n")}`;
|
|
18271
18490
|
}
|
|
18491
|
+
function formatSyntheticSinglePageHookExport(exportName) {
|
|
18492
|
+
return [
|
|
18493
|
+
`function ${exportName}(handler) {`,
|
|
18494
|
+
`\tconst instance = require_weapp_vendors_wevu_base.assertInSetup(${JSON.stringify(exportName)});`,
|
|
18495
|
+
`\trequire_weapp_vendors_wevu_base.pushHook(instance, ${JSON.stringify(exportName)}, handler, { single: true });`,
|
|
18496
|
+
`}`,
|
|
18497
|
+
`Object.defineProperty(exports, ${JSON.stringify(exportName)}, { enumerable: true, get: function() { return ${exportName}; } });`
|
|
18498
|
+
].join("\n");
|
|
18499
|
+
}
|
|
18500
|
+
function appendSyntheticWevuHookExports(chunk, importedMembers) {
|
|
18501
|
+
if (!chunk.code.includes("require_weapp_vendors_wevu_base")) return;
|
|
18502
|
+
const existingExports = collectExistingExportNames(chunk.code);
|
|
18503
|
+
const lines = [];
|
|
18504
|
+
for (const exportName of WEVU_SYNTHETIC_SINGLE_PAGE_HOOK_EXPORTS) {
|
|
18505
|
+
if (!importedMembers.has(exportName) || existingExports.has(exportName)) continue;
|
|
18506
|
+
lines.push(formatSyntheticSinglePageHookExport(exportName));
|
|
18507
|
+
existingExports.add(exportName);
|
|
18508
|
+
}
|
|
18509
|
+
if (lines.length) chunk.code = `${chunk.code}\n${lines.join("\n")}`;
|
|
18510
|
+
}
|
|
18511
|
+
function resolveWevuBaseChunk(bundle) {
|
|
18512
|
+
return resolveWevuInternalChunk(bundle, ["assertInSetup", "pushHook"]);
|
|
18513
|
+
}
|
|
18514
|
+
function formatSyntheticSinglePageHookFallback(hookName, receiverAccess, baseRequireSpecifier) {
|
|
18515
|
+
const baseRequire = `require(${JSON.stringify(baseRequireSpecifier)})`;
|
|
18516
|
+
return `(${receiverAccess} || function(handler) { const instance = ${baseRequire}.assertInSetup(${JSON.stringify(hookName)}); ${baseRequire}.pushHook(instance, ${JSON.stringify(hookName)}, handler, { single: true }); })(`;
|
|
18517
|
+
}
|
|
18518
|
+
function rewriteSyntheticWevuHookAccess(chunk, wevuChunkFileName, baseChunkFileName, importedMembers) {
|
|
18519
|
+
const hookNames = WEVU_SYNTHETIC_SINGLE_PAGE_HOOK_EXPORTS.filter((name) => importedMembers.has(name));
|
|
18520
|
+
if (!hookNames.length) return;
|
|
18521
|
+
const baseRequireSpecifier = normalizeRelativeRequireSpecifier(chunk.fileName, baseChunkFileName);
|
|
18522
|
+
let nextCode = chunk.code;
|
|
18523
|
+
const localRequireRe = /\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*require\((`[^`]+`|'[^']+'|"[^"]+")\);?/g;
|
|
18524
|
+
const runtimeRefs = /* @__PURE__ */ new Set();
|
|
18525
|
+
for (const match of nextCode.matchAll(localRequireRe)) if (resolveRequireTarget(chunk.fileName, stripQuotes(match[2])) === wevuChunkFileName) runtimeRefs.add(match[1]);
|
|
18526
|
+
for (const hookName of hookNames) {
|
|
18527
|
+
for (const ref of runtimeRefs) {
|
|
18528
|
+
const memberRe = new RegExp(`\\b${escapeRegExp(ref)}\\.${hookName}\\s*\\(`, "g");
|
|
18529
|
+
nextCode = nextCode.replace(memberRe, () => {
|
|
18530
|
+
return formatSyntheticSinglePageHookFallback(hookName, `${ref}.${hookName}`, baseRequireSpecifier);
|
|
18531
|
+
});
|
|
18532
|
+
}
|
|
18533
|
+
nextCode = nextCode.replace(/require\((`[^`]+`|'[^']+'|"[^"]+")\)\.([A-Za-z_$][\w$]*)\s*\(/g, (full, rawSpecifier, property) => {
|
|
18534
|
+
if (property !== hookName) return full;
|
|
18535
|
+
if (resolveRequireTarget(chunk.fileName, stripQuotes(rawSpecifier)) !== wevuChunkFileName) return full;
|
|
18536
|
+
return formatSyntheticSinglePageHookFallback(hookName, `require(${rawSpecifier}).${hookName}`, baseRequireSpecifier);
|
|
18537
|
+
});
|
|
18538
|
+
}
|
|
18539
|
+
chunk.code = nextCode;
|
|
18540
|
+
}
|
|
18272
18541
|
function rewriteStableWevuRuntimeAccess(chunk, wevuChunkFileName, aliases) {
|
|
18273
18542
|
if (!aliases.size) return;
|
|
18274
18543
|
let nextCode = chunk.code;
|
|
@@ -18293,15 +18562,29 @@ function rewriteStableWevuRuntimeAccess(chunk, wevuChunkFileName, aliases) {
|
|
|
18293
18562
|
chunk.code = nextCode;
|
|
18294
18563
|
}
|
|
18295
18564
|
function stabilizeWevuRuntimeChunkAccess(bundle) {
|
|
18296
|
-
const
|
|
18297
|
-
return output?.type === "chunk" && WEVU_SRC_CHUNK_RE.test(output.fileName);
|
|
18565
|
+
const wevuChunks = Object.values(bundle).filter((output) => {
|
|
18566
|
+
return output?.type === "chunk" && (WEVU_SRC_CHUNK_RE.test(output.fileName) || WEVU_VENDOR_RUNTIME_CHUNK_RE.test(output.fileName));
|
|
18298
18567
|
});
|
|
18299
|
-
if (!
|
|
18300
|
-
const
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18568
|
+
if (!wevuChunks.length) return;
|
|
18569
|
+
const baseChunk = resolveWevuBaseChunk(bundle);
|
|
18570
|
+
for (const wevuChunk of wevuChunks) {
|
|
18571
|
+
const aliases = resolveWevuExportAliasMap(wevuChunk);
|
|
18572
|
+
const importedMembers = collectImportedWevuRuntimeMembers(bundle, wevuChunk.fileName);
|
|
18573
|
+
appendWevuRuntimeExports(wevuChunk, aliases, importedMembers);
|
|
18574
|
+
appendSyntheticWevuHookExports(wevuChunk, importedMembers);
|
|
18575
|
+
for (const output of Object.values(bundle)) {
|
|
18576
|
+
if (!output || output.type !== "chunk" || typeof output.code !== "string" || output.fileName === wevuChunk.fileName) continue;
|
|
18577
|
+
const chunk = output;
|
|
18578
|
+
rewriteStableWevuRuntimeAccess(chunk, wevuChunk.fileName, aliases);
|
|
18579
|
+
if (baseChunk?.fileName) {
|
|
18580
|
+
rewriteSyntheticWevuHookAccess(chunk, wevuChunk.fileName, baseChunk.fileName, importedMembers);
|
|
18581
|
+
if (chunk.code.includes(normalizeRelativeRequireSpecifier(chunk.fileName, baseChunk.fileName))) {
|
|
18582
|
+
const nextImports = new Set(Array.isArray(chunk.imports) ? chunk.imports : []);
|
|
18583
|
+
nextImports.add(baseChunk.fileName);
|
|
18584
|
+
chunk.imports = [...nextImports];
|
|
18585
|
+
}
|
|
18586
|
+
}
|
|
18587
|
+
}
|
|
18305
18588
|
}
|
|
18306
18589
|
}
|
|
18307
18590
|
//#endregion
|
|
@@ -18354,26 +18637,80 @@ function collectAffectedEntriesFromSharedChunks(state, startId) {
|
|
|
18354
18637
|
}
|
|
18355
18638
|
return affected;
|
|
18356
18639
|
}
|
|
18357
|
-
function
|
|
18358
|
-
|
|
18359
|
-
state.
|
|
18360
|
-
if (
|
|
18361
|
-
for (const
|
|
18640
|
+
function collectAffectedSharedChunks(state, startId) {
|
|
18641
|
+
const affected = /* @__PURE__ */ new Set();
|
|
18642
|
+
const chunkIds = state.hmrSharedChunksByModule.get(normalizeFsResolvedId(startId));
|
|
18643
|
+
if (!chunkIds?.size) return affected;
|
|
18644
|
+
for (const chunkId of chunkIds) affected.add(chunkId);
|
|
18645
|
+
return affected;
|
|
18646
|
+
}
|
|
18647
|
+
function refreshModuleGraph(pluginCtx, state, bundle, options) {
|
|
18648
|
+
const mode = options?.mode ?? "replace";
|
|
18649
|
+
if (mode === "replace") {
|
|
18650
|
+
state.moduleImporters.clear();
|
|
18651
|
+
state.entryModuleIds.clear();
|
|
18652
|
+
}
|
|
18653
|
+
const addModuleImporter = (moduleId, importerId) => {
|
|
18654
|
+
const normalizedModuleId = normalizeFsResolvedId(moduleId);
|
|
18655
|
+
const normalizedImporterId = normalizeFsResolvedId(importerId);
|
|
18656
|
+
if (normalizedModuleId === normalizedImporterId || isSkippableResolvedId(normalizedModuleId) || isSkippableResolvedId(normalizedImporterId)) return;
|
|
18657
|
+
const importers = state.moduleImporters.get(normalizedModuleId) ?? /* @__PURE__ */ new Set();
|
|
18658
|
+
importers.add(normalizedImporterId);
|
|
18659
|
+
state.moduleImporters.set(normalizedModuleId, importers);
|
|
18660
|
+
};
|
|
18661
|
+
const removeEntryImporter = (entryId) => {
|
|
18662
|
+
const normalizedEntryId = normalizeFsResolvedId(entryId);
|
|
18663
|
+
for (const [moduleId, importers] of state.moduleImporters) {
|
|
18664
|
+
importers.delete(normalizedEntryId);
|
|
18665
|
+
if (!importers.size) state.moduleImporters.delete(moduleId);
|
|
18666
|
+
}
|
|
18667
|
+
};
|
|
18668
|
+
const collectChunkModuleIds = (chunk) => {
|
|
18669
|
+
const moduleIds = /* @__PURE__ */ new Set();
|
|
18670
|
+
if (Array.isArray(chunk.moduleIds)) for (const moduleId of chunk.moduleIds) moduleIds.add(moduleId);
|
|
18671
|
+
for (const moduleId of Object.keys(chunk.modules ?? {})) moduleIds.add(moduleId);
|
|
18672
|
+
return moduleIds;
|
|
18673
|
+
};
|
|
18674
|
+
const collectChunkEntryIds = (chunk, moduleIds) => {
|
|
18675
|
+
const entryIds = /* @__PURE__ */ new Set();
|
|
18676
|
+
const addEntryIfTracked = (rawId) => {
|
|
18677
|
+
if (!rawId) return;
|
|
18678
|
+
const entryId = normalizeFsResolvedId(rawId);
|
|
18679
|
+
if (!isSkippableResolvedId(entryId) && state.resolvedEntryMap.has(entryId)) entryIds.add(entryId);
|
|
18680
|
+
};
|
|
18681
|
+
addEntryIfTracked(chunk.facadeModuleId);
|
|
18682
|
+
for (const moduleId of moduleIds) addEntryIfTracked(moduleId);
|
|
18683
|
+
return entryIds;
|
|
18684
|
+
};
|
|
18685
|
+
if (typeof pluginCtx.getModuleIds === "function" && typeof pluginCtx.getModuleInfo === "function") for (const rawId of pluginCtx.getModuleIds()) {
|
|
18362
18686
|
const normalizedId = normalizeFsResolvedId(rawId);
|
|
18363
18687
|
if (isSkippableResolvedId(normalizedId)) continue;
|
|
18364
18688
|
const info = pluginCtx.getModuleInfo(rawId);
|
|
18365
18689
|
if (!info) continue;
|
|
18366
18690
|
if (info.isEntry) state.entryModuleIds.add(normalizedId);
|
|
18367
|
-
const importers = /* @__PURE__ */ new Set();
|
|
18368
18691
|
const importerIds = [];
|
|
18369
18692
|
if (Array.isArray(info.importers)) importerIds.push(...info.importers);
|
|
18370
18693
|
if (Array.isArray(info.dynamicImporters)) importerIds.push(...info.dynamicImporters);
|
|
18371
|
-
for (const importer of importerIds)
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
if (
|
|
18694
|
+
for (const importer of importerIds) addModuleImporter(normalizedId, importer);
|
|
18695
|
+
}
|
|
18696
|
+
if (!bundle) return;
|
|
18697
|
+
const chunkRecords = [];
|
|
18698
|
+
for (const output of Object.values(bundle)) {
|
|
18699
|
+
if (output?.type !== "chunk") continue;
|
|
18700
|
+
const chunk = output;
|
|
18701
|
+
const moduleIds = collectChunkModuleIds(chunk);
|
|
18702
|
+
const entryIds = collectChunkEntryIds(chunk, moduleIds);
|
|
18703
|
+
if (!entryIds.size) continue;
|
|
18704
|
+
chunkRecords.push({
|
|
18705
|
+
chunk,
|
|
18706
|
+
entryIds,
|
|
18707
|
+
moduleIds
|
|
18708
|
+
});
|
|
18709
|
+
}
|
|
18710
|
+
if (mode === "merge") for (const { entryIds } of chunkRecords) for (const entryId of entryIds) removeEntryImporter(entryId);
|
|
18711
|
+
for (const { entryIds, moduleIds } of chunkRecords) for (const entryId of entryIds) {
|
|
18712
|
+
state.entryModuleIds.add(entryId);
|
|
18713
|
+
for (const moduleId of moduleIds) addModuleImporter(moduleId, entryId);
|
|
18377
18714
|
}
|
|
18378
18715
|
}
|
|
18379
18716
|
function appendSharedChunkImporters(bundle, state, onlyEntryIds, previousImporters, previousDependencies) {
|
|
@@ -18420,6 +18757,7 @@ function appendSharedChunkImporters(bundle, state, onlyEntryIds, previousImporte
|
|
|
18420
18757
|
return moduleIds;
|
|
18421
18758
|
};
|
|
18422
18759
|
const addSharedChunkModule = (moduleId, chunkId) => {
|
|
18760
|
+
state.ctx.runtimeState?.build?.hmr?.sharedChunkSourceModuleIds?.add(moduleId);
|
|
18423
18761
|
const current = state.hmrSharedChunksByModule.get(moduleId);
|
|
18424
18762
|
if (current) current.add(chunkId);
|
|
18425
18763
|
else state.hmrSharedChunksByModule.set(moduleId, /* @__PURE__ */ new Set([chunkId]));
|
|
@@ -19544,6 +19882,7 @@ function pruneUnchangedDevHmrOutputs(ctx, bundle, rewriteOptions) {
|
|
|
19544
19882
|
const isHmrBuild = ctx.runtimeState?.build?.hmr?.profile?.event !== void 0;
|
|
19545
19883
|
const emittedChunkFileNames = ctx.runtimeState?.build?.hmr?.lastEmittedChunkFileNames;
|
|
19546
19884
|
rewriteWevuInternalRuntimeImports(bundle, rewriteOptions);
|
|
19885
|
+
stabilizeWevuRuntimeChunkAccess(bundle);
|
|
19547
19886
|
pruneUneventedDevHmrChunks(ctx, bundle);
|
|
19548
19887
|
for (const [fileName, output] of Object.entries(bundle)) {
|
|
19549
19888
|
const source = outputSourceToString(output);
|
|
@@ -19580,6 +19919,7 @@ function createOutputFinalizerPlugin(ctx) {
|
|
|
19580
19919
|
enforce: "post",
|
|
19581
19920
|
generateBundle(_options, bundle) {
|
|
19582
19921
|
rewriteWevuInternalRuntimeImports(bundle, wevuRuntimeRewriteOptions);
|
|
19922
|
+
stabilizeWevuRuntimeChunkAccess(bundle);
|
|
19583
19923
|
normalizePreprocessorStyleAssets(bundle, ctx.configService.outputExtensions?.wxss, (asset) => this.emitFile(asset));
|
|
19584
19924
|
pruneUnchangedDevHmrOutputs(ctx, bundle, wevuRuntimeRewriteOptions);
|
|
19585
19925
|
}
|
|
@@ -20736,6 +21076,14 @@ function prunePartialHmrStableSharedChunks(bundle, state) {
|
|
|
20736
21076
|
delete bundle[fileName];
|
|
20737
21077
|
continue;
|
|
20738
21078
|
}
|
|
21079
|
+
if (state.hmrState.affectedSharedChunkIds?.has(fileName) === true || (output.fileName ? state.hmrState.affectedSharedChunkIds?.has(output.fileName) === true : false)) {
|
|
21080
|
+
const emittedChunkFileNames = state.ctx.runtimeState?.build?.hmr?.lastEmittedChunkFileNames;
|
|
21081
|
+
if (emittedChunkFileNames) {
|
|
21082
|
+
emittedChunkFileNames.add(fileName);
|
|
21083
|
+
if (output.fileName) emittedChunkFileNames.add(output.fileName);
|
|
21084
|
+
}
|
|
21085
|
+
continue;
|
|
21086
|
+
}
|
|
20739
21087
|
const activeEntryIds = state.hmrState.lastHmrEntryIds?.size ? state.hmrState.lastHmrEntryIds : state.hmrState.lastEmittedEntryIds;
|
|
20740
21088
|
if (isRuntimeVendorSharedChunk(fileName) && isImportedByActiveHmrChunk(fileName, bundle, activeEntryIds)) {
|
|
20741
21089
|
const emittedChunkFileNames = state.ctx.runtimeState?.build?.hmr?.lastEmittedChunkFileNames;
|
|
@@ -20800,9 +21148,9 @@ function createGenerateBundleHook(state, isPluginBuild) {
|
|
|
20800
21148
|
const duplicateWarningBytes = Number(configService.weappViteConfig?.chunks?.duplicateWarningBytes ?? 0);
|
|
20801
21149
|
const shouldWarnOnDuplicate = Number.isFinite(duplicateWarningBytes) && duplicateWarningBytes > 0;
|
|
20802
21150
|
let redundantBytesTotal = 0;
|
|
20803
|
-
if (configService.isDev && state.hmrSharedChunksMode === "auto") {
|
|
21151
|
+
if (configService.isDev && (state.hmrSharedChunksMode === "auto" || state.hmrSharedChunksMode === "full")) {
|
|
20804
21152
|
const forceFullSharedChunkRefresh = process.env.WEAPP_VITE_FORCE_FULL_HMR_SHARED_CHUNKS === "1";
|
|
20805
|
-
if (assetOnlyDevHmrBundle && !forceFullSharedChunkRefresh) {} else if (state.hmrState.didEmitAllEntries || !state.hmrState.hasBuiltOnce) refreshSharedChunkImporters(rolldownBundle, state);
|
|
21153
|
+
if (assetOnlyDevHmrBundle && !forceFullSharedChunkRefresh) {} else if (state.hmrSharedChunksMode === "full" || state.hmrState.didEmitAllEntries || !state.hmrState.hasBuiltOnce) refreshSharedChunkImporters(rolldownBundle, state);
|
|
20806
21154
|
else if (forceFullSharedChunkRefresh) refreshSharedChunkImporters(rolldownBundle, state);
|
|
20807
21155
|
else if (state.hmrState.lastHmrEntryIds?.size) refreshPartialSharedChunkImporters(rolldownBundle, state, state.hmrState.lastHmrEntryIds);
|
|
20808
21156
|
else if (state.hmrState.lastEmittedEntryIds?.size) refreshPartialSharedChunkImporters(rolldownBundle, state, state.hmrState.lastEmittedEntryIds);
|
|
@@ -20811,9 +21159,9 @@ function createGenerateBundleHook(state, isPluginBuild) {
|
|
|
20811
21159
|
prunePartialHmrStableSharedChunks(rolldownBundle, state);
|
|
20812
21160
|
retainFullEntryHmrChunks(rolldownBundle, state);
|
|
20813
21161
|
pruneUneventedDevHmrChunks(ctx, rolldownBundle);
|
|
21162
|
+
state.hmrState.affectedSharedChunkIds?.clear();
|
|
20814
21163
|
if (assetOnlyDevHmrBundle) {
|
|
20815
21164
|
normalizePreprocessorStyleAssets(rolldownBundle, state.ctx.configService.outputExtensions?.wxss, (asset) => this.emitFile(asset));
|
|
20816
|
-
refreshModuleGraph(this, state);
|
|
20817
21165
|
return;
|
|
20818
21166
|
}
|
|
20819
21167
|
function matchSubPackage(filePath) {
|
|
@@ -20975,7 +21323,7 @@ function createGenerateBundleHook(state, isPluginBuild) {
|
|
|
20975
21323
|
stabilizeWevuRuntimeChunkAccess(rolldownBundle);
|
|
20976
21324
|
syncChunkImportsFromRequireCalls(rolldownBundle);
|
|
20977
21325
|
normalizePreprocessorStyleAssets(rolldownBundle, state.ctx.configService.outputExtensions?.wxss, (asset) => this.emitFile(asset));
|
|
20978
|
-
refreshModuleGraph(this, state);
|
|
21326
|
+
refreshModuleGraph(this, state, rolldownBundle, { mode: state.ctx.configService.isDev && state.hmrState.hasBuiltOnce ? "merge" : "replace" });
|
|
20979
21327
|
if (configService.weappViteConfig?.debug?.watchFiles) {
|
|
20980
21328
|
const watcherService = ctx.watcherService;
|
|
20981
21329
|
const watcherRoot = subPackageMeta?.subPackage.root ?? "/";
|
|
@@ -21917,6 +22265,7 @@ function isCurrentSubPackageFile(relativeSrc, subPackageMeta) {
|
|
|
21917
22265
|
}
|
|
21918
22266
|
async function normalizeWatchEvent(id, event, options) {
|
|
21919
22267
|
if (event === "create" && (options.loadedEntrySet.has(id) || options.resolvedEntryMap.has(id)) && await fs.pathExists(id)) return "update";
|
|
22268
|
+
if (event === "create" && (options.moduleImporters?.has(id) || options.sharedChunkSourceModuleIds?.has(id)) && await fs.pathExists(id)) return "update";
|
|
21920
22269
|
if (event === "create" && await fs.pathExists(id)) {
|
|
21921
22270
|
const ext = path.extname(id);
|
|
21922
22271
|
if (ext) {
|
|
@@ -22172,9 +22521,13 @@ async function processChangedFile(state, id, event) {
|
|
|
22172
22521
|
}
|
|
22173
22522
|
}
|
|
22174
22523
|
const sharedChunkAffected = !dirtyReasonStats.has("sidecar-direct") && !dirtyReasonStats.has("json-sidecar") && !dirtyReasonStats.has("style-sidecar") && !dirtyReasonStats.has("css-importer") ? collectAffectedEntriesFromSharedChunks(state, normalizedId) : /* @__PURE__ */ new Set();
|
|
22175
|
-
if (sharedChunkAffected.size)
|
|
22176
|
-
|
|
22177
|
-
|
|
22524
|
+
if (sharedChunkAffected.size) {
|
|
22525
|
+
state.hmrState.affectedSharedChunkIds ??= /* @__PURE__ */ new Set();
|
|
22526
|
+
for (const chunkId of collectAffectedSharedChunks(state, normalizedId)) state.hmrState.affectedSharedChunkIds.add(chunkId);
|
|
22527
|
+
for (const entryId of sharedChunkAffected) {
|
|
22528
|
+
if (importerGraphAffectedEntryIds.has(entryId)) continue;
|
|
22529
|
+
markEntryDirtyWithCause(entryId, "dependency", "shared-chunk-source");
|
|
22530
|
+
}
|
|
22178
22531
|
}
|
|
22179
22532
|
const relativeCwd = configService.relativeCwd(normalizedId);
|
|
22180
22533
|
let handledByIndependentWatcher = false;
|
|
@@ -22229,7 +22582,9 @@ function createWatchChangeHook(state) {
|
|
|
22229
22582
|
const event = await normalizeWatchEvent(normalizedId, change.event, {
|
|
22230
22583
|
emittedJsonPaths: new Set([...state.jsonEmitFilesMap.values()].map((record) => record.entry.jsonPath ? normalizeFsResolvedId(record.entry.jsonPath) : "").filter(Boolean)),
|
|
22231
22584
|
loadedEntrySet: state.loadedEntrySet,
|
|
22232
|
-
|
|
22585
|
+
moduleImporters: state.moduleImporters,
|
|
22586
|
+
resolvedEntryMap: state.resolvedEntryMap,
|
|
22587
|
+
sharedChunkSourceModuleIds: state.ctx.runtimeState.build.hmr.sharedChunkSourceModuleIds
|
|
22233
22588
|
});
|
|
22234
22589
|
state.ctx.runtimeState.build.hmr.profile = {
|
|
22235
22590
|
...state.ctx.runtimeState.build.hmr.profile,
|
|
@@ -22346,6 +22701,7 @@ function weappVite(ctx, subPackageMeta) {
|
|
|
22346
22701
|
const hmrState = {
|
|
22347
22702
|
didEmitAllEntries: false,
|
|
22348
22703
|
hasBuiltOnce: false,
|
|
22704
|
+
affectedSharedChunkIds: /* @__PURE__ */ new Set(),
|
|
22349
22705
|
lastHmrEntryIds: /* @__PURE__ */ new Set(),
|
|
22350
22706
|
lastEmittedEntryIds: /* @__PURE__ */ new Set(),
|
|
22351
22707
|
skipSharedChunkRefresh: false
|
|
@@ -24236,6 +24592,21 @@ function shouldReplaceAppScriptBundleEntry(options) {
|
|
|
24236
24592
|
if (!isAppVueFile(options.filename) || !options.isDev || !options.hasDevHmrEvent) return false;
|
|
24237
24593
|
return true;
|
|
24238
24594
|
}
|
|
24595
|
+
function hasModuleImportDeclaration(script) {
|
|
24596
|
+
if (!script?.includes("import")) return false;
|
|
24597
|
+
try {
|
|
24598
|
+
let hasUnresolvedImport = false;
|
|
24599
|
+
traverse(parseJsLike(script), { ImportDeclaration(path) {
|
|
24600
|
+
if (typeof path.node.source.value === "string") {
|
|
24601
|
+
hasUnresolvedImport = true;
|
|
24602
|
+
path.stop();
|
|
24603
|
+
}
|
|
24604
|
+
} });
|
|
24605
|
+
return hasUnresolvedImport;
|
|
24606
|
+
} catch {
|
|
24607
|
+
return true;
|
|
24608
|
+
}
|
|
24609
|
+
}
|
|
24239
24610
|
function retainReplacedDevHmrScriptChunk(state, fileName) {
|
|
24240
24611
|
const hmrState = state.ctx.runtimeState?.build?.hmr;
|
|
24241
24612
|
if (!state.ctx.configService?.isDev || hmrState?.profile?.event === void 0) return;
|
|
@@ -24310,10 +24681,12 @@ async function emitResolvedCompiledVueEntryAssets(options) {
|
|
|
24310
24681
|
});
|
|
24311
24682
|
if (shouldReplaceAppScript && result.script?.trim()) {
|
|
24312
24683
|
const scriptFileName = `${relativeBase}.${options.scriptExtension}`;
|
|
24313
|
-
|
|
24684
|
+
const script = rewriteWevuInternalRuntimeImportCode(scriptFileName, result.script, {
|
|
24314
24685
|
runtimeFileName: ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileName,
|
|
24315
24686
|
runtimeFileNames: ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileNames
|
|
24316
|
-
})
|
|
24687
|
+
});
|
|
24688
|
+
if (hasModuleImportDeclaration(script)) return;
|
|
24689
|
+
emitSfcScriptAssetReplacingBundleEntry(pluginCtx, bundle, relativeBase, script, options.scriptExtension);
|
|
24317
24690
|
retainReplacedDevHmrScriptChunk(state, scriptFileName);
|
|
24318
24691
|
}
|
|
24319
24692
|
if (shouldEmitComponentJson && !result.script?.trim()) emitScriptlessComponentJsFallbackIfMissing({
|
|
@@ -26099,7 +26472,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
26099
26472
|
const vueAppPath = await findVueEntry(appBasename);
|
|
26100
26473
|
let configFromVue;
|
|
26101
26474
|
if (!appConfigFile && vueAppPath) {
|
|
26102
|
-
const { extractConfigFromVue } = await import("./file-
|
|
26475
|
+
const { extractConfigFromVue } = await import("./file-8RU-zw8X.mjs");
|
|
26103
26476
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
26104
26477
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
26105
26478
|
}
|
|
@@ -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-CcEF8k1Z.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 { $n as WebPlatform, A as Ref, Bn as WeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as ResolveWeappViteTargetOptions, Hn as createWeappViteHostMeta, I as RolldownPluginOption, Jn as WeappVitePlatform, Kn as ResolvedWeappViteTarget, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteTargetKind, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Xn as WeappViteTargetDescriptor, Yn as WeappViteRuntime, Zn as WeappViteTargetInput, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as getSupportedWeappVitePlatforms, 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, nr as isWebPlatform, o as UserConfigFnObject, p as Sitemap, qn as WEB_PLATFORM_ALIASES, r as UserConfigFn, rr as resolveWeappViteTarget, s as UserConfigFnObjectPlain, t as UserConfig, tr as getSupportedWeappViteTargetDescriptors, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as WEAPP_VITE_HOST_NAME } from "./config-
|
|
1
|
+
import { $n as WebPlatform, A as Ref, Bn as WeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as ResolveWeappViteTargetOptions, Hn as createWeappViteHostMeta, I as RolldownPluginOption, Jn as WeappVitePlatform, Kn as ResolvedWeappViteTarget, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteTargetKind, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Xn as WeappViteTargetDescriptor, Yn as WeappViteRuntime, Zn as WeappViteTargetInput, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as getSupportedWeappVitePlatforms, 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, nr as isWebPlatform, o as UserConfigFnObject, p as Sitemap, qn as WEB_PLATFORM_ALIASES, r as UserConfigFn, rr as resolveWeappViteTarget, s as UserConfigFnObjectPlain, t as UserConfig, tr as getSupportedWeappViteTargetDescriptors, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as WEAPP_VITE_HOST_NAME } from "./config-DwMzkHsB.mjs";
|
|
2
2
|
import { a as LayoutHostContext, c as LayoutHostResolver, d as unregisterLayoutHosts, f as waitForLayoutHost, i as LayoutHostBridge, l as registerLayoutHosts, m as createWevuComponent, n as defineProps, o as LayoutHostEntry, p as WevuComponentOptions, r as setPageLayout, s as LayoutHostResolveOptions, t as defineEmits, u as resolveLayoutHost } from "./runtime-xQwLUxkz.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/createContext.d.ts
|
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-DooWF5Wk.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/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-DwMzkHsB.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as WeappMcpConfig } from "./config-
|
|
1
|
+
import { Et as WeappMcpConfig } from "./config-DwMzkHsB.mjs";
|
|
2
2
|
import { CreateServerOptions, DEFAULT_MCP_ENDPOINT, DEFAULT_MCP_HOST, DEFAULT_MCP_PORT, DEFAULT_RUNTIME_REST_ENDPOINT, 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-Bmclyjw8.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-C7fCmf92.mjs";
|
|
3
|
-
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateTemplateFileSource, A as Ref, An as WeappLibFileName, At as WeappRouteRules, B as BindingErrorLike, Bn as WeappViteHostMeta, Bt as BuildNpmPackageMeta, Cn as SubPackageStyleConfigObject, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as WeappLibConfig, Dt as WeappNpmConfig, E as InlineConfig, En as WeappLibComponentJson, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappManagedServerTsconfigConfig, Ft as WeappWevuConfig, G as EntryJsonFragment, Gt as GenerateExtensionsOptions, H as BaseEntry, Ht as CopyGlobs, I as RolldownPluginOption, In as WeappManagedSharedTsconfigConfig, It as WeappWorkerConfig, J as ScanComponentItem, Jt as GenerateOptions, K as PageEntry, Kt as GenerateFileType, L as RolldownWatchOptions, Ln as WeappManagedTypeScriptConfig, Lt as Alias, M as RolldownBuild, Mn as WeappLibVueTscOptions, Mt as WeappVueConfig, N as RolldownOptions, Nn as WeappManagedAppTsconfigConfig, Nt as WeappVueTemplateConfig, O as Plugin, On as WeappLibDtsOptions, Ot as WeappRequestRuntimeConfig, P as RolldownOutput, Pn as WeappManagedNodeTsconfigConfig, Pt as WeappWebRuntimeConfig, Q as UserConfig, Qt as GenerateTemplateFactory, R as RolldownWatcher, Rn as WeappWebConfig, Rt as AliasOptions, Sn as SubPackageStyleConfigEntry, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackageStyleScope, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as CopyOptions, V as AppEntry, Vt as ChunksConfig, W as Entry, Wt as GenerateDirsOptions, X as ProjectConfig, Xt as GenerateTemplateContext, Y as WxmlDep, Yn as WeappViteRuntime, Yt as GenerateTemplate, Z as SubPackageMetaValue, Zt as GenerateTemplateEntry, _n as SharedChunkDynamicImports, _t as WeappAutoRoutesIncludePattern, an as JsonMergeContext, at as WeappViteConfig, b as ChangeEvent, bn as SharedChunkStrategy, bt as WeappHmrConfig, cn as JsonMergeStrategy, ct as EnhanceOptions, dn as NpmDependencyPattern, dt as MultiPlatformConfig, en as GenerateTemplateInlineSource, et as WeappAnalyzeConfig, fn as NpmMainPackageConfig, ft as ScanWxmlOptions, gn as ResolvedAlias, gt as WeappAutoRoutesInclude, hn as NpmSubPackageConfig, ht as WeappAutoRoutesConfig, in as JsonConfig, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibInternalDtsOptions, jt as WeappSubPackageConfig, k as PluginOption, kn as WeappLibEntryContext, kt as WeappRouteRule, ln as MpPlatform, lt as EnhanceWxmlOptions, mn as NpmStrategy, mt as WeappAppPreludeMode, nn as GenerateTemplatesConfig, nt as WeappDebugConfig, on as JsonMergeFunction, ot as AutoImportComponents, pn as NpmPluginPackageConfig, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as GenerateFilenamesOptions, rn as JsFormat, rt as WeappForwardConsoleConfig, sn as JsonMergeStage, st as AutoImportComponentsOption, tn as GenerateTemplateScope, tt as WeappAnalyzeHistoryConfig, un as NpmBuildOptions, ut as HandleWxmlOptions, vn as SharedChunkMode, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SubPackageStyleEntry, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SubPackage, xt as WeappInjectRequestGlobalsConfig, yn as SharedChunkOverride, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zt as AlipayNpmMode } from "./config-
|
|
3
|
+
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateTemplateFileSource, A as Ref, An as WeappLibFileName, At as WeappRouteRules, B as BindingErrorLike, Bn as WeappViteHostMeta, Bt as BuildNpmPackageMeta, Cn as SubPackageStyleConfigObject, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as WeappLibConfig, Dt as WeappNpmConfig, E as InlineConfig, En as WeappLibComponentJson, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappManagedServerTsconfigConfig, Ft as WeappWevuConfig, G as EntryJsonFragment, Gt as GenerateExtensionsOptions, H as BaseEntry, Ht as CopyGlobs, I as RolldownPluginOption, In as WeappManagedSharedTsconfigConfig, It as WeappWorkerConfig, J as ScanComponentItem, Jt as GenerateOptions, K as PageEntry, Kt as GenerateFileType, L as RolldownWatchOptions, Ln as WeappManagedTypeScriptConfig, Lt as Alias, M as RolldownBuild, Mn as WeappLibVueTscOptions, Mt as WeappVueConfig, N as RolldownOptions, Nn as WeappManagedAppTsconfigConfig, Nt as WeappVueTemplateConfig, O as Plugin, On as WeappLibDtsOptions, Ot as WeappRequestRuntimeConfig, P as RolldownOutput, Pn as WeappManagedNodeTsconfigConfig, Pt as WeappWebRuntimeConfig, Q as UserConfig, Qt as GenerateTemplateFactory, R as RolldownWatcher, Rn as WeappWebConfig, Rt as AliasOptions, Sn as SubPackageStyleConfigEntry, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackageStyleScope, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as CopyOptions, V as AppEntry, Vt as ChunksConfig, W as Entry, Wt as GenerateDirsOptions, X as ProjectConfig, Xt as GenerateTemplateContext, Y as WxmlDep, Yn as WeappViteRuntime, Yt as GenerateTemplate, Z as SubPackageMetaValue, Zt as GenerateTemplateEntry, _n as SharedChunkDynamicImports, _t as WeappAutoRoutesIncludePattern, an as JsonMergeContext, at as WeappViteConfig, b as ChangeEvent, bn as SharedChunkStrategy, bt as WeappHmrConfig, cn as JsonMergeStrategy, ct as EnhanceOptions, dn as NpmDependencyPattern, dt as MultiPlatformConfig, en as GenerateTemplateInlineSource, et as WeappAnalyzeConfig, fn as NpmMainPackageConfig, ft as ScanWxmlOptions, gn as ResolvedAlias, gt as WeappAutoRoutesInclude, hn as NpmSubPackageConfig, ht as WeappAutoRoutesConfig, in as JsonConfig, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibInternalDtsOptions, jt as WeappSubPackageConfig, k as PluginOption, kn as WeappLibEntryContext, kt as WeappRouteRule, ln as MpPlatform, lt as EnhanceWxmlOptions, mn as NpmStrategy, mt as WeappAppPreludeMode, nn as GenerateTemplatesConfig, nt as WeappDebugConfig, on as JsonMergeFunction, ot as AutoImportComponents, pn as NpmPluginPackageConfig, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as GenerateFilenamesOptions, rn as JsFormat, rt as WeappForwardConsoleConfig, sn as JsonMergeStage, st as AutoImportComponentsOption, tn as GenerateTemplateScope, tt as WeappAnalyzeHistoryConfig, un as NpmBuildOptions, ut as HandleWxmlOptions, vn as SharedChunkMode, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SubPackageStyleEntry, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SubPackage, xt as WeappInjectRequestGlobalsConfig, yn as SharedChunkOverride, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zt as AlipayNpmMode } from "./config-DwMzkHsB.mjs";
|
|
4
4
|
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, type InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, type MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, type Plugin, type PluginOption, ProjectConfig, type Ref, ResolvedAlias, type ResolvedConfig, type Resolver, type RolldownBuild, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatchOptions, type RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, 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, type WeappViteHostMeta, WeappVitePluginApi, type 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.17.
|
|
4
|
+
"version": "6.17.7",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -124,7 +124,7 @@
|
|
|
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.17.
|
|
127
|
+
"@weapp-vite/ast": "6.17.7",
|
|
128
128
|
"@weapp-vite/mcp": "1.4.6",
|
|
129
129
|
"@weapp-vite/miniprogram-automator": "1.2.5",
|
|
130
130
|
"@weapp-vite/volar": "2.1.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"rolldown-require": "2.0.19",
|
|
135
135
|
"vite-plugin-performance": "2.0.1",
|
|
136
136
|
"weapp-ide-cli": "5.4.10",
|
|
137
|
-
"wevu": "6.17.
|
|
137
|
+
"wevu": "6.17.7"
|
|
138
138
|
},
|
|
139
139
|
"publishConfig": {
|
|
140
140
|
"access": "public",
|
package/dist/file-CqYuBh-m.mjs
DELETED