valaxy 0.14.8 → 0.14.10

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/client/main.ts CHANGED
@@ -13,7 +13,7 @@ import setupMain from './setup/main'
13
13
  const routes = setupLayouts(__DEV__
14
14
  ? generatedRoutes
15
15
  : generatedRoutes.filter(i =>
16
- !i.meta?.frontmatter.draft && !i.meta?.frontmatter.hide,
16
+ i.meta && i.meta.frontmatter && !i.meta.frontmatter.draft && !i.meta.frontmatter.hide,
17
17
  ))
18
18
  /**
19
19
  * will generate `.html`, parsed as a downloadable file when use `vite-ssg` dirStyles: 'flat' & gh-pages
@@ -11,14 +11,12 @@ import { createI18n } from 'vue-i18n'
11
11
  import { useStorage } from '@vueuse/core'
12
12
 
13
13
  import type { Router } from 'vue-router'
14
- import type { PageDataPayload } from '../../types'
15
- import { initValaxyConfig, valaxyConfigSymbol } from '../config'
16
14
  import { ensureSuffix } from '@antfu/utils'
17
-
18
15
  import type { UserModule } from 'valaxy/client/types'
19
-
16
+ import type { PageDataPayload } from '../../types'
17
+ import { initValaxyConfig, valaxyConfigSymbol } from '../config'
20
18
  // @ts-expect-error virtual
21
- import messages from '/@valaxyjs/locales'
19
+ import valaxyMessages from '/@valaxyjs/locales'
22
20
 
23
21
  // Import i18n resources
24
22
  // https://vitejs.dev/guide/features.html#glob-import
@@ -54,7 +52,7 @@ export const install: UserModule = ({ app, router }) => {
54
52
  const i18n = createI18n({
55
53
  legacy: false,
56
54
  locale: locale.value,
57
- messages,
55
+ messages: valaxyMessages,
58
56
  })
59
57
  app.use(i18n)
60
58