-
Notifications
You must be signed in to change notification settings - Fork 21
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
Typescript Error #48
Comments
also getting this error in a vanilla gatsby project |
Is it building? Is it an error or a hint? |
It builds fine. I've followed all the instructions to a T, For the import:
it just says:
with type defs file
and config:
|
Yeah, we don't generate types for the SVG. PRs welcome but no idea how you're even supposed to do that. Regardless, it's probably an upstream kind of thing. |
This is what worked for me:
|
Hi, thanks a lot for this plugin! I'm trying to use it with Typescript and have set up a custom typescript definition as described in the readme but I'm still getting hit with the error:
import Example from "../images/example.svg"
Cannot find module '../images/example.svg' or its corresponding type declarations.ts(2307)
My config files are:
I've checked the image is at the specified path and the SVG does load to the page successfully. Do you have any idea what might be causing this? Thanks very much for any help - I realise this isn't anything wrong with the plugin itself.
The text was updated successfully, but these errors were encountered: