@ubean/build 0.3.1 → 0.3.2

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.
@@ -2,7 +2,7 @@ import { a as useVirtualRegistry } from "./virtual-registry-BWkaQHXN.js";
2
2
  import { a as createRoutingVirtualModule, i as createPagesVirtualModule, n as createLocalesVirtualModule, r as createMetaVirtualModule, t as createAppVirtualModule } from "./virtual-modules-D5WBA3u7.js";
3
3
  import { a as ssrSingletonProdOptimizeExclude, o as ssrSingletonProdSsr } from "./ssr-singleton-CEQi_H6-.js";
4
4
  import { n as localeVueParamFromI18n, r as serializeI18nConfig, t as ubeanPlugin } from "./vite-B3y8Qoan.js";
5
- import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-CeSUQZ1J.js";
5
+ import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-CL_djWZL.js";
6
6
  import { join, relative, resolve } from "pathe";
7
7
  import { resolveModules } from "@ubean/config";
8
8
  import { build } from "vite";
@@ -275,7 +275,14 @@ export async function createApp() {
275
275
  // When hydrating SSR content, must wait for router to be ready before mounting,
276
276
  // otherwise RouterView has no matched route and causes hydration mismatch.
277
277
  if (initialPage) {
278
- instance.router.isReady().then(mountApp);
278
+ instance.router
279
+ .isReady()
280
+ .then(async function () {
281
+ // SSR HTML 已包含布局链;客户端水合首帧必须同样就绪(布局是异步
282
+ // 解析的),否则首帧渲染裸 PageView 导致 hydration mismatch。
283
+ await instance.preloadLayouts();
284
+ })
285
+ .then(mountApp);
279
286
  } else {
280
287
  mountApp();
281
288
  }
package/dist/vue.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-CeSUQZ1J.js";
1
+ import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-CL_djWZL.js";
2
2
  export { VUE_PLUGIN_INCLUDE, createClientEntryVirtualModule, createServerEntryVirtualModule, createVueAppEntryVirtualModule, createVuePagesVirtualModule, ubeanVite as default, ubeanVite };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/build",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Vite plugins, production build, SSG prerender, type codegen, and Server Actions plugin for ubean",
5
5
  "files": [
6
6
  "dist"
@@ -41,17 +41,17 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@intlify/unplugin-vue-i18n": "11.2.5",
44
- "@ubean/client": "0.3.1",
45
- "@ubean/config": "0.3.1",
46
- "@ubean/i18n": "0.3.1",
47
- "@ubean/islands": "0.3.1",
48
- "@ubean/markdown": "0.3.1",
49
- "@ubean/pages": "0.3.1",
50
- "@ubean/preset": "0.3.1",
51
- "@ubean/routes": "0.3.1",
52
- "@ubean/scan": "0.3.1",
53
- "@ubean/shared": "0.3.1",
54
- "@ubean/vue": "0.3.1",
44
+ "@ubean/client": "0.3.2",
45
+ "@ubean/config": "0.3.2",
46
+ "@ubean/i18n": "0.3.2",
47
+ "@ubean/islands": "0.3.2",
48
+ "@ubean/markdown": "0.3.2",
49
+ "@ubean/pages": "0.3.2",
50
+ "@ubean/preset": "0.3.2",
51
+ "@ubean/routes": "0.3.2",
52
+ "@ubean/scan": "0.3.2",
53
+ "@ubean/shared": "0.3.2",
54
+ "@ubean/vue": "0.3.2",
55
55
  "@vitejs/plugin-vue": "^6.0.8",
56
56
  "openapi-typescript": "^7.13.0",
57
57
  "oxc-transform": "^0.147.0",