diff --git a/.changeset/thirty-apples-shake.md b/.changeset/thirty-apples-shake.md new file mode 100644 index 00000000..eb5e9d1a --- /dev/null +++ b/.changeset/thirty-apples-shake.md @@ -0,0 +1,5 @@ +--- +'@prefresh/vite': patch +--- + +Fix type type resolution for `type: "module"` projects diff --git a/packages/vite/package.json b/packages/vite/package.json index 9f32fc97..1b969c7e 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -4,7 +4,10 @@ "main": "src/index.js", "types": "index.d.ts", "exports": { - ".": "./src/index.js", + ".": { + "types": "./index.d.ts", + "require": "./src/index.js" + }, "./package.json": "./package.json" }, "modes": {