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

Can we make ?component configurable? #99

Open
gkatsanos opened this issue Apr 25, 2023 · 1 comment
Open

Can we make ?component configurable? #99

gkatsanos opened this issue Apr 25, 2023 · 1 comment

Comments

@gkatsanos
Copy link
Collaborator

gkatsanos commented Apr 25, 2023

We were wondering if you'd accept a PR or had an idea if its possible to make ?component configurable?
We're migrating away from https://github.com/nuxt-community/svg-module#vue-svg-loader which uses the ?inline url query option to do the same behavior and as other applications depend on the same component library we would like to try to keep it backwards compatible.
We're happy to make the PR. (does this belong here or is this a behavior defined in https://github.com/svg/svgo ?

PS: I thought that using any other value besides raw or url will by default set behavior to be component but unfortunately that doesn't seem to be the case.

  vite: {
    plugins: [
      svgLoader({
        defaultImport: "component", // or 'raw'
      }),
    ],
  }

import PopupMenuAccountIcon from '@visable-dev/styleguide/dist/images/icons/account.svg ( component, works)
import PopupMenuAccountIcon from '@visable-dev/styleguide/dist/images/icons/account.svg?inline' (doesn't work)

@gkatsanos
Copy link
Collaborator Author

@jpkleemans granted me maintainer rights, I'll do a PR for this one.

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

Successfully merging a pull request may close this issue.

1 participant