{"_id":"@0kzh/babel-plugin-transform-vite-meta-glob","name":"@0kzh/babel-plugin-transform-vite-meta-glob","dist-tags":{"latest":"0.0.0-semantically-released"},"versions":{"0.0.0-semantically-released":{"name":"@0kzh/babel-plugin-transform-vite-meta-glob","version":"0.0.0-semantically-released","description":"babel plugin that emulates vite's import.meta.glob import.meta.globEager functionality","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OpenSourceRaidGuild/babel-vite.git"},"keywords":["babel","vite","plugin","import","meta","glob","globEager"],"author":{"name":"Michael Peyper","email":"mpeyper7@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/OpenSourceRaidGuild/babel-vite/issues"},"homepage":"https://github.com/OpenSourceRaidGuild/babel-vite#readme","scripts":{"build":"kcd-scripts build --out-dir lib","test":"kcd-scripts test"},"devDependencies":{"@babel/core":"^7.13.8","@types/babel-plugin-tester":"^9.0.1","@types/glob":"^7.1.3","babel-plugin-tester":"^10.0.0","kcd-scripts":"^12.0.0","typescript":"^4.2.2"},"dependencies":{"@babel/runtime":"^7.13.9","@types/babel__core":"^7.1.12","glob":"^8.0.1"},"_id":"@0kzh/babel-plugin-transform-vite-meta-glob@0.0.0-semantically-released","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"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"},"_npmUser":{"name":"0kzh","email":"me@kelvinzhang.ca"},"directories":{},"maintainers":[{"name":"0kzh","email":"me@kelvinzhang.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-transform-vite-meta-glob_0.0.0-semantically-released_1673981280569_0.4241736972648471"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-17T18:48:00.474Z","0.0.0-semantically-released":"2023-01-17T18:48:00.844Z","modified":"2023-01-17T18:48:01.034Z"},"maintainers":[{"name":"0kzh","email":"me@kelvinzhang.ca"}],"description":"babel plugin that emulates vite's import.meta.glob import.meta.globEager functionality","homepage":"https://github.com/OpenSourceRaidGuild/babel-vite#readme","keywords":["babel","vite","plugin","import","meta","glob","globEager"],"repository":{"type":"git","url":"git+https://github.com/OpenSourceRaidGuild/babel-vite.git"},"author":{"name":"Michael Peyper","email":"mpeyper7@gmail.com"},"bugs":{"url":"https://github.com/OpenSourceRaidGuild/babel-vite/issues"},"license":"MIT","readme":"# babel-plugin-transform-vite-meta-glob\n\n<!-- prettier-ignore-start -->\n[![Build Status](https://img.shields.io/github/workflow/status/OpenSourceRaidGuild/babel-vite/validate?logo=github&style=flat-square)](https://github.com/OpenSourceRaidGuild/babel-vite/actions?query=workflow%3Avalidate)\n[![codecov](https://img.shields.io/codecov/c/github/OpenSourceRaidGuild/babel-vite.svg?style=flat-square)](https://codecov.io/gh/OpenSourceRaidGuild/babel-vite)\n[![version](https://img.shields.io/npm/v/babel-plugin-transform-vite-meta-glob.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-vite-meta-glob)\n[![downloads](https://img.shields.io/npm/dm/babel-plugin-transform-vite-meta-glob.svg?style=flat-square)](http://www.npmtrends.com/babel-plugin-transform-vite-meta-glob)\n[![MIT License](https://img.shields.io/npm/l/babel-plugin-transform-vite-meta-glob.svg?style=flat-square)](https://github.com/OpenSourceRaidGuild/babel-vite/blob/master/LICENSE.md)\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](https://github.com/OpenSourceRaidGuild/babel-vite/blob/master/CODE_OF_CONDUCT.md)\n[![Discord](https://img.shields.io/discord/808364903822917662.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square)](https://discord.gg/grS89HWeYh)\n\n[![Watch on GitHub](https://img.shields.io/github/watchers/OpenSourceRaidGuild/babel-vite.svg?style=social)](https://github.com/OpenSourceRaidGuild/babel-vite/watchers)\n[![Star on GitHub](https://img.shields.io/github/stars/OpenSourceRaidGuild/babel-vite.svg?style=social)](https://github.com/OpenSourceRaidGuild/babel-vite/stargazers)\n[![Tweet](https://img.shields.io/twitter/url/https/github.com/OpenSourceRaidGuild/babel-vite.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20babel-plugin-transform-vite-meta-glob%20by%20OpenSourceRaidGuild%20https%3A%2F%2Fgithub.com%2FOpenSourceRaidGuild%2Fbabel-vite%20%F0%9F%91%8D)\n<!-- prettier-ignore-end -->\n\n> Please note: this plugin is intended to provide an approximation of some of Vite specific\n> transformations when running the code in non-Vite environment, for example, running tests with a\n> NodeJS based test runner.\n>\n> **The functionality within these transformations should not be relied upon in production.**\n\n## Example\n\n**In**\n\n```js\nconst modules = import.meta.glob('./path/to/files/**/*')\n\nconst eagerModules = import.meta.globEager('./path/to/files/**/*')\n```\n\n**Out**\n\n> For the purposes of this example, assume there are 3 files, `files1.js`, `files2.js` and\n> `file3.js` at the path of `./path/to/files/` relative the files being transformed.\n\n```js\nconst modules = {\n  './path/to/files/file1.js': () => import('./path/to/files/file1.js'),\n  './path/to/files/file2.js': () => import(('./path/to/files/file2.js'),\n  './path/to/files/file3.js': () => import(('./path/to/files/file3.js')\n}\n\nconst eagerModules = {\n  './path/to/files/file1.js': require('./path/to/files/file1.js'),\n  './path/to/files/file2.js': require('./path/to/files/file2.js'),\n  './path/to/files/file3.js': require('./path/to/files/file3.js')\n}\n```\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-vite-meta-glob\n```\n\n## Usage\n\n### With a configuration file (Recommended)\n\n```json\n{\n  \"plugins\": [\"babel-plugin-transform-vite-meta-glob\"]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins babel-plugin-transform-vite-meta-glob script.js\n```\n\n### Via Node API\n\n```javascript\nrequire('@babel/core').transformSync('code', {\n  plugins: ['babel-plugin-transform-vite-meta-glob']\n})\n```\n","readmeFilename":"README.md"}