nuxt-og-image 1.0.0-beta.11 → 1.0.0-beta.12

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
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "1.0.0-beta.11"
8
+ "version": "1.0.0-beta.12"
9
9
  }
package/dist/module.mjs CHANGED
@@ -186,7 +186,7 @@ const module = defineNuxtModule({
186
186
  async setup(config, nuxt) {
187
187
  const { resolve } = createResolver(import.meta.url);
188
188
  if (!config.fonts.length)
189
- config.fonts.push("Inter:400", "Inter:700");
189
+ config.fonts = ["Inter:400", "Inter:700"];
190
190
  const distResolve = (p) => {
191
191
  const cwd = resolve(".");
192
192
  if (cwd.endsWith("/dist"))
@@ -11,8 +11,9 @@ export async function loadFont(url, font) {
11
11
  const storageKey = `nuxt-og-image:font:${font}`;
12
12
  const hasStoredFont = await useStorage().hasItem(storageKey);
13
13
  if (!hasStoredFont) {
14
- const res = await fetch(fontUrl);
15
- data = await res.arrayBuffer();
14
+ data = await $fetch(fontUrl, {
15
+ responseType: "arrayBuffer"
16
+ });
16
17
  await useStorage().setItem(storageKey, data);
17
18
  } else {
18
19
  data = await useStorage().getItem(storageKey);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.11",
4
+ "version": "1.0.0-beta.12",
5
5
  "packageManager": "pnpm@7.8.0",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",