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

Use custom query on a dynamic import #538

Closed
AutomateAaron opened this issue Apr 26, 2023 · 2 comments
Closed

Use custom query on a dynamic import #538

AutomateAaron opened this issue Apr 26, 2023 · 2 comments

Comments

@AutomateAaron
Copy link

Is it possible to use Glob Import's Custom Queries with a dynamic import?

Something akin to:

import(`../../cat01.jpg?run`, {
  query: { some: 'query' }
})
@benmccann
Copy link
Collaborator

This would be a question for Vite. We don't do anything special with regards to imports, etc.

@benmccann
Copy link
Collaborator

benmccann commented Apr 26, 2023

I just added import.meta.glob to the docs and examples and verified that it works with query. I'm not exactly sure what you're trying to do, but at the very least you could import.meta.glob a single image with query (assuming it's a hardcoded image as in the issue description and not held in a variable)

This issue was closed.
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

2 participants