vite-plugin-svgr
vite-plugin-svgr copied to clipboard
[Help] Issue pulling in svgr types.
I recently updated to module version 2.2.1
and noticed that I now have a hard-to-figure-out error in my tsconfig.json in relation to this plugin.
Interestingly, this is fine in my vite.config.ts
. Is it expected to include tsconfig.json in it's own includes?
tsconfig.json
Cannot find type definition file for 'vite-plugin-svgr/client'.
The file is in the program because:
Entry point of type library 'vite-plugin-svgr/client' specified in compilerOptions
at
{
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"types": ["vite/client", "@types/vite-plugin-svgr/client", "@types/react", "jest"],
...
}
"files": [ // is it expected to include tsconfig.json here?
"vite.config.ts",
"public/source-env.js",
],
"include": [
"src",
"env/*.js",
"src/**/*.test.ts",
]
}
package.json
"devDependencies": {
"vite-plugin-svgr": "^2.2.1",
...
}
@mikeymop
Is this resolved?
Seems like changing @types/vite-plugin-svgr/client
-> vite-plugin-svgr/client
in compilerOptions.types
might help.