svelte-typescript-parcel
svelte-typescript-parcel copied to clipboard
Image paths in CSS not transformed during build
Image paths in CSS in .svelte files aren't properly transformed durings builds with this template.
To reproduce:
- create folder
src/images - create file
src/images/test.png - add
background: url(./images/test.png);toh1insrc/index.svelte
Expected result:
- image should be copied to
distfolder and have a hash in the filename - image path inside the generated bundle should point to the file inside the
distfolder h1on the generated page shows the CSS background image
Actual result:
- image is copied to
dist, where the filename is extended with a hash :heavy_check_mark: - image path inside the bundle is still
images/test.png:x: - CSS background image on
h1is missing :x:
PS: I just noticed that there is in fact a transformed version of the path inside the bundled application, but apparently it gets overwritten by a copy of the original source code which gets inlined. Any ideas?

See https://github.com/DeMoorJasper/parcel-plugin-svelte/issues/138
I'll see what I can do.. seems like it indeed is a problem with parcel and parcel-plugin-svelte