Skip to content

Commit dd80288

Browse files
authored
fix(vitest): Add import-meta.d.ts (#4571)
1 parent ed50a94 commit dd80288

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/vitest/import-meta.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="./importMeta.d.ts" />
2+
3+
// https://github.com/microsoft/TypeScript/issues/45096
4+
// TypeScript has a bug that makes <reference types="vite/types/importMeta" />
5+
// not possible in userland. This file provides a workaround for now.

packages/vitest/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
"./importMeta": {
4242
"types": "./importMeta.d.ts"
4343
},
44+
"./import-meta": {
45+
"types": "./import-meta.d.ts"
46+
},
4447
"./node": {
4548
"types": "./dist/node.d.ts",
4649
"default": "./dist/node.js"

0 commit comments

Comments
 (0)