Closed
Description
Simplest possible vite configuratin has TS error:
vite.config.ts:
export default defineConfig({
base: process.env.BASE_URL ?? '/',
build: {
sourcemap: true,
},
plugins: [
tailwindcss(),
]
}
Vite now uses PluginOption instead of Plugin, so maybe the plugin needs some update.
No overload matches this call.
The last overload gave the following error.
Type 'Plugin<any>[]' is not assignable to type 'PluginOption'.
Type 'Plugin<any>[]' is not assignable to type 'PluginOption[]'.
Type 'Plugin<any>' is not assignable to type 'PluginOption'.
Type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]_1/node_modules/vite/dist/node/index").Plugin<any>' is not assignable to type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/vite/dist/node/index").Plugin<any>'.
Types of property 'hotUpdate' are incompatible.
Type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/rollup/dist/rollup").ObjectHook<(this: HotUpdatePluginContext, options: import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]_1/node_modules/vite/dist/node/index").HotUpdateOptions) => void | ... 1 more ... | Pr...' is not assignable to type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/rollup/dist/rollup").ObjectHook<(this: HotUpdatePluginContext, options: import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/vite/dist/node/index").HotUpdateOptions) => void | ... 1 more ... | Prom...'.
Type '(this: HotUpdatePluginContext, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<void | EnvironmentModuleNode[]>' is not assignable to type 'ObjectHook<(this: HotUpdatePluginContext, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<void | EnvironmentModuleNode[]>> | undefined'.
Type '(this: HotUpdatePluginContext, options: import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]_1/node_modules/vite/dist/node/index").HotUpdateOptions) => void | ... 1 more ... | Promise<...>' is not assignable to type '(this: HotUpdatePluginContext, options: import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/vite/dist/node/index").HotUpdateOptions) => void | ... 1 more ... | Promise<...>'.
The 'this' types of each signature are incompatible.
Type 'HotUpdatePluginContext' is not assignable to type 'HotUpdatePluginContext'. Two different types with this name exist, but they are unrelated.
The types of 'environment.pluginContainer.environment' are incompatible between these types.
Type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]/node_modules/vite/dist/node/index").Environment' is not assignable to type 'import("/Users/kuchta/Projects/radixverse/node_modules/.deno/[email protected]_1/node_modules/vite/dist/node/index").Environment'.
Type 'DevEnvironment' is not assignable to type 'Environment'.