A Babel plugin (v0.0.5, latest stable) that transforms `import.meta.glob()` calls into dynamic module imports for Shopware and Vite-like environments. It supports eager and lazy loading, array patterns, and file path normalization. Notable differentiators: heavily inspired by OpenSourceRaidGuild/babel-vite but handles import meta statements differently; explicitly not recommended for production use due to performance, security, and unexpected behavior risks. Supports Node >=20 and ships TypeScript types. Last release at 0.0.5, release cadence is unknown but appears experimental.
npm install babel-plugin-shopware-vite-meta-globVerified import paths — ran on the pinned version, not inferred.
Demonstrates Babel plugin configuration, input with import.meta.glob, and transformed output with eager loading.
Use the native Vite import.meta.glob if possible. Only use this plugin in development/experimental contexts.
Ensure eager: true when using import: 'default'.
Use eager: true or omit the eager option for transformation. eager: false is not supported.
Do not use query: option as it will be dropped.
Run 'npm install babel-plugin-shopware-vite-meta-glob --save-dev' and ensure the string 'shopware-vite-meta-glob' is in plugins array.
Downgrade glob to v7 or update plugin (if fix exists). Check package.json for glob version.
Normalize paths manually or ensure consistent slash direction in glob patterns.