Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

import .png not working #214

Open
samuelrego opened this issue Oct 21, 2018 · 0 comments
Open

import .png not working #214

samuelrego opened this issue Oct 21, 2018 · 0 comments

Comments

@samuelrego
Copy link

if i set module as commonjs in tsconfig file, i am not able render image. but it works fine if i set module as esnext. but i want it as commonjs. please let me know the way.

example:

 import logo from './logo.png'

// inside render method (ouput is undefined)
<img src={logo}/>

tsconfig:
"module": "commonjs",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant