Comments (5)
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.
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.
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.
Thank you very much! Works like a charm, at least in my case.
from vue-svg-inline-plugin.
Glad to hear.
from vue-svg-inline-plugin.
Related Issues (18)
- Support variable src HOT 2
- Changelog for new versions HOT 2
- add event handlers HOT 2
- Custom directive not working HOT 2
- Crashes in incognito when iframed HOT 2
- Reduce bundle size HOT 1
- Support for Nuxt 3? HOT 1
- Trying to use vue-svg-inline-plugin in Quasar app HOT 11
- Image cached? HOT 3
- "Argument is not valid" for items without v-svg-inline directive HOT 13
- Typescript support for CLI projects HOT 14
- Error: Required property is missing! [node.parentNode] HOT 1
- Webpack 5 compatibility? HOT 2
- Usage configuration HOT 2
- Question HOT 2
- Static building loads SVGs as data/image, not inline HOT 1
- inlining at build time? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-svg-inline-plugin.