{"_id":"@bluesyoung/unplugin-json-conf","_rev":"1-3a6b4ff1375466c1dc95d5a2b777d8fc","name":"@bluesyoung/unplugin-json-conf","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@bluesyoung/unplugin-json-conf","version":"0.0.1","packageManager":"pnpm@7.1.1","description":"在运行/打包过程中，加载指定位置的JSON文件的内容作为虚拟模块的默认导出内容","keywords":["json-conf","unplugin","vite","webpack","rollup","transform"],"homepage":"https://github.com/antfu/unplugin-starter#readme","bugs":{"url":"https://github.com/antfu/unplugin-starter/issues"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/antfu/unplugin-starter.git"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs"},"./vite":{"require":"./dist/vite.js","import":"./dist/vite.mjs"},"./webpack":{"require":"./dist/webpack.js","import":"./dist/webpack.mjs"},"./rollup":{"require":"./dist/rollup.js","import":"./dist/rollup.mjs"},"./nuxt":{"require":"./dist/nuxt.js","import":"./dist/nuxt.mjs"},"./types":{"require":"./dist/types.js","import":"./dist/types.mjs"},"./*":"./*"},"dependencies":{"unplugin":"^0.6.3"},"devDependencies":{"@antfu/eslint-config":"^0.23.1","@types/node":"^17.0.34","bumpp":"^7.1.1","eslint":"^8.15.0","esno":"^0.16.3","fast-glob":"^3.2.11","nodemon":"^2.0.16","rimraf":"^3.0.2","rollup":"^2.74.0","tsup":"^5.12.8","typescript":"^4.6.4","vite":"^2.9.9","vitest":"^0.12.6","webpack":"^5.72.1"},"scripts":{"build":"tsup","dev":"tsup --watch src","build:fix":"esno scripts/postbuild.ts","lint":"eslint .","test":"vitest","release":"bumpp --commit","push":"pnpm publish --access public"},"_id":"@bluesyoung/unplugin-json-conf@0.0.1","_integrity":"sha512-w0GZsfkxhQin8FdXrXHB7lh16fdZOad0gTgLwTnDq0efJ8LPI8onU+8JAJA5RTkSU5INIVFn7pk2H2+ffr8d+A==","_resolved":"/home/young/young-project/young/packages/unplugin-json-conf/bluesyoung-unplugin-json-conf-0.0.1.tgz","_from":"file:bluesyoung-unplugin-json-conf-0.0.1.tgz","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-w0GZsfkxhQin8FdXrXHB7lh16fdZOad0gTgLwTnDq0efJ8LPI8onU+8JAJA5RTkSU5INIVFn7pk2H2+ffr8d+A==","shasum":"36ec71bb3727f9f3dc4cc6b38c292308a4de9867","tarball":"https://registry.npmjs.org/@bluesyoung/unplugin-json-conf/-/unplugin-json-conf-0.0.1.tgz","fileCount":28,"unpackedSize":20368,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD743TrpwvMDUnzRMeYHQote50oreOb4Vlx9pLGPE4YIgIhAL1bK5t+oJexzqtbzkH1Gc0uwic3BYo4Ay6xpkRKzAvd"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikDumACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouVA/8DzNtRu4xOu0L/kFmXYcFylfaJBraQotQ1NPUrS53OFKf05RJ\r\nK1z0HyPXdgqJPdJRX4qCOlaZV6pMjHYk/RGDUJB1ky4WOffAQzmgeSm1rCg+\r\nsrARBFybhN9eBsrAPG0KOh74+N1G4zvWieD8DWs8nRNk2/LQRw3J1Vl3cPnk\r\nqQEc6y8r88eemngVxudoo4WjISPyz6Sb4kapzFsgZSGrBDJzT35v3YF96K/q\r\ndwEprOxNeg1fVVwC+mrbIDWPzaRSTRB3jYaxrHmQixKPwDHuGmDur3303tt9\r\nMgZnOiQjkzFrwUiN9eU18u51oGSvT/SwQ/DhHmHofumw6MUXbTcuLMKrg2WF\r\nrBD3BePcT26BoTjvVY2GKaK2ngZ1DIT3vaQiSdTCpbk33A0dp9bJMYaO5pfc\r\nCavv3Ynd7Mnxkp94Ub0gFyXFZ/FvEBSXINyqrbPghZf/GubVFjq/s4ZPadC7\r\nCKOOd0x5sIIBBW7kZeiG6oa/ZAg0OlpG6T7m3VvfoiokYhpMXKwCQNGU3fHe\r\n5iD+Mw3Q2+M2fmIZ+1hWqbsv/tzh5DLR0ZkhKQR/mBqqawn1TeeIAoEcBysO\r\n7T0rO/VxXcBpBbgE1dsIbWQD10AW879XiyZAl6QV2YpQ/8U4CTakquadPHhL\r\n1qlLkFbV5tfYROicM/21StrJAHy1TYDsMrM=\r\n=v1zw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unplugin-json-conf_0.0.1_1653619622488_0.26207150916893296"},"_hasShrinkwrap":false},"0.0.2":{"name":"@bluesyoung/unplugin-json-conf","version":"0.0.2","packageManager":"pnpm@7.1.1","description":"在运行/打包过程中，加载指定位置的JSON文件的内容作为虚拟模块的默认导出内容","keywords":["json-conf","unplugin","vite","webpack","rollup","transform"],"homepage":"https://github.com/antfu/unplugin-starter#readme","bugs":{"url":"https://github.com/antfu/unplugin-starter/issues"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/antfu/unplugin-starter.git"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs"},"./vite":{"require":"./dist/vite.js","import":"./dist/vite.mjs"},"./webpack":{"require":"./dist/webpack.js","import":"./dist/webpack.mjs"},"./rollup":{"require":"./dist/rollup.js","import":"./dist/rollup.mjs"},"./nuxt":{"require":"./dist/nuxt.js","import":"./dist/nuxt.mjs"},"./types":{"require":"./dist/types.js","import":"./dist/types.mjs"},"./*":"./*"},"dependencies":{"unplugin":"^0.6.3"},"devDependencies":{"@antfu/eslint-config":"^0.23.1","@types/node":"^17.0.34","bumpp":"^7.1.1","eslint":"^8.15.0","esno":"^0.16.3","fast-glob":"^3.2.11","nodemon":"^2.0.16","rimraf":"^3.0.2","rollup":"^2.74.0","tsup":"^5.12.8","typescript":"^4.6.4","vite":"^2.9.9","vitest":"^0.12.6","webpack":"^5.72.1"},"scripts":{"build":"tsup","dev":"tsup --watch src","build:fix":"esno scripts/postbuild.ts","lint":"eslint .","test":"vitest","release":"bumpp --commit","push":"pnpm publish --access public"},"_id":"@bluesyoung/unplugin-json-conf@0.0.2","_integrity":"sha512-iuFWx1ikn9XGW4Lq8+VAQVGltTIkoOL6JczCg1WvDETlhRfjUtdD7tghjYaF3EiYH+NAW2l8wiMp+i/7aNQQEA==","_resolved":"/home/young/young-project/young/packages/unplugin-json-conf/bluesyoung-unplugin-json-conf-0.0.2.tgz","_from":"file:bluesyoung-unplugin-json-conf-0.0.2.tgz","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-iuFWx1ikn9XGW4Lq8+VAQVGltTIkoOL6JczCg1WvDETlhRfjUtdD7tghjYaF3EiYH+NAW2l8wiMp+i/7aNQQEA==","shasum":"d8dbd8f59ea2b5d8d76a0aa17da38cc043251b03","tarball":"https://registry.npmjs.org/@bluesyoung/unplugin-json-conf/-/unplugin-json-conf-0.0.2.tgz","fileCount":28,"unpackedSize":20404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8rDwq6hj8IhtZkIfWc4BqPhr/ZpiH0C8kPAAcRf8ZoAIgcCcCaxv0BSaj0DOy/T8g6pzRhdIyMt/FN/EJ97f4tkk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikDyPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEqhAAkGpQlpq6SFw5uts8OtEvNkW5MNrCprptagrWZY9OZqrKPofE\r\nNv9xJG9KTiZRDZKy37ef5b7wCjt4T5T8MltIyPUO9v0ah5TU1kqFzbD/fo4D\r\neAIyiot0ZOrIXAju1iWjitRaFrK81raFCvSyAnuiMBGUOcHn4CcBKSzLvVIw\r\njdxiIvDKu+LzFb2IWgI4rOVEmc6NKKz/iQiKIKRAcSNfq97Lk+S4IC0gHl1x\r\nM6i+1557zynpdilgGZ5tu8E0MKNLkGKs6YuhoWV3Ssy3tDrwxPT61xHnwBWW\r\nWtWPfxiQGwNMg5I5+1XT/ydI00GgvVorR1F0kEYYPa83zh8kZcRhRNXd5Kd5\r\n7NoJMYo1jtZZgRaOkeCTZCJkCokAt4CnUG9Eb+S665YK50eGy5x4q3RAOz2S\r\n92YvgA/dA9gCYoyVVvEshFaxJDri6Owbq/TT7IMUZ/WuW1Lc4vT0dse8NK5i\r\nQ20uxsHwSsVPYp6ECGXf9QZteU2fMsgTodyEwGyUKDkymLxx27JZZHHdtO4g\r\ncjSyrP0wWTUahYod7i9TXGqcpAC9b2qu8RKuTOseO1b73IYlLVHJTgQaBySy\r\nwjOlLZ7aMz3AWLTc7EMwg7ycXQ0nhLtFwLkqWOMxs4PvhSSu1MaIvYc0Yhwy\r\nQ4r9mB/Us9vln/6SnzXcvMZICiNOmykvUJ0=\r\n=gw2i\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unplugin-json-conf_0.0.2_1653619855375_0.5080545998820238"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-27T02:47:02.429Z","0.0.1":"2022-05-27T02:47:02.660Z","modified":"2022-05-27T02:50:55.647Z","0.0.2":"2022-05-27T02:50:55.556Z"},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"description":"在运行/打包过程中，加载指定位置的JSON文件的内容作为虚拟模块的默认导出内容","homepage":"https://github.com/antfu/unplugin-starter#readme","keywords":["json-conf","unplugin","vite","webpack","rollup","transform"],"repository":{"type":"git","url":"git+https://github.com/antfu/unplugin-starter.git"},"bugs":{"url":"https://github.com/antfu/unplugin-starter/issues"},"license":"MIT","readme":"# unplugin-json-conf\n\n在运行/打包过程中，加载指定位置的JSON文件的内容作为虚拟模块的默认导出内容\n\n## 安装\n\n```bash\n# 选择一个你喜欢的包管理器\n# NPM\n$ npm install @bluesyoung/unplugin-json-conf --save\n\n# Yarn\n$ yarn add @bluesyoung/unplugin-json-conf\n\n# pnpm\n$ pnpm add @bluesyoung/unplugin-json-conf\n```\n\n## 使用\n\n## 项目代码相关\n\n```ts\n// 注入环境变量(json 配置文件的路径)\nVITE_JSON_CONF_URL = './data.json'\n\n// 注入 env.d.ts\ndeclare module 'virtual:json-conf' {\n  const src: Record<string, any>\n  export default src\n}\n// 使用\nimport json from 'virtual:json-conf';\n```\n\n## 配置相关\n\nVite\n\n```ts\n// vite.config.ts\nimport JsonConf from '@bluesyoung/unplugin-json-conf/vite'\n\nexport default defineConfig({\n  plugins: [\n    JsonConf({ /* options */ }),\n  ],\n})\n```\n\nExample: [`playground/`](../../playground/unplugin-json-conf-demo/vite.config.ts)\n\n<br></details>\n\n<details>\n<summary>Rollup</summary><br>\n\n```ts\n// rollup.config.js\nimport JsonConf from '@bluesyoung/unplugin-json-conf/rollup'\n\nexport default {\n  plugins: [\n    JsonConf({ /* options */ }),\n  ],\n}\n```\n\n<br></details>\n\n\n<details>\n<summary>Webpack</summary><br>\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('@bluesyoung/unplugin-json-conf/webpack')({ /* options */ })\n  ]\n}\n```\n\n<br></details>\n\n<details>\n<summary>Nuxt</summary><br>\n\n```ts\n// nuxt.config.js\nexport default {\n  buildModules: [\n    ['@bluesyoung/unplugin-json-conf/nuxt', { /* options */ }],\n  ],\n}\n```\n\n> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)\n\n<br></details>\n\n<details>\n<summary>Vue CLI</summary><br>\n\n```ts\n// vue.config.js\nmodule.exports = {\n  configureWebpack: {\n    plugins: [\n      require('@bluesyoung/unplugin-json-conf/webpack')({ /* options */ }),\n    ],\n  },\n}\n```\n\n<br></details>","readmeFilename":""}