I am creating new project using create-react-library but when I tried to import image using import logo from './logo.png', the image does not show up in the example, but if I use import logo from 'logo.png' the image show up.
My question is this normally happen?
here is the folder structure of my project
code:
import React from 'react'
import styles from './styles.module.css'
import logo from './logo.png'
export const ExampleComponent = ({ text }) => {
return (
<div className={styles.test}>
{/* Example Component: {text} */}
<img src={logo} />
</div>
)
}
code:
import React from 'react'
import styles from './styles.module.css'
import logo from 'logo.png'
export const ExampleComponent = ({ text }) => {
return (
<div className={styles.test}>
{/* Example Component: {text} */}
<img src={logo} />
</div>
)
}