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

Add support for typescript #171

Closed
jonatanlins opened this issue Jul 15, 2020 · 1 comment
Closed

Add support for typescript #171

jonatanlins opened this issue Jul 15, 2020 · 1 comment

Comments

@jonatanlins
Copy link

Hi, I noticed that in .tsx files, images work nice when imported using the require syntax, but when you try to use the import syntax, an TypeScript error occurs.

// it works
const myImage = require("./image.png")

// it fails
import myImage from "./image.png"

This can be easily fixed by adding an index.d.ts file with some type definitions to the root folder.

I'm working on this just now :)

@jonatanlins
Copy link
Author

I just realized that this problem has been fixed in canary version, sorry for the inconvenience.

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