BUG TS: mkcert() plugin type mismatch
pwoloszun opened this issue ยท 4 comments
pwoloszun commented
in package.json:
"typescript": "~4.8.3",
"vite": "~3.1.3",
"vite-plugin-mkcert": "~1.9.0",
in vite.config.ts:
import mkcert from 'vite-plugin-mkcert';
export default defineConfig({
plugins: [
mkcert()
]
});
throws TS error:
error TS2322: Type 'Plugin_2' is not assignable to type 'PluginOption'.
liuweiGL commented
Try reload your vscode
pwoloszun commented
Try reload your vscode
Does not help.
What is more it throws an error when I build my project.
error TS2322: Type 'Plugin_2' is not assignable to type 'PluginOption'.
pwoloszun commented
Ofc an ugly
as any
fixes it BUT it can be easily fixed in a good way. Just replace custom 'Plugin_2' with vites 'PluginOption' type.
Ugly fix:
import mkcert from 'vite-plugin-mkcert';
export default defineConfig({
plugins: [
mkcert() as any // ugly fix
]
});
liuweiGL commented
๐ This issue has been resolved in version 1.10.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐