{"_id":"real-require","_rev":"4-8d6451bdeb15a45703d39c249897b23b","name":"real-require","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"real-require","version":"0.1.0","description":"Keep require and import consistent after bundling or transpiling","author":{"name":"Paolo Insogna","email":"shogun@cowtech.it"},"homepage":"https://github.com/pinojs/real-require","contributors":[{"name":"Paolo Insogna","url":"https://github.com/ShogunPanda"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pinojs/real-require.git"},"bugs":{"url":"https://github.com/pinojs/real-require/issues"},"main":"src/index.js","scripts":{"format":"prettier -w src test","lint":"eslint src test","test":"c8 --reporter=text --reporter=html tap --reporter=spec --no-coverage test/*.test.js","test:watch":"tap --watch --reporter=spec --no-browser --coverage-report=text --coverage-report=html test/*.test.js","test:ci":"c8 --reporter=text --reporter=json --check-coverage --branches 90 --functions 90 --lines 90 --statements 90 tap --no-color --no-coverage test/*.test.js","ci":"npm run lint && npm run test:ci","prepublishOnly":"npm run ci","postpublish":"git push origin && git push origin -f --tags"},"devDependencies":{"eslint":"^7.12.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.1","eslint-plugin-standard":"^5.0.0","c8":"^7.10.0","prettier":"^2.4.1","tap":"^15.0.10"},"engines":{"node":">= 12.13.0"},"gitHead":"a7ae6df84bcbd905f58bd4bcb4482647c8a74a1e","_id":"real-require@0.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==","shasum":"736ac214caa20632847b7ca8c1056a0767df9381","tarball":"https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz","fileCount":5,"unpackedSize":5889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh25aECRA9TVsSAnZWagAAAv4P/1B14ssdigTN0CIvHutJ\nSad4IU7TYaYoB3YM+slUNcNDh7eBN2WJenbJvLdzGaGQnYMRSqMpQhLQXnwU\n+ro0PjEgeaQaFLYCHu0DXoZK1Z3ch3YZ2zlKtqzPOrgqg7inyZSHdEmS4z3T\nukeAv/JRvzRt+bGlUo0cpmCHqdXzHfuZXyjskig3plW4zBmX6RHNhmcTzf5t\nZqR/QIuFVJURGrJLn0oY6kWV0XUs3S35Jkh+JMZzb0wRO9DpFguDcaPvFbrl\nhFP36StATD1MZclVZaemzO6duDuk12uTNN1D5w1lktRbepS3QVfZ85Pu27YV\np/kfLET8eQiuMRSkFhJbZnMY4U1j3NZlJkRbBzatUnS+bylmyg1AFwFAXjWc\n+MTB/cBlYflA63g9yFX6mVtiJyivh+U6P/+INQtNCYAd7RGUQzu+2xezTby5\nJm6f/4rye5ie8cRiHJUx+PAUjWFP4N9J9rY9RamUbKuPXEMSjUXfG1Jeihug\nQrCeQVspQzlhyZzQb8BHbRevpkGMCWjENTnP3ztWkSUiaJp6xF3QfbIb9JnW\nUvm1QX84dac6K7vhgQpiTHMedd/AMJt/3TBZq5mlkPOKS3wbU5Zoeg2XBv/f\nUjxrzktu/z28xKrp1rh4uzT3mf6VFmCiWdpirLefXgumi1LkaEjD0WiUzPL0\nWJVl\r\n=cP6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdkmgjhXNsKAWohmqBW1JRmwQw18LP93Gen7ICk8QXagIgUed1y5vpCw7dYSf5BnUT0DMExYTb+MhH4reqi45rqW4="}]},"_npmUser":{"name":"shogun_panda","email":"paolo@cowtech.it"},"directories":{},"maintainers":[{"name":"shogun_panda","email":"paolo@cowtech.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/real-require_0.1.0_1636110252551_0.1756273256664762"},"_hasShrinkwrap":false},"0.2.0":{"name":"real-require","version":"0.2.0","description":"Keep require and import consistent after bundling or transpiling","author":{"name":"Paolo Insogna","email":"shogun@cowtech.it"},"homepage":"https://github.com/pinojs/real-require","contributors":[{"name":"Paolo Insogna","url":"https://github.com/ShogunPanda"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pinojs/real-require.git"},"bugs":{"url":"https://github.com/pinojs/real-require/issues"},"main":"src/index.js","scripts":{"format":"prettier -w src test","lint":"eslint src test","test":"c8 --reporter=text --reporter=html tap --reporter=spec --no-coverage test/*.test.js","test:watch":"tap --watch --reporter=spec --no-browser --coverage-report=text --coverage-report=html test/*.test.js","test:ci":"c8 --reporter=text --reporter=json --check-coverage --branches 90 --functions 90 --lines 90 --statements 90 tap --no-color --no-coverage test/*.test.js","ci":"npm run lint && npm run test:ci","prepublishOnly":"npm run ci","postpublish":"git push origin && git push origin -f --tags"},"devDependencies":{"eslint":"^7.12.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.1","eslint-plugin-standard":"^5.0.0","c8":"^7.10.0","prettier":"^2.4.1","tap":"^16.0.0"},"engines":{"node":">= 12.13.0"},"gitHead":"514f9d0ff860dd84a6cff52d89d437d5a5c3203b","_id":"real-require@0.2.0","_nodeVersion":"16.15.1","_npmVersion":"8.14.0","dist":{"integrity":"sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==","shasum":"209632dea1810be2ae063a6ac084fee7e33fba78","tarball":"https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz","fileCount":4,"unpackedSize":4827,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWBlgtRjI+obB6kKJugvSPk3nzwK6Jr2viGOozmPOlzAIgGYKZWV+ReySPmYsOQF5HVcbg11ewUxe6WvTRJTn323c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3m0OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpB1hAAl1cicGoZ1/NvCo4w1Ziq+X8O+5qRgbZk/2NHWELuwhXm6qgV\r\nAW705qGiWmwPZBVFAkb0re14Z25z5G6v/MRJV2SmzaiG8WhoKRO904ae6BV1\r\nXXQBVXUTiJBAEZMBl93ILR3ZTfAish3N2Bku/k3rYMM30I+Qnx8iQxOOUF4R\r\n8/3r+QzR/5J2bgiEtLN+3kxAfItDaItIGC9ZhC5cVkNlVJYD4VwYKG4Wc/ek\r\nxsBXWBifIOJMyc6NwmeMaHpxp9cbpjRiNVVDtkSdiVyBAwHI8ncmmDjwfWut\r\nPngdBgXOcRQkL/oZk17KwkyiIPhFpvpoPJeRoa2ZtIfLwBsigDehMAaPEyHK\r\nvZEGk/r1sdep73If/hfVM99k7aoG1WFGPwwB0dBYsMC5P9VbTFRZ4vvj+QA6\r\nGblfd9X0o5fnmeIs26noV1IGyw/tcnHf9T8xrcl/seCKUynBd6E5UPghiu8s\r\nXBlpAiD71Eq+03rWRQDp2T8o5uIBtFO/+pySF2tUTIAGhYXcu86kW3SNcHU4\r\nd1X2ptusbvZWoRdWHF6Y83BE7TQfrHCPGDcJvKMuqyGi/pvG0NI8nqnjRJty\r\nAadeRuDdKJlvBta8V2rhsEBM8bvS0n0j4ps25q25wvIF/W2aM7GRhBZ3+kF8\r\nPFWrwbtzfi+mffrQDqgA+hB/xKk3U8O59QY=\r\n=92AP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"shogun_panda","email":"paolo@cowtech.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/real-require_0.2.0_1658744077917_0.7570992307500417"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-05T11:04:12.550Z","0.1.0":"2021-11-05T11:04:12.736Z","modified":"2022-07-25T10:14:38.122Z","0.2.0":"2022-07-25T10:14:38.061Z"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"shogun_panda","email":"paolo@cowtech.it"}],"description":"Keep require and import consistent after bundling or transpiling","homepage":"https://github.com/pinojs/real-require","repository":{"type":"git","url":"git+https://github.com/pinojs/real-require.git"},"contributors":[{"name":"Paolo Insogna","url":"https://github.com/ShogunPanda"}],"author":{"name":"Paolo Insogna","email":"shogun@cowtech.it"},"bugs":{"url":"https://github.com/pinojs/real-require/issues"},"license":"MIT","readme":"# real-require\n\n[![Package Version](https://img.shields.io/npm/v/real-require.svg)](https://npm.im/real-require)\n[![Dependency Status](https://img.shields.io/librariesio/release/npm/real-require)](https://libraries.io/npm/real-require)\n[![Build](https://github.com/pinojs/real-require/workflows/CI/badge.svg)](https://github.com/pinojs/real-require/actions?query=workflow%3ACI)\n\nKeep require and import consistent after bundling or transpiling.\n\n## Installation\n\nJust run:\n\n```bash\nnpm install real-require\n```\n\n## Usage\n\nThe package provides two drop-ins functions, `realRequire` and `realImport`, which can be used in scenarios where tools like transpilers or bundlers change the native `require` or `await import` calls.\n\nThe current `realRequire` functions only handles webpack at the moment, wrapping the `__non_webpack__require__` implementation that webpack provides for the final bundle.\n\n### Example\n\n```js\n// After bundling, real-require will be embedded in the bundle\nconst { realImport, realRequire } = require('real-require')\n\n/*\n By using realRequire, at build time the module will not be embedded and at runtime it will try to load path from the local filesytem.\n This is useful in situations where the build tool does not support skipping modules to embed.\n*/\nconst { join } = realRequire('path')\n\nasync function main() {\n // Similarly, this make sure the import call is not modified by the build tools\n const localFunction = await realImport('./source.js')\n\n localFunction()\n}\n\nmain().catch(console.error)\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## License\n\nCopyright Paolo Insogna and real-require contributors 2021. Licensed under the [MIT License](http://www.apache.org/licenses/MIT).\n","readmeFilename":"README.md"}