Skip to content

case insensitive matching for import.meta.glob #21682

@benmccann

Description

@benmccann

Description

You currently have to match by listing various possibilities in the pattern such as '/path/to/assets/*.{avif,AVIF,gif,GIF,heif,HEIF,jpeg,JPEG,jpg,JPG,png,PNG,tiff,TIFF,webp,WEBP}'

Suggested solution

An option passed to import.meta.glob that makes it case insensitive

Alternative

Case insensitive matching by default to match rollup's filter include. See: https://github.com/JonasKruckenberg/imagetools/blob/74df03b9a38b15279dd5a0aac05b1f41a941d545/packages/vite/src/index.ts#L38

Additional context

See sveltejs/kit#15380 and the associated issue and Bluesky post

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions