![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
babel-plugin-shopware-vite-meta-glob
Advanced tools
A Babel plugin that transforms import.meta.glob()
calls to support dynamic
module imports in Shopware and Vite-like environments. This plugin provides two
main transformation strategies:
⚠️ Warning: Not Recommended for Production Use
This Babel plugin is intended for development and experimental purposes only. It may introduce performance overhead, potential security risks, and unexpected behavior in production environments. Use with caution and thoroughly test before considering any production deployment.
This plugin was heavily inspired from the OpenSourceRaidGuild/babel-vite repo. Unfortunately for us it was not handling the import meta statements right for our use case. Since this was time critical we decided to create our own version. If there version works for you stick to theirs!
import.meta.glob('./dir/*.js')
into an object of dynamic imports{ eager: true }
option for direct module imports{ import: 'default' }
only in combination with eager: trueimport.meta.glob(['./dir1/*.js', './dir2/*.js'])
array
like syntaximport.meta.glob('./dir1/*.js', { eager: false })
eager false will not be transformedimport.meta.glob('./dir1/*.js', { query: 'foo' })
query option will be ignorednpm install babel-plugin-shopware-vite-meta-glob
Add the plugin to your Babel configuration:
{
"plugins": ["shopware-vite-meta-glob"]
}
// Input
const modules = import.meta.glob('./dir/*.js')
// Transformed output
const modules = {
'./dir/file1.js': () => import('./dir/file1.js'),
'./dir/file2.js': () => import('./dir/file2.js'),
}
// Input
const modules = import.meta.glob('./dir/*.js', {eager: true})
// Transformed output
const modules = {
'./dir/file1.js': require('./dir/file1.js'),
'./dir/file2.js': require('./dir/file2.js'),
}
@babel/core
glob
debug
Set the DEBUG
environment variable to babel-plugin-shopware-vite-meta-glob
for detailed logging.
Contributions welcome! Please submit issues and pull requests on the repository.
MIT License
FAQs
## Overview
The npm package babel-plugin-shopware-vite-meta-glob receives a total of 176 weekly downloads. As such, babel-plugin-shopware-vite-meta-glob popularity was classified as not popular.
We found that babel-plugin-shopware-vite-meta-glob demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.