It's a useful feature in create-react-app
that I can use svg as a react component:
import { ReactComponent as NotFound } from '@/assets/images/not-found.svg'
function Error() {
return (
<div>
<NotFound className="logo" />
</div>
)
}
export default Error
I want this feature in my new vite project, but I didn't find any tutorials or blog posts about this.