From 0efb6040dab3a95e3318bfd214da83035314fdc9 Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Sun, 24 Dec 2023 01:06:53 -0600 Subject: [PATCH] fix: Incorrect default export of Vite plugin types under TS's Node16 module resolution (#531) --- .changeset/fluffy-horses-crash.md | 5 +++++ packages/vite/index.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fluffy-horses-crash.md diff --git a/.changeset/fluffy-horses-crash.md b/.changeset/fluffy-horses-crash.md new file mode 100644 index 00000000..4467b087 --- /dev/null +++ b/.changeset/fluffy-horses-crash.md @@ -0,0 +1,5 @@ +--- +'@prefresh/vite': patch +--- + +Fix for incorrect default export of types under TS's Node16 module resolution diff --git a/packages/vite/index.d.ts b/packages/vite/index.d.ts index e2f0c0ac..671d8fa5 100644 --- a/packages/vite/index.d.ts +++ b/packages/vite/index.d.ts @@ -1,7 +1,7 @@ import { FilterPattern } from '@rollup/pluginutils'; import { Plugin } from 'vite'; -export interface Options { +interface Options { parserPlugins?: readonly string[]; include?: FilterPattern; exclude?: FilterPattern; @@ -9,4 +9,4 @@ export interface Options { declare const prefreshPlugin: (options?: Options) => Plugin; -export default prefreshPlugin; +export = prefreshPlugin;