
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
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 11,005 weekly downloads. As such, babel-plugin-shopware-vite-meta-glob popularity was classified as 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.