{"_id":"@banshan-alec/egg-vite-middleware","_rev":"10-0b7d0b4200531ea53bcdc65aae630636","name":"@banshan-alec/egg-vite-middleware","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.0","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.0","dist":{"shasum":"5936880c560c039fddd0184d32a38619caedf974","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.0.tgz","fileCount":21,"integrity":"sha512-kEdhiODV4I2/sbOKvLwdet00TX1e1r7jGDaKDd0Lttp+ujTbe773AImXVLX3CKl45KV+0EGAckAcJHQkLm80yQ==","signatures":[{"sig":"MEUCIBNkOU5TUjmuF013O1pVHFHYaZFmR7Ec5Ca0+Q/Q0mYsAiEAj7NkujAVI7APm4IKPNqJVHKql2LtejR22HFgR7D1BMU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12297},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"fce45bc507029a4cc9a593e5776eeea963d654b4","scripts":{"cov":"egg-bin cov","dts":"egg-bin --declarations","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":"^5.3.1","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","egg-bin":"^6.10.0","typescript":"^5.5.2","@types/lodash":"^4.17.5","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.0_1719495088965_0.5770249131234455","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.1","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.1","dist":{"shasum":"ec64cd352a027d86489535beff684b6169c82a8f","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.1.tgz","fileCount":21,"integrity":"sha512-BOVU3L+t+rf79Tt5orqLmvVZsHyMqiiqQoSjmQ4hpa/I10swmKu2u3kHPcuulT+c2a+5C/B8PykyM+pjCsU/TQ==","signatures":[{"sig":"MEYCIQC1Yqf4kIfQmiTKEsAEXAJbX4ghEsZqjGAsWRRabB40sgIhAMzr+JR0hDHAoWErKY2YT5fLMfQQxjY+lqhz6F7i+xb5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12297},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"bae1db48afbdc03d1136ac0d6bce31b4d2deac9b","scripts":{"cov":"egg-bin cov","dts":"egg-bin --declarations","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"egg":"^3.24.1","vite":"^5.3.1","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8","egg-bin":"^6.10.0","typescript":"^5.5.2","@types/lodash":"^4.17.5","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.1_1719496950582_0.7215598038754569","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.2":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.2","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.2","dist":{"shasum":"0cf1f71b13805f6890302e6a4461ccbebd5c7ab0","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.2.tgz","fileCount":21,"integrity":"sha512-ubgSPby6ILqEIl4Dx/3d3fPFW4+OyYY+AgdZly2T+U8nb2bkDzpkxHqG0u3lzz+y0QB+DWkavxj+JyoFJ8y+ag==","signatures":[{"sig":"MEQCIAw/Pvogrk4WUQPv9TYLDEJH6r2FIGaDpIV7eeacKq9VAiAiaRZxtFLibMc3C4iDwhYAA7FHyoANYOk+muiRQi/xcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11926},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"82ba638afc3ee08cb6827bd433ea135e35f10a4f","scripts":{"dts":"ets -o egg-ts.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.2_1719537583250_0.8965483165029804","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.3":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.3","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.3","dist":{"shasum":"a3644160cfdafb984c19846975e35d126b0a5fb7","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.3.tgz","fileCount":22,"integrity":"sha512-5iCollVMmwwzz/0olzBbT8z1ACVemZoWR+vznjDBksIT8gByuh334fbDxPR0wrkOyc7SZwI8KYkGUg2NmxfSQw==","signatures":[{"sig":"MEQCIE6fSbo7Js6NN94yL4U4akXrmCkAVD63jxbBHhJd9xVZAiA4rAof/XWF7NABDSCufjbhgHN5fckEuFkquYAr3s6qlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12189},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"e52b1d99808f133d5114eee314c90a1f95e807bc","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.3_1719540442825_0.6093064272691002","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.4":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.4","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.4","dist":{"shasum":"61ed9e49f9c0bddf7e7a0f6e149f653631d005ff","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.4.tgz","fileCount":22,"integrity":"sha512-4NPx2P1mxzZ8EzUdaCobZuTVABGZTidYVd9BqjtqolxXQsfHf1/7mL76b3JcwkIXZ/HI9MF9sZTyEDwpTuECvQ==","signatures":[{"sig":"MEUCIQDxTII0+FzVnyc2x9udFh+2YHcfDnVovaMClD4cdDY0XgIgLk7cIXfXBDZjx279ktfvoMPyKBNuKKm+ccdvOiqbBhw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12972},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"2b3dc367b76d0104e779dcb6c5024abbf2bb87d1","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.4_1719543535200_0.22346229970040254","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.5":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.5","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.5","dist":{"shasum":"626dd54c04b7698bc910b500dd5fcf8d5f80b2ad","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.5.tgz","fileCount":22,"integrity":"sha512-Lj5sm6YwY7xIzkY0mccZv+kNynDGirnHQt/Da8tXM5acvTSMUUYkK0S0nsv0td+dpgp/I3+8yd3YAYJg3oui5g==","signatures":[{"sig":"MEYCIQDY9DvNVy/HcnsU9lrQBzmqNK9xCbFvw79xUbVKrvaZ4wIhAPU7BCh8bWxYrrIMeeL8z5vP/HMq9jCaEGtFCJWk0Skz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13151},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"c7fb5440d8c5ced4925885367a01833ad3bf1151","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.5_1719557133706_0.42301412609194644","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.6":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.6","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.6","dist":{"shasum":"5784b755b626b8f02181a2fc099e39696d8a95a9","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.6.tgz","fileCount":22,"integrity":"sha512-umriIry6PxrIzfdePFyY79KxG/5mmklEEiVeGMKu5CP4mcMkX0cqDIL36AuPv8pM4CmNKmF8BJlPlWcRaQq/Iw==","signatures":[{"sig":"MEQCIBzK6TZnocwbDlzolpIRB96gSpfT0SqS+yvzh9wK5v4wAiASSTgdJsWrK2JnFuUMkp+q60f6/YA4w6URemcSHCT8xg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14226},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"3f18c2151829e3c25717d3f00cc989189faf9c4c","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.6_1719559977204_0.19997711157805953","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.7":{"name":"@banshan-alec/egg-vite-middleware","version":"1.0.7","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.0.7","maintainers":[{"name":"banshan_alec","email":"banshan.alec@gmail.com"}],"dist":{"shasum":"f54fef763d9140797cccbedfa23f659c12b3dcaa","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.0.7.tgz","fileCount":23,"integrity":"sha512-WuwQSXwhANbTaVij7E/9PWWE2JiU88H7ZGSVeRGNEuFwxqoV2TRLtfJl03vTBGYnzIAsxWoyXqMLzW8zLRhH7w==","signatures":[{"sig":"MEUCIAMmKnl6Q6gU/hlG+W9l7GTHSViA3Ndga16JxJPoLxuDAiEAj/MVQKiADnR/oyxSC7A7BA95BMt5xP7T9Vbhdp/Ro8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14877},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"6c153726a09745ab99e850385d746c36a5a6fa24","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"open":"^8","vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.0.7_1720074793969_0.33634485841259654","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"@banshan-alec/egg-vite-middleware","version":"1.1.0","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.1.0","maintainers":[{"name":"banshan_alec","email":"banshan.alec@gmail.com"}],"dist":{"shasum":"fd222efe0fbf136b4ef4c6e9a1d06a35dd5175b5","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.1.0.tgz","fileCount":23,"integrity":"sha512-yQPd8ss4neZ5xxIw/Uxg2OjxkhriHPypbOx8ItXopMqECNkD3YCHOCT8W86a9SfK26RmOeU7jxiWHyTuQbSbtg==","signatures":[{"sig":"MEQCIGWQ9oXDKQcA3GT/P7/p3ZsHvrpOd2UfS2F0jh5HUUZLAiBwaDvN14TYUGMYqjFF1NE3kV0P5CN2qv7htTEQDu1o9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14879},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"a895425719759dffca716cf173022f7ea86de692","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"open":"^8","vite":">=5","lodash":"^4.17.15","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","@types/lodash":"^4.17.5","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.1.0_1720076379693_0.1446576663015744","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.1":{"name":"@banshan-alec/egg-vite-middleware","version":"1.1.1","keywords":["egg","egg-plugin","vite"],"author":{"name":"banshan-alec"},"license":"MIT","_id":"@banshan-alec/egg-vite-middleware@1.1.1","maintainers":[{"name":"banshan_alec","email":"banshan.alec@gmail.com"}],"dist":{"shasum":"f6bfc12323f3b2044d1421c8419d21298c3b14f2","tarball":"https://registry.npmjs.org/@banshan-alec/egg-vite-middleware/-/egg-vite-middleware-1.1.1.tgz","fileCount":21,"integrity":"sha512-YBTGv98P5ALh+oZkS+62naMbD0xT5ubu8H7ywrLfOR3lATBVAO375KIFQzWZvUQvgRK4sRs+5n30GwildOR3rg==","signatures":[{"sig":"MEUCIGa2r30tkWSD35a2s8eUsN56lhpHkYYsi6btlSO4huwJAiEA/31fYzpbWrkDeKZcycAZaFecHMo8VfxfIUF4V8Y62ac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13933},"types":"./index.d.ts","engines":{"node":">=18.9.0"},"gitHead":"3a09b5b166bc69a86576a88835849542fa34511e","scripts":{"dts":"ets -o typings/index.d.ts","pub":"npm publish --access=public","lint":"eslint  . --ext js --fix","build":"tsc && npm run lint","clean":"tsc -b --clean","prebuild":"npm run clean","prepublishOnly":"npm run dts && npm run build"},"_npmUser":{"name":"banshan_alec","email":"banshan.alec@gmail.com"},"eggPlugin":{"name":"vitePlugin"},"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"_npmVersion":"10.7.0","description":"use ViteServer middleware mode as eggjs plugin","directories":{},"_nodeVersion":"18.20.3","dependencies":{"open":"^8","vite":">=5","koa2-connect":"^1.0.2"},"eslintIgnore":["coverage","dist"],"publishConfig":{"registry":"https://npm.pkg.github.com/@banshan-alec","@banshan-alec:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e","devDependencies":{"egg":"^3.24.1","eslint":"^8","typescript":"^5.5.2","egg-ts-helper":"^2.1.0","@eggjs/tsconfig":"^1.3.3","eslint-config-egg":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/egg-vite-middleware_1.1.1_1723534599357_0.8464499011919777","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2024-06-27T13:31:28.831Z","modified":"2025-02-21T06:26:43.780Z","1.0.0":"2024-06-27T13:31:29.117Z","1.0.1":"2024-06-27T14:02:30.735Z","1.0.2":"2024-06-28T01:19:43.419Z","1.0.3":"2024-06-28T02:07:22.971Z","1.0.4":"2024-06-28T02:58:55.371Z","1.0.5":"2024-06-28T06:45:33.837Z","1.0.6":"2024-06-28T07:32:57.404Z","1.0.7":"2024-07-04T06:33:14.087Z","1.1.0":"2024-07-04T06:59:39.872Z","1.1.1":"2024-08-13T07:36:39.560Z"},"author":{"name":"banshan-alec"},"license":"MIT","keywords":["egg","egg-plugin","vite"],"repository":{"url":"git@https://github.com/BanShan-Alec/egg-vite-middleware.git","type":"git"},"description":"use ViteServer middleware mode as eggjs plugin","maintainers":[{"name":"banshan_alec","email":"banshan.alec@gmail.com"}],"readme":"# egg-vite-middleware\n\nuse ViteServer middleware mode as eggjs plugin\n[插件开发 - Egg](https://www.eggjs.org/zh-CN/advanced/plugin)\n\n## 配置\n\n通过 `config/plugin.ts` 配置启动 vite 插件:\n\n```ts\nexport default {\n  vitePlugin: {\n    enable: true,\n    package: \"@banshan-alec/egg-vite-middleware\",\n  },\n};\n```\n\n在 `config/config.${env}.ts` 配置基础配置：\n\n```ts\nexport default (appInfo: EggAppInfo) => {\n  return {\n    vitePluginConfig: {\n      dev: process.env.NODE_ENV === \"development\",\n      envModeKey: \"NODE_ENV\",\n      root: path.resolve(appInfo.baseDir, \"..\"),\n      configFile: path.resolve(appInfo.baseDir, \"../vite.config.ts\"),\n    },\n    cluster = {\n        listen: {\n            open: true, // 设置open: true 可以自动打开浏览器\n            port: 6019,\n            hostname: '0.0.0.0',\n        },\n    };\n  };\n};\n```\n\n\n## 模板渲染\n\n本插件暴露一个 Service，`renderTpl` 用于注入必要的运行时，和处理模板渲染\n\n逻辑参考 [Server-Side Rendering | Vite](https://vitejs.dev/guide/ssr.html#setting-up-the-dev-server)\n\n```ts\nexport default class HTMLController extends Controller {\n  async html() {\n    console.log(\"路由html\", this.ctx.req.url);\n    if (process.env.NODE_ENV === \"production\") {\n      // Why? 使用ctx.render可以缓存模板，提高性能，vite.renderTpl使用的是fs读取html，不会缓存\n      await this.ctx.render(\n        \"index.html\",\n        { appInfo: \"xxx\" },\n        {\n          viewEngine: \"nunjucks\",\n        }\n      );\n    } else {\n      await this.ctx.service.vite.renderTpl((code) => {\n        return html.replace(\n          \"{{ appInfo }}\",\n          `<script>Object.defineProperty(window,'MyEnv',{value:Object.freeze(${JSON.stringify(\n            { appInfo: \"xxx\" }\n          )}),writable: false});</script>`\n        );\n      });\n    }\n  }\n}\n```\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"/icon.png\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta\n      http-equiv=\"cache-control\"\n      content=\"no-cache, no-store, must-revalidate\"\n    />\n    <meta http-equiv=\"expires\" content=\"0\" />\n    <title>%VITE_APP_NAME%</title>\n    {{ appInfo }}\n    <style></style>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/index.tsx\"></script>\n  </body>\n</html>\n```\n","readmeFilename":"README.md"}