Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks CSS SVG backgrounds #13

Open
steve-king opened this issue Nov 21, 2018 · 3 comments
Open

Breaks CSS SVG backgrounds #13

steve-king opened this issue Nov 21, 2018 · 3 comments

Comments

@steve-king
Copy link

steve-king commented Nov 21, 2018

This plugin doesn't inline into CSS which is fine, however it breaks existing SVG backround images.

In my CSS output I'm now getting reference to a non-existent JS file like so:

background-image: url('dist/my-svg.1234.js')
@albinotonnina
Copy link
Owner

albinotonnina commented Nov 21, 2018

Thanks @steve-king,
I suspect this plugin needs a rewriting with the new versions of Parcel.
I expect the erratic behaviour.
What Parcel version are you using?

@steve-king
Copy link
Author

steve-king commented Nov 21, 2018

Hi @albinotonnina, thanks for the response and thanks for the useful plugin.

I'm on ParcelJS v1.10.3

If I could just tell parcel to ignore my SVG files I could use a copy plugin instead, but there is no .parcelignore type feature.

I can't seem to make this plugin output a SVG string into the CSS file - if that was possible we could create a Data URL but also I can't see a way to know what file type the parent dependency is (e.g. is the SVG being included from JS or CSS file)

ParcelJS is great but I think I've made a big mistake using this on a real project 😕

bung87 added a commit to bung87/parcel-plugin-inlinesvg that referenced this issue Nov 25, 2019
@bung87 bung87 mentioned this issue Dec 4, 2019
@nikoloza
Copy link

does it support ignoring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants