mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Remove vendored Vite importMeta.d.ts (#9149)
This commit is contained in:
parent
abf601233f
commit
0fe3a7ed5d
3 changed files with 6 additions and 31 deletions
5
.changeset/short-deers-whisper.md
Normal file
5
.changeset/short-deers-whisper.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Removes vendored Vite's `importMeta.d.ts` file in favour of Vite 5's new `vite/types/import-meta.d.ts` export
|
2
packages/astro/client.d.ts
vendored
2
packages/astro/client.d.ts
vendored
|
@ -1,4 +1,4 @@
|
|||
/// <reference path="./import-meta.d.ts" />
|
||||
/// <reference types="vite/types/import-meta.d.ts" />
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
declare namespace App {
|
||||
|
|
30
packages/astro/import-meta.d.ts
vendored
30
packages/astro/import-meta.d.ts
vendored
|
@ -1,30 +0,0 @@
|
|||
// File vendored from Vite itself, as a workaround to https://github.com/vitejs/vite/issues/13309 until Vite 5 comes out
|
||||
|
||||
// This file is an augmentation to the built-in ImportMeta interface
|
||||
// Thus cannot contain any top-level imports
|
||||
// <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
|
||||
|
||||
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
||||
|
||||
interface ImportMeta {
|
||||
url: string;
|
||||
|
||||
readonly hot?: import('vite/types/hot').ViteHotContext;
|
||||
|
||||
readonly env: ImportMetaEnv;
|
||||
|
||||
glob: import('vite/types/importGlob').ImportGlobFunction;
|
||||
/**
|
||||
* @deprecated Use `import.meta.glob('*', { eager: true })` instead
|
||||
*/
|
||||
globEager: import('vite/types/importGlob').ImportGlobEagerFunction;
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
[key: string]: any;
|
||||
BASE_URL: string;
|
||||
MODE: string;
|
||||
DEV: boolean;
|
||||
PROD: boolean;
|
||||
SSR: boolean;
|
||||
}
|
Loading…
Reference in a new issue