diff --git a/package.json b/package.json index f54853f..1996ccb 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "playground:build": "nr -C playground build" }, "peerDependencies": { + "@iconify/json": "^2.2.256", "@unocss/reset": "^0.63.2", "astro": "^4.15.0", "unocss": "^0.63.2" diff --git a/playground/astro.config.mjs b/playground/astro.config.mjs index 8f241c4..432cc6c 100644 --- a/playground/astro.config.mjs +++ b/playground/astro.config.mjs @@ -2,13 +2,13 @@ import mdx from '@astrojs/mdx' // @ts-check import { defineConfig } from 'astro/config' -import AntfuMeIntegration from 'astro-vitesse' +import vitesse from 'astro-vitesse' import UnoCSS from 'unocss/astro' // https://astro.build/config export default defineConfig({ - integrations: [mdx(), AntfuMeIntegration(), UnoCSS()], + integrations: [mdx(), UnoCSS(), vitesse()], vite: { ssr: { external: ['astro-vitesse'], diff --git a/playground/package.json b/playground/package.json index 833a25f..7e538a5 100644 --- a/playground/package.json +++ b/playground/package.json @@ -15,10 +15,11 @@ "@astrojs/mdx": "^3.1.7", "astro": "^4.15.11", "astro-vitesse": "workspace:*", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "unocss": "^0.63.3" }, "devDependencies": { "@iconify/json": "^2.2.256", - "@unocss/reset": "^0.63.2" + "@unocss/reset": "^0.63.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21f3ce1..e922a55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,12 +96,15 @@ importers: typescript: specifier: ^5.6.2 version: 5.6.2 + unocss: + specifier: ^0.63.3 + version: 0.63.3(postcss@8.4.47)(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4)) devDependencies: '@iconify/json': specifier: ^2.2.256 version: 2.2.256 '@unocss/reset': - specifier: ^0.63.2 + specifier: ^0.63.3 version: 0.63.3 packages: @@ -5343,6 +5346,17 @@ snapshots: - rollup - supports-color + '@unocss/astro@0.63.3(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4))': + dependencies: + '@unocss/core': 0.63.3 + '@unocss/reset': 0.63.3 + '@unocss/vite': 0.63.3(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4)) + optionalDependencies: + vite: 5.4.8(@types/node@22.7.4) + transitivePeerDependencies: + - rollup + - supports-color + '@unocss/cli@0.63.3(rollup@3.29.5)': dependencies: '@ampproject/remapping': 2.3.0 @@ -5362,6 +5376,25 @@ snapshots: - rollup - supports-color + '@unocss/cli@0.63.3(rollup@4.24.0)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + '@unocss/config': 0.63.3 + '@unocss/core': 0.63.3 + '@unocss/preset-uno': 0.63.3 + cac: 6.7.14 + chokidar: 3.6.0 + colorette: 2.0.20 + consola: 3.2.3 + magic-string: 0.30.11 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + tinyglobby: 0.2.9 + transitivePeerDependencies: + - rollup + - supports-color + '@unocss/config@0.63.3': dependencies: '@unocss/core': 0.63.3 @@ -5490,6 +5523,21 @@ snapshots: - rollup - supports-color + '@unocss/vite@0.63.3(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + '@unocss/config': 0.63.3 + '@unocss/core': 0.63.3 + '@unocss/inspector': 0.63.3 + chokidar: 3.6.0 + magic-string: 0.30.11 + tinyglobby: 0.2.9 + vite: 5.4.8(@types/node@22.7.4) + transitivePeerDependencies: + - rollup + - supports-color + '@vitest/eslint-plugin@1.1.6(@typescript-eslint/utils@8.8.0(eslint@9.11.1(jiti@2.2.1))(typescript@5.5.4))(eslint@9.11.1(jiti@2.2.1))(typescript@5.5.4)(vitest@2.1.2(@types/node@22.7.4))': dependencies: '@typescript-eslint/utils': 8.8.0(eslint@9.11.1(jiti@2.2.1))(typescript@5.5.4) @@ -8868,6 +8916,32 @@ snapshots: - rollup - supports-color + unocss@0.63.3(postcss@8.4.47)(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4)): + dependencies: + '@unocss/astro': 0.63.3(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4)) + '@unocss/cli': 0.63.3(rollup@4.24.0) + '@unocss/core': 0.63.3 + '@unocss/postcss': 0.63.3(postcss@8.4.47) + '@unocss/preset-attributify': 0.63.3 + '@unocss/preset-icons': 0.63.3 + '@unocss/preset-mini': 0.63.3 + '@unocss/preset-tagify': 0.63.3 + '@unocss/preset-typography': 0.63.3 + '@unocss/preset-uno': 0.63.3 + '@unocss/preset-web-fonts': 0.63.3 + '@unocss/preset-wind': 0.63.3 + '@unocss/transformer-attributify-jsx': 0.63.3 + '@unocss/transformer-compile-class': 0.63.3 + '@unocss/transformer-directives': 0.63.3 + '@unocss/transformer-variant-group': 0.63.3 + '@unocss/vite': 0.63.3(rollup@4.24.0)(vite@5.4.8(@types/node@22.7.4)) + optionalDependencies: + vite: 5.4.8(@types/node@22.7.4) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + untyped@1.5.0: dependencies: '@babel/core': 7.25.7 diff --git a/src/index.ts b/src/index.ts index 0a312ed..50dda8a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ export default function AntfuMeIntegration(): AstroIntegration { hooks: { 'astro:config:setup': async ({ injectRoute, updateConfig }) => { injectRoute({ - pattern: '/[...page]', + pattern: '[...page]', entrypoint: 'astro-vitesse/routes/[...page].astro', })