@uipkge/nuxt 0.1.18 → 0.1.19

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "0.1.18",
7
+ "version": "0.1.19",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "unknown"
@@ -1,8 +1,8 @@
1
- import { useAsyncData, useRuntimeConfig } from "#app";
1
+ import { useLazyAsyncData, useRuntimeConfig } from "#app";
2
2
  import { computed } from "vue";
3
3
  export function useI18nowLocales() {
4
4
  const { projectId, cdnUrl } = useRuntimeConfig().public.i18now;
5
- const { data, pending, error, refresh } = useAsyncData(
5
+ const { data, pending, error, refresh } = useLazyAsyncData(
6
6
  "i18now-locales",
7
7
  async () => {
8
8
  if (!projectId) return [];
@@ -13,7 +13,7 @@ export function useI18nowLocales() {
13
13
  if (!Array.isArray(data2)) return [];
14
14
  return data2;
15
15
  },
16
- { default: () => [] }
16
+ { default: () => [], server: false }
17
17
  );
18
18
  const locales = computed(() => data.value ?? []);
19
19
  const sourceLocale = computed(() => data.value?.find((l) => l.isSource) ?? null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipkge/nuxt",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {