{"_id":"@rollup/plugin-virtual@3.0.3","bugs":{"url":"https://github.com/rollup/plugins/issues"},"dist":{"shasum":"ee0d495a2db37bdcd7caca9dfa8457ab899f52ae","tarball":"http://registry-npm.ywwl.com/@rollup/plugin-virtual/download/@rollup/plugin-virtual-3.0.3.tgz","fileCount":9,"integrity":"sha512-zmawyN/1iOy7KaY/HhYwOjEVCQs7OuCAA92PTz3IPHkg7syKjO5n2QpIhrcMPc6M7qhr9M7nwNNsQ7YCada4tw==","signatures":[{"sig":"MEUCIQCuoUyjxrITNWsEy8xbIdYJ8Y5PB+n/wwnVpAEpTojdvgIgeQ1TKT6F1/srcojmidsj7foQniraLV6/JrFhmJQvvUw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDoIWmC/XPayeG95js16qhRuQgRrmQ9Jm3RUQZnaksnWQIhANsS7lTtdJo4wGMoYJTt9JXCeUvusmo2DUADqP69kWlz"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@rollup%2fplugin-virtual@3.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10610,"size":3490,"noattachment":false,"key":"/@rollup/plugin-virtual/-/@rollup/plugin-virtual-3.0.3.tgz"},"main":"./dist/cjs/index.js","name":"@rollup/plugin-virtual","_from":"file:/tmp/versioner-pack-22x3OJ/rollup-plugin-virtual-3.0.3.tgz","types":"./types/index.d.ts","author":{"name":"Rich Harris"},"module":"./dist/es/index.js","engines":{"node":">=14.0.0"},"exports":{"import":{"types":"./types/index.d.mts","default":"./dist/es/index.js"},"default":"./dist/cjs/index.js","require":{"types":"./types/index.d.ts","default":"./dist/cjs/index.js"}},"license":"MIT","scripts":{"test":"vitest --config ../../.config/vitest.config.mts run","build":"rollup -c","ci:lint":"pnpm build && pnpm lint","ci:test":"pnpm test -- --reporter=verbose","pretest":"pnpm build","release":"pnpm --workspace-root package:release $(pwd)","test:ts":"tsc --noEmit && vitest --config ../../.config/vitest.config.mts run test/types.test.js","prebuild":"del-cli dist","prerelease":"pnpm build","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}"},"version":"3.0.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"9e267465-a74d-4ae0-ac1f-b9f1f9a4241b"}},"homepage":"https://github.com/rollup/plugins/tree/master/packages/virtual#readme","keywords":["rollup","plugin","memory","module","modules","virtual","rollup-plugin"],"_resolved":"/tmp/versioner-pack-22x3OJ/rollup-plugin-virtual-3.0.3.tgz","_integrity":"sha512-zmawyN/1iOy7KaY/HhYwOjEVCQs7OuCAA92PTz3IPHkg7syKjO5n2QpIhrcMPc6M7qhr9M7nwNNsQ7YCada4tw==","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/virtual"},"_npmVersion":"11.5.1","description":"Load virtual modules from memory","directories":{},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"},{"name":"rich_harris","email":"richard.a.harris@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"}],"_nodeVersion":"24.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0-24","typescript":"^4.8.3","@rollup/plugin-typescript":"^9.0.1","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0||^4.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-virtual_3.0.3_1792609444326_0.36490091893836674"},"readme":"[npm]: https://img.shields.io/npm/v/@rollup/plugin-virtual\n[npm-url]: https://www.npmjs.com/package/@rollup/plugin-virtual\n[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-virtual\n[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-virtual\n\n[![npm][npm]][npm-url]\n[![size][size]][size-url]\n[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)\n\n# @rollup/plugin-virtual\n\n🍣 A Rollup plugin which loads virtual modules from memory.\n\n## Requirements\n\nThis plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.\n\n## Install\n\nUsing npm:\n\n```console\nnpm install @rollup/plugin-virtual --save-dev\n```\n\n## Usage\n\n_Note. Use this plugin **before** any others such as node-resolve or commonjs, so they do not alter the output._\n\nSuppose an entry file containing the snippet below exists at `src/entry.js`, and attempts to load `batman` and `src/robin.js` from memory:\n\n```js\n// src/entry.js\nimport batman from 'batman';\nimport robin from './robin.js';\n\nconsole.log(batman, robin);\n```\n\nCreate a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:\n\n```js\nimport virtual from '@rollup/plugin-virtual';\n\nexport default {\n  input: 'src/entry.js',\n  // ...\n  plugins: [\n    virtual({\n      batman: `export default 'na na na na na'`,\n      'src/robin.js': `export default 'batmannnnn'`\n    })\n  ]\n};\n```\n\nThen call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).\n\n## Options\n\nThis plugin has no formal options. The lone parameter for this plugin is an `Object` containing properties that correspond to a `String` containing the virtual module's code.\n\n## Using the Plugin for Bundle Input\n\nIt's possible to use the plugin to specify an entry point for a bundle. To do so, implement a pattern simple to what is shown below:\n\n```js\nimport virtual from '@rollup/plugin-virtual';\n\nexport default {\n  input: 'entry',\n  // ...\n  plugins: [\n    virtual({\n      entry: `\nimport batman from 'batcave';\nconsole.log(batman);\n`\n    })\n  ]\n};\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1792609444399,"_cnpm_publish_time":1792609444399,"dist-tags":{"latest":"3.0.3"}}