Skip to content

Commit

Permalink
feat(unplugin): add astro types
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Feb 27, 2024
1 parent bcd3544 commit 194a08f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@unplugin-analytics/vite-demo",
"name": "@unplugin-analytics/astro-demo",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions packages/unplugin-analytics/src/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { generate } from '@unplugin-analytics/core';

import type { Options } from './plugin';

import './env.d';

export default (options: Options = {}) => ({
name: 'unplugin-analytics',
hooks: {
Expand Down
3 changes: 3 additions & 0 deletions packages/unplugin-analytics/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module '~analytics/component.astro' {
export default function Analytics(): any;
}

0 comments on commit 194a08f

Please sign in to comment.