Open GimpMaster opened 2 years ago
It can be used in vite.config.ts and it should be working without any issues. But, support for TypeScript might be implemented if required in future versions.
It would be great to have the type definitions for this package. It would prevent VS Code from complaining.
The workaround for now is to declare the module ourselves:
declare module "vite-plugin-favicons-inject";
And include that file in the proper tsconfig.
No chance for types, I take it?
No chance for types, I take it?
If anyone is looking to add their own type definitions, in your global.d.ts
add
declare module 'vite-plugin-favicons-inject' {
import type { Plugin } from 'vite';
import type { FaviconOptions } from 'favicons';
export type VPFIPluginConfig = {
failGraciously?: boolean;
};
export default function vitePluginFaviconsInject(
source: string,
config?: FaviconOptions,
pluginConfig?: VPFIPluginConfig,
): Plugin;
}
Any chance you can generate typescript types so this can work with vite.config.ts files?