diff --git a/examples/docs/src/components/Footer/AvatarList.astro b/examples/docs/src/components/Footer/AvatarList.astro index b75589f5a..03b1e5bd7 100644 --- a/examples/docs/src/components/Footer/AvatarList.astro +++ b/examples/docs/src/components/Footer/AvatarList.astro @@ -17,11 +17,9 @@ type Commit = { async function getCommits(url: string) { try { - const token = import.meta.env.SNOWPACK_PUBLIC_GITHUB_TOKEN ?? 'hello'; + const token = import.meta.env.GITHUB_TOKEN ?? 'hello'; if (!token) { - throw new Error( - 'Cannot find "SNOWPACK_PUBLIC_GITHUB_TOKEN" used for escaping rate-limiting.' - ); + throw new Error('Cannot find "GITHUB_TOKEN" used for escaping rate-limiting.'); } const auth = `Basic ${Buffer.from(token, 'binary').toString('base64')}`; diff --git a/examples/docs/src/env.d.ts b/examples/docs/src/env.d.ts index f964fe0cf..8e48612f5 100644 --- a/examples/docs/src/env.d.ts +++ b/examples/docs/src/env.d.ts @@ -1 +1,9 @@ /// + +interface ImportMetaEnv { + readonly GITHUB_TOKEN: string | undefined; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +}