GithubHelp home page GithubHelp logo

Comments (5)

oliverfindl avatar oliverfindl commented on June 14, 2024

Hello,

plugin should work with both Vue@2 and with Vue@3. It worked on my examples when I last published this plugin. I always test it on all examples before publishing. So if you have some issues, please provide some dummy repo, where this issue would be reproducible.

For your first issue with sprites. It's fetching all SVGs as they appear on screen (with lazy loading you can postpone SVGs under fold). Once SVG has been fetched, it can be cached into local storage, so next request won't fetch them again. As for sprites, I didn't test this behavior, so it could be broken in this scenario. I didn't want to implement blocking fetching process, because it could make UI jump around.

For your second issue with viewBox attribute, I can add some new option for transfer/clone selected attributes if sprite directive is present.

If you have more questions, feel free to ask here.

Thanks.

from vue-svg-inline-plugin.

madebyfabian avatar madebyfabian commented on June 14, 2024

Hello Oliver, thanks for your quick answer!

This sounds very great so far. Until you implemented this, I would make a PR adding a note for this viewBox behaviour into the README, that users must define this manually for now. If that's okay for you.

from vue-svg-inline-plugin.

oliverfindl avatar oliverfindl commented on June 14, 2024

Hello,

I've published new version which fixes this issue. Check out new attributes.clone option. Unfortunately, this solution is not ideal and is somewhat taxing on performance, but correct solution is not possible without some major code refactoring.

Tested it successfully on all examples.

I also backported it into vue-svg-inline-loader package.

Thanks.

from vue-svg-inline-plugin.

madebyfabian avatar madebyfabian commented on June 14, 2024

Thank you very much! Works like a charm, at least in my case.

from vue-svg-inline-plugin.

oliverfindl avatar oliverfindl commented on June 14, 2024

Glad to hear.

from vue-svg-inline-plugin.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.