Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using vite and vscode - warning #17

Open
gillesgros opened this issue Mar 29, 2023 · 0 comments
Open

Using vite and vscode - warning #17

gillesgros opened this issue Mar 29, 2023 · 0 comments

Comments

@gillesgros
Copy link

Using rollup-plugin-delete with vite in vscode i have the following complaint:

Argument of type '({ mode }: ConfigEnv) => { plugins: (Plugin_2 | Plugin_2[] | Plugin | null)[]; optimizeDeps: { include: string[]; }; resolve: { extensions: string[]; alias: { 'vue-i18n': string; vue: string; }; }; build: { ...; }; server: { ...; }; }' is not assignable to parameter of type 'UserConfigExport'.
Type '({ mode }: ConfigEnv) => { plugins: (Plugin_2 | Plugin_2[] | Plugin | null)[]; optimizeDeps: { include: string[]; }; resolve: { extensions: string[]; alias: { 'vue-i18n': string; vue: string; }; }; build: { ...; }; server: { ...; }; }' is not assignable to type 'UserConfigFn'.
Type '{ plugins: (Plugin_2 | Plugin_2[] | Plugin | null)[]; optimizeDeps: { include: string[]; }; resolve: { extensions: string[]; alias: { 'vue-i18n': string; vue: string; }; }; build: { ...; }; server: { ...; }; }' is not assignable to type 'UserConfig | Promise'.
Type '{ plugins: (Plugin_2 | Plugin_2[] | Plugin | null)[]; optimizeDeps: { include: string[]; }; resolve: { extensions: string[]; alias: { 'vue-i18n': string; vue: string; }; }; build: { ...; }; server: { ...; }; }' is not assignable to type 'UserConfig'.
Types of property 'plugins' are incompatible.
Type '(Plugin_2 | Plugin_2[] | Plugin | null)[]' is not assignable to type 'PluginOption[]'.
Type 'Plugin_2 | Plugin_2[] | Plugin | null' is not assignable to type 'PluginOption'.
Type 'Plugin' is not assignable to type 'PluginOption'.
Type 'Plugin' is not assignable to type 'Plugin_2'.
Types of property 'resolveId' are incompatible.
Type 'ObjectHook<(this: PluginContext, source: string, importer: string | undefined, options: { custom?: CustomPluginOptions | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>, {}> | undefined' is not assignable to type 'ObjectHook<(this: PluginContext, source: string, importer: string | undefined, options: { assertions: Record<string, string>; custom?: CustomPluginOptions | undefined; ssr?: boolean | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>, {}> | undefined'.
Type '(this: PluginContext, source: string, importer: string | undefined, options: { custom?: CustomPluginOptions | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>' is not assignable to type 'ObjectHook<(this: PluginContext, source: string, importer: string | undefined, options: { assertions: Record<string, string>; custom?: CustomPluginOptions | undefined; ssr?: boolean | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>, {}> | undefined'.
Type '(this: PluginContext, source: string, importer: string | undefined, options: { custom?: CustomPluginOptions | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>' is not assignable to type '(this: PluginContext, source: string, importer: string | undefined, options: { assertions: Record<string, string>; custom?: CustomPluginOptions | undefined; ssr?: boolean | undefined; isEntry: boolean; }) => ResolveIdResult | Promise<...>'.
The 'this' types of each signature are incompatible.
Type 'PluginContext' is missing the following properties from type 'PluginContext': emitAsset, emitChunk, getAssetFileName, getChunkFileName, and 2 more.

When I remove the usage of rollup-plugin-delete the message is gone

Attached a vite.config.ts file
vite.config.ts.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant