Skip to content

Commit eae29dd

Browse files
author
Рома Столбов
committed
Add compatibility with Nuxt 4
1 parent 259e449 commit eae29dd

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"name": "nuxt-font-loader",
3-
"version": "2.3.5",
4-
"description": "Simple, modern and lightweight font loader for Nuxt.",
5-
"author": "Ivo Dolenc",
2+
"name": "@stolbov.r/nuxt-font-loader",
3+
"version": "1.1.0",
4+
"description": "Fork of nuxt-font-loader with Nuxt 4 compatibility",
5+
"author": "Roma Stolbov",
66
"license": "MIT",
7-
"repository": "ivodolenc/nuxt-font-loader",
8-
"homepage": "https://github.com/ivodolenc/nuxt-font-loader",
9-
"funding": "https://github.com/sponsors/ivodolenc",
7+
"repository": "romastolbov/nuxt-font-loader",
8+
"homepage": "https://github.com/romastolbov/nuxt-font-loader",
109
"type": "module",
1110
"types": "./dist/types.d.ts",
1211
"exports": {
@@ -42,6 +41,7 @@
4241
"@hypernym/bundler": "^0.6.2",
4342
"@hypernym/eslint-config": "^2.0.3",
4443
"@hypernym/prettier-config": "^2.0.3",
44+
"@nuxt/schema": "^3.16.2",
4545
"@types/node": "^20.10.0",
4646
"eslint": "^8.54.0",
4747
"nuxt": "^3.8.2",

src/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineNuxtModule<ModuleOptions>({
5959
}
6060
}
6161

62-
head.style?.push({ children: styles })
62+
head.style?.push(styles)
6363
}
6464

6565
if (external) {
@@ -111,7 +111,7 @@ export default defineNuxtModule<ModuleOptions>({
111111
)
112112
}
113113

114-
if (styles) head.style?.push({ children: styles })
114+
if (styles) head.style?.push(styles)
115115
}
116116
},
117117
})

src/runtime/composables/use-external-font.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ export const useExternalFont = (external: ExternalOptions[]) => {
5454

5555
useHead({ link: links })
5656

57-
if (styles) return useHead({ style: [{ children: styles }] })
57+
if (styles) return useHead({ style: [styles] })
5858
}

src/runtime/composables/use-local-font.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ export const useLocalFont = (local: LocalOptions[]) => {
3131

3232
if (links.length) useHead({ link: links })
3333

34-
return useHead({ style: [{ children: styles }] })
34+
return useHead({ style: [styles] })
3535
}

0 commit comments

Comments
 (0)