jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
557 stars 59 forks source link

feat: Return path if import has parameter url #12

Closed kaeki closed 3 years ago

kaeki commented 3 years ago

If the import has parameter url, return null to fallback to the default behaviour of returning path to the image so it can be used for example as an src to img tag.

import Image from '@/assets/images/example.svg?url';

Resolves #11

jpkleemans commented 3 years ago

Hi, thanks for the PR!

kaeki commented 3 years ago

Hi! I figured I could make a PR after playing around in my project :D Happy to help