postcss / postcss-url

PostCSS plugin to rebase url(), inline or copy asset.
MIT License
377 stars 60 forks source link

Fix copy with no hash #146

Open johnagan opened 3 years ago

johnagan commented 3 years ago

I realize this repo isn't touched often, but I think it's a great plugin.

I came across an issue where if I used copy and { useHash: false } it wouldn't copy the file. Took me longer to diagnose than it did to fix.

Basically the existing code is referencing the full path to the existing file, unless it's replaced with a hashed filename. So I just replace the full path with the basename of the file.

martinapitakova commented 2 years ago
thiagomajesk commented 2 years ago

Hey, @johnagan same problem here! Since I don't think this PR will be merged anytime soon, what's the solution you are using in the meantime?