Member-only story
debugging parcel: no transfomers found for png file
Apr 24, 2021
Did you migrate from parcel v1 to v2?
If so, then there’s a breaking change in terms of specifying image paths.
In parcel v1, importing images using a relative path like this will work:
import sunriseIcon from '../assets/icons/sunrise.png'
However, that will not work in parcel v2. Instead, you need to specify the url
prefix and use an ‘absolute’ path like so:
import sunriseIcon from 'url:~/src/assets/icons/sunrise.png'
That should fix it.
Happy developing!