-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Latest version of Vite
v7 Accept Plugin only as PluginOption
Type
Version
v7
Reproduction
install [email protected], Apply Federation Configuration using defineConfig
function with typescript
Relevant log output
TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type
({ mode }: ConfigEnv) => {
server: {
port: number;
};
base: string;
plugins: (PluginOption[] | Plugin<any>[])[];
}
is not assignable to parameter of type UserConfigExport
Type
({ mode }: ConfigEnv) => {
server: {
port: number;
};
base: string;
plugins: (PluginOption[] | Plugin<any>[])[];
}
is not assignable to type UserConfigFnObject
Call signature return types
{
server: {
port: number;
};
base: string;
plugins: (PluginOption[] | Plugin<any>[])[];
}
and UserConfig are incompatible.
The types of plugins are incompatible between these types.
Type (PluginOption[] | Plugin<any>[])[] is not assignable to type PluginOption[]
Type PluginOption[] | 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 Plugin<any> is not assignable to type PluginOption
Type Plugin<any> is not assignable to type Plugin$1<any>
Types of property hotUpdate are incompatible.
Type 'ObjectHook<(this: HotUpdatePluginContext, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<void | EnvironmentModuleNode[]>> | undefined' is not assignable to type 'ObjectHook<(this: MinimalPluginContext & { environment: DevEnvironment; }, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<...>> | undefined'.
Type
(this: HotUpdatePluginContext, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<void | EnvironmentModuleNode[]>
is not assignable to type
ObjectHook<(this: MinimalPluginContext & {
environment: DevEnvironment;
}, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<...>> | undefined
Type
(this: HotUpdatePluginContext, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<void | EnvironmentModuleNode[]>
is not assignable to type
(this: MinimalPluginContext & {
environment: DevEnvironment;
}, options: HotUpdateOptions) => void | EnvironmentModuleNode[] | Promise<...>
Types of parameters options and options are incompatible.
Property 'environment' is missing in type 'import("projects/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/index").HotUpdateOptions' but required in type 'import("/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/index").HotUpdateOptions'.
Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
dmg-eggdmg-egg
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working