-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
Task description
In #3243, I added a feature to import images (,png) and videos (.mp4) in @liam-hq/erd-core. Since the package is referred by bothe Next.js and Vite CLI apps, it needs to support the both framework/build tool.
Background
Now it works with a simple condition check logic. But I hope we could fine a better way to resolve this.
Lines 27 to 28 in 38c6d62
const getImageSrc = (imageSrc: string | StaticImageData) => | |
typeof imageSrc === 'string' ? imageSrc : imageSrc.src |
I think the approach we should take will also depend on how images will be used in the @liam-hq/erd-core and the other packages in the future. Before discussing the implementation, I’d like to first consider what kinds of use cases are likely to arise.
TODO (Optional)
- [ ]
- [ ]
- [ ]
Additional notes (Optional)
Metadata
Metadata
Assignees
Labels
No labels