-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
import.meta.globEager('../assets/svgIcon/*.svg?raw') #5304
Comments
The glob patterns are treated like import specifiers: they must be either relative (start with ./) or absolute (start with /, resolved relative to project root). |
I know, but what I want is to batch import files from folders instead of batch convert paths. Like |
You can achieve this for regular const modules = import.meta.glob('./assets/svgIcon/*.svg')
const rawModules = {}
for (const path in modules) {
rawModules[path] = () => import(`${path}?raw`)
} But the same can't be done for
Or pass this flag as a parameter like
|
@patak-dev closed! |
Clear and concise description of the problem
将资源批量引入为其他格式。
Batch import resources into other formats.
Suggested solution
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: