Observed since 20 Oct, 22:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0kzh/babel-plugin-transform-vite-meta-glob
babel plugin that emulates vite's import.meta.glob import.meta.globEager functionality
Please note: this plugin is intended to provide an approximation of some of Vite specific transformations when running the code in non-Vite environment, for example, running tests with a NodeJS based test runner.
The functionality within these transformations should not be relied upon in production.
In
const modules = import.meta.glob('./path/to/files/**/*')
const eagerModules = import.meta.globEager('./path/to/files/**/*')
Out
For the purposes of this example, assume there are 3 files,
files1.js,files2.jsandfile3.jsat the path of./path/to/files/relative the files being transformed.
const modules = {
'./path/to/files/file1.js': () => import('./path/to/files/file1.js'),
'./path/to/files/file2.js': () => import(('./path/to/files/file2.js'),
'./path/to/files/file3.js': () => import(('./path/to/files/file3.js')
}
const eagerModules = {
'./path/to/files/file1.js': require('./path/to/files/file1.js'),
'./path/to/files/file2.js': require('./path/to/files/file2.js'),
'./path/to/files/file3.js': require('./path/to/files/file3.js')
}
npm install --save-dev babel-plugin-transform-vite-meta-glob
{
"plugins": ["babel-plugin-transform-vite-meta-glob"]
}
babel --plugins babel-plugin-transform-vite-meta-glob script.js
require('@babel/core').transformSync('code', {
plugins: ['babel-plugin-transform-vite-meta-glob']
})
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@babel/runtimeEnvironment{
"local_name": "@babel/runtime",
"alias": false,
"peer_metadata": null
} | ^7.13.9 | runtime |
@types/babel__coreEnvironment{
"local_name": "@types/babel__core",
"alias": false,
"peer_metadata": null
} | ^7.1.12 | runtime |
globEnvironment{
"local_name": "glob",
"alias": false,
"peer_metadata": null
} | ^8.0.1 | runtime |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ^7.13.8 | development |
@types/babel-plugin-testerEnvironment{
"local_name": "@types/babel-plugin-tester",
"alias": false,
"peer_metadata": null
} | ^9.0.1 | development |
@types/globEnvironment{
"local_name": "@types/glob",
"alias": false,
"peer_metadata": null
} | ^7.1.3 | development |
babel-plugin-testerEnvironment{
"local_name": "babel-plugin-tester",
"alias": false,
"peer_metadata": null
} | ^10.0.0 | development |
kcd-scriptsEnvironment{
"local_name": "kcd-scripts",
"alias": false,
"peer_metadata": null
} | ^12.0.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^4.2.2 | development |
Source distribution
{
"integrity": "sha512-RiRZetcJSnlZI9NPo1y4J2CQ/YGDaPcqTZpjcFwE+3c4p7oo5rVpgCoE2tzQhd8DurFp7nvQUojN7anVtRjYOA==",
"shasum": "c1895cd5ae075329124b806bd76153f8b87af98c",
"tarball": "https://registry.npmjs.org/@0kzh/babel-plugin-transform-vite-meta-glob/-/babel-plugin-transform-vite-meta-glob-0.0.0-semantically-released.tgz",
"fileCount": 11,
"unpackedSize": 13793,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIDND9Lnb2wtbNsYAAUOleoFXoc6FmqmnxAgwG6qV93IGAiEAsw+/iRY+/CLb+A0kRT5Kvp4/e3SGux/SBUqJKUD/nlU="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxu1gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsJQ//RnjefANyl8hEy2uoQrw0dOOMBPiAofmu7jZbtSgX78ntrf3I\r\n4y0tr3EknSqXr+LYLSshShjzukuBsMfoKbI4wGYtIvqOKjAN7BMkXZIN3bYV\r\nJL5NLGmjHoLqHRV8BigwQL1x5ApIfanlhYc9mXPyKjK5S5LeVoiW0ctBSzM/\r\nrt3Xin1nAaU8jNeApF2d84dM7LpZ0+yQYiKQg8Zp8FWgCgDClqiX5oMDZW18\r\nSjrx976vCEaGcvw59vNXI8JMpZa9hq9M8OcvqVSZE6YGNuqye48bLpFi77QH\r\nMs1isfZJdlAP4MoUBqENMR/pLvm4ykkpqKavzmIw0ko7pKfRZmYG7a8niGmX\r\nApwWYFW1rAWmlL3u7usLY/nKVXnb0CkgQR9pU+waEVBgNBJ0QJ7rZ1SJhqFv\r\nvCm+3gWCMfl8Q2OneOgLvUFGXvPSmGFVZzIO/5c+F1jNCGXA+wx9wjTvmSJg\r\nMqqIq5R6yhHUOMolk6YzZvBkW6izDqwpZI7G5ecCmKeoYU1mkomU2FCbJ+k6\r\nVq37teOnwTpe0oAyuO3EG3rczJuC0q3/YLL61uvoEc39lBhZ1QZ014hF/mHP\r\nTTPXYg/ODJGp50YtrN/LNqpfWurdMOSJp31rznGGYB7WHc7chWWkK+EnRkWn\r\nwWqJL5gPOBO7YEZ3BnniHPo9nkPYXNU9g2w=\r\n=fv78\r\n-----END PGP SIGNATURE-----\r\n"
}Shared repository data · GitHub
Observed since 20 Oct, 22:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:f47ea31b9a143abfb305e07c2a719a2fd59e94c19190d5418ad70218aec9bc99