diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..fc58645
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+node_modules
+dist
+*.snap
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..116d16a
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1,2 @@
+ignore-workspace-root-check=true
+shamefully-hoist=true
diff --git a/example/main.ts b/example/main.ts
deleted file mode 100644
index f13a8ab..0000000
--- a/example/main.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import 'virtual:fonts.css'
-import './style.css'
diff --git a/examples/astro/astro.config.mjs b/examples/astro/astro.config.mjs
new file mode 100644
index 0000000..4c88c7f
--- /dev/null
+++ b/examples/astro/astro.config.mjs
@@ -0,0 +1,19 @@
+import { defineConfig } from 'astro/config'
+import Unfonts from 'unplugin-fonts/astro'
+
+export default defineConfig({
+ integrations: [
+ Unfonts({
+ google: {
+ families: ['Crimson Pro', 'Open Sans', 'Material+Icons'],
+ },
+
+ custom: {
+ display: 'swap',
+ families: {
+ 'Dancing Script': './public/assets/fonts/DancingScript*',
+ },
+ },
+ })
+ ],
+})
\ No newline at end of file
diff --git a/examples/astro/package.json b/examples/astro/package.json
new file mode 100644
index 0000000..e5db9e0
--- /dev/null
+++ b/examples/astro/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "astro-test",
+ "private": true,
+ "scripts": {
+ "dev": "astro dev",
+ "start": "astro dev",
+ "build": "astro build",
+ "preview": "astro preview",
+ "astro": "astro"
+ },
+ "devDependencies": {
+ "astro": "^2.1.3",
+ "unplugin-fonts": "workspace:*"
+ }
+}
diff --git a/example/assets/fonts/DancingScript-Bold.ttf b/examples/astro/public/assets/fonts/DancingScript-Bold.ttf
similarity index 100%
rename from example/assets/fonts/DancingScript-Bold.ttf
rename to examples/astro/public/assets/fonts/DancingScript-Bold.ttf
diff --git a/example/assets/fonts/DancingScript-Medium.ttf b/examples/astro/public/assets/fonts/DancingScript-Medium.ttf
similarity index 100%
rename from example/assets/fonts/DancingScript-Medium.ttf
rename to examples/astro/public/assets/fonts/DancingScript-Medium.ttf
diff --git a/example/assets/fonts/DancingScript-Regular.ttf b/examples/astro/public/assets/fonts/DancingScript-Regular.ttf
similarity index 100%
rename from example/assets/fonts/DancingScript-Regular.ttf
rename to examples/astro/public/assets/fonts/DancingScript-Regular.ttf
diff --git a/example/assets/fonts/DancingScript-SemiBold.ttf b/examples/astro/public/assets/fonts/DancingScript-SemiBold.ttf
similarity index 100%
rename from example/assets/fonts/DancingScript-SemiBold.ttf
rename to examples/astro/public/assets/fonts/DancingScript-SemiBold.ttf
diff --git a/examples/astro/src/env.d.ts b/examples/astro/src/env.d.ts
new file mode 100644
index 0000000..8c34fb4
--- /dev/null
+++ b/examples/astro/src/env.d.ts
@@ -0,0 +1 @@
+///
\ No newline at end of file
diff --git a/examples/astro/src/pages/index.astro b/examples/astro/src/pages/index.astro
new file mode 100644
index 0000000..665ef72
--- /dev/null
+++ b/examples/astro/src/pages/index.astro
@@ -0,0 +1,30 @@
+---
+// import "/@unplugin-fonts/fonts.css";
+---
+
+
+
+
\ No newline at end of file
diff --git a/examples/astro/tsconfig.json b/examples/astro/tsconfig.json
new file mode 100644
index 0000000..f75620b
--- /dev/null
+++ b/examples/astro/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "jsx": "preserve",
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Astro will directly run your TypeScript code, no transpilation needed.
+ "noEmit": true
+ }
+}
diff --git a/examples/nuxt/.gitignore b/examples/nuxt/.gitignore
new file mode 100644
index 0000000..22fe582
--- /dev/null
+++ b/examples/nuxt/.gitignore
@@ -0,0 +1,9 @@
+node_modules
+*.log*
+.nuxt
+.nitro
+.cache
+.output
+.env
+dist
+.DS_Store
\ No newline at end of file
diff --git a/examples/nuxt/app.vue b/examples/nuxt/app.vue
new file mode 100644
index 0000000..7850806
--- /dev/null
+++ b/examples/nuxt/app.vue
@@ -0,0 +1,26 @@
+
+ Hello Nuxt!
+ I'm using a local font !
+ Documentation
+
+
+
\ No newline at end of file
diff --git a/examples/nuxt/assets/fonts/DancingScript-Bold.ttf b/examples/nuxt/assets/fonts/DancingScript-Bold.ttf
new file mode 100644
index 0000000..49d8f3f
Binary files /dev/null and b/examples/nuxt/assets/fonts/DancingScript-Bold.ttf differ
diff --git a/examples/nuxt/assets/fonts/DancingScript-Medium.ttf b/examples/nuxt/assets/fonts/DancingScript-Medium.ttf
new file mode 100644
index 0000000..fdfd690
Binary files /dev/null and b/examples/nuxt/assets/fonts/DancingScript-Medium.ttf differ
diff --git a/examples/nuxt/assets/fonts/DancingScript-Regular.ttf b/examples/nuxt/assets/fonts/DancingScript-Regular.ttf
new file mode 100644
index 0000000..b215107
Binary files /dev/null and b/examples/nuxt/assets/fonts/DancingScript-Regular.ttf differ
diff --git a/examples/nuxt/assets/fonts/DancingScript-SemiBold.ttf b/examples/nuxt/assets/fonts/DancingScript-SemiBold.ttf
new file mode 100644
index 0000000..ce588e1
Binary files /dev/null and b/examples/nuxt/assets/fonts/DancingScript-SemiBold.ttf differ
diff --git a/examples/nuxt/nuxt.config.ts b/examples/nuxt/nuxt.config.ts
new file mode 100644
index 0000000..30dcb7d
--- /dev/null
+++ b/examples/nuxt/nuxt.config.ts
@@ -0,0 +1,19 @@
+import Unfonts from '../../src/nuxt'
+
+export default defineNuxtConfig({
+ modules: [
+ Unfonts,
+ ],
+ fonts: {
+ google: {
+ families: ['Crimson Pro', 'Open Sans', 'Material+Icons'],
+ },
+
+ custom: {
+ display: 'swap',
+ families: {
+ 'Dancing Script': './assets/fonts/DancingScript*',
+ },
+ },
+ }
+})
diff --git a/examples/nuxt/package.json b/examples/nuxt/package.json
new file mode 100644
index 0000000..8a8f0a6
--- /dev/null
+++ b/examples/nuxt/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "nuxt-test",
+ "private": true,
+ "scripts": {
+ "dev": "nuxt dev",
+ "build": "nuxt build",
+ "preview": "nuxt preview"
+ },
+ "devDependencies": {
+ "nuxt": "^3.3.1",
+ "unplugin-fonts": "workspace:*"
+ }
+}
diff --git a/examples/nuxt/tsconfig.json b/examples/nuxt/tsconfig.json
new file mode 100644
index 0000000..28b66c5
--- /dev/null
+++ b/examples/nuxt/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ // https://nuxt.com/docs/guide/concepts/typescript
+ "extends": "./.nuxt/tsconfig.json"
+}
\ No newline at end of file
diff --git a/examples/vite/assets/fonts/DancingScript-Bold.ttf b/examples/vite/assets/fonts/DancingScript-Bold.ttf
new file mode 100644
index 0000000..49d8f3f
Binary files /dev/null and b/examples/vite/assets/fonts/DancingScript-Bold.ttf differ
diff --git a/examples/vite/assets/fonts/DancingScript-Medium.ttf b/examples/vite/assets/fonts/DancingScript-Medium.ttf
new file mode 100644
index 0000000..fdfd690
Binary files /dev/null and b/examples/vite/assets/fonts/DancingScript-Medium.ttf differ
diff --git a/examples/vite/assets/fonts/DancingScript-Regular.ttf b/examples/vite/assets/fonts/DancingScript-Regular.ttf
new file mode 100644
index 0000000..b215107
Binary files /dev/null and b/examples/vite/assets/fonts/DancingScript-Regular.ttf differ
diff --git a/examples/vite/assets/fonts/DancingScript-SemiBold.ttf b/examples/vite/assets/fonts/DancingScript-SemiBold.ttf
new file mode 100644
index 0000000..ce588e1
Binary files /dev/null and b/examples/vite/assets/fonts/DancingScript-SemiBold.ttf differ
diff --git a/example/index.html b/examples/vite/index.html
similarity index 90%
rename from example/index.html
rename to examples/vite/index.html
index f96149a..99fb369 100644
--- a/example/index.html
+++ b/examples/vite/index.html
@@ -7,8 +7,8 @@
Hello Vite!
+ I'm using a local font !
Documentation
- I'm using a local font !