Closed PeterPanZH closed 3 years ago
Do you have a solution?
https://github.com/pikapkg/snowpack/blob/master/snowpack/src/build/build-import-proxy.ts#L175 just copy this...
But I think snowpack should provide a interface to solve this problem.
Thanks for digging that up. I think I have an idea here that I'll try today.
Hey @jaredLunde, any update on this?
this issue also affects importing SVGs in CSS and css-in-js, for example:
SVG background file can't be accessed.
@mhsattarian not really my problem. Put in a PR if you figure it out.
Why was this closed? It's still an issue, no matter whether you want to deal with it or not. It's fine if you don't have time, but don't close it since that means that it's no longer an issue...someone might come along eventually and help fix it.
Cool
Your attitude is just terrible man, thank god the open source community is generally the opposite of you. Time to switch dependency, this one clearly has no future. Please scope your future npm packages under @douchebag/
to prevent cluttering the shared space.
Thanks for the feedback! Happy trails.
Consider we have flowing projext:
and we have this configration of snowpack:
now in application code:
bar
is expected to be the url ofdir2/bar.svg
but we get a 404 error becausebar.svg.proxy.js
was not generated.https://github.com/jaredLunde/snowpack-plugin-svgr/blob/master/src/index.ts#L41 here
return null
will cause snowpack ignore the svg file.