{"_id":"@arponascension/express-inertia","_rev":"11-6aac2db3f4ec4ebfd495e4f69102d391","name":"@arponascension/express-inertia","dist-tags":{"latest":"1.6.2"},"versions":{"0.1.0":{"name":"@arponascension/express-inertia","version":"0.1.0","keywords":["express","inertia","inertiajs","middleware","blade","ejs","vite","ssr","vue","react","svelte"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@0.1.0","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"dist":{"shasum":"65fdb3b25530488324e090a74a40e1d904bf7a10","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-0.1.0.tgz","fileCount":25,"integrity":"sha512-Mq5ECD2s7JrtsbVPK0zCvjBek614VIX9V0Y4olh5oRL28g5kH2QBBjhWHQgeJ+QjLdQYKOa73gtwCYBclzSISg==","signatures":[{"sig":"MEYCIQDrWgd+1v70dIm6ee9JGoI2RMvytgOAbMhM7knBiPVuhgIhAOI1ka0DE/tvwN1rpUsfWCM47lJgKOfau4CC90S1tnbT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":588218},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"11fe348b7c6d834e4711b58e8d2888a5f0f43664","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"_npmVersion":"10.8.2","description":"Next-generation Inertia.js adapter and middleware for Express with Blade-style EJS components, Vite integration, and SSR support","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vite":"^6.4.3","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@types/supertest":"^6.0.2"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_0.1.0_1788881334502_0.37361065387990444","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@arponascension/express-inertia","version":"0.1.1","keywords":["express","inertia","inertiajs","middleware","blade","ejs","vite","ssr","vue","react","svelte"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@0.1.1","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"24bb3bef4c16d7aaa412bcbf6b25c7b5cd9437cb","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-0.1.1.tgz","fileCount":25,"integrity":"sha512-jTcyQnIBL29WemCkvrFrE08znkH6x23sp5buvBEeviUPhc75K95li7Yu7Z6g6UyrMyODQou1Ua2mrX/ncoRtug==","signatures":[{"sig":"MEYCIQCoaTsg0cCk4ajHhIGf81lg4epAhtaoMHgzAkEQUFwWkQIhALx16tEJfBBKj68ofz5iRakl0dJX+6Yc3xwCQI0VcIur","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":588818},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"6612f2cc703cb7745ad111f8ffab70f12d4e17da","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Next-generation Inertia.js adapter and middleware for Express with Blade-style EJS components, Vite integration, and SSR support","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vite":"^6.4.3","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@types/supertest":"^6.0.2"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_0.1.1_1788882170043_0.3623517611463891","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@arponascension/express-inertia","version":"0.1.2","keywords":["express","inertia","inertiajs","middleware","blade","ejs","vite","ssr","vue","react","svelte"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@0.1.2","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"0e54391d31ef6e4a13a710ba4913babf2b181f75","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-0.1.2.tgz","fileCount":25,"integrity":"sha512-GaKpj74SS5qV2KY8hlMJ17mZnN+IhuXnn0Njm4jE0OiT42Gdw3BFGwYaHW7Lmsj6AE0+ZN18tBc6snKlOvsdvQ==","signatures":[{"sig":"MEYCIQDqg6bpb+JHLLeQJzPajxjtJhr/+y3M2SrHjOH8DIomAgIhAKriowR0f8XJFUOX6SI/tSckCZZPRsT5QCVgw8dqPzkP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":588850},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"589ed97f21f5f2e1cbc5910eb2d902ccf49627ed","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Next-generation Inertia.js adapter and middleware for Express with Blade-style EJS components, Vite integration, and SSR support","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vite":"^6.4.3","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@types/supertest":"^6.0.2"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_0.1.2_1788965312051_0.17921090056647548","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@arponascension/express-inertia","version":"1.0.0","keywords":["express","inertia","inertiajs","middleware","blade","ejs","vite","ssr","vue","react","svelte"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.0.0","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"cc8b293a9f476a46575e0dcc7f9df418e0d5a192","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.0.0.tgz","fileCount":25,"integrity":"sha512-4G2/o9uQxDqikF16qz7sac3MEQsXKioECR3dLwy6xTacnSVWe8ApnzIfM/TPTFO78S65qnvqWPNiQ+aEP/KYKg==","signatures":[{"sig":"MEYCIQDhrSuGPa1LwdageQDOS9ezhBnTgG61FTID3u4Gvjkz+AIhAOyr2AuAu6KWyRrgcThy7Zf82FwMaEBaSVdpwTM0GeyE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":590357},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"66dcc86c462ad36a456afdee0de6695b41bf7735","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Next-generation Inertia.js adapter and middleware for Express with Blade-style EJS components, Vite integration, and SSR support","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","@vitejs/plugin-vue":"^5.2.3"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.0.0_1788968273258_0.3041580673683577","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arponascension/express-inertia","version":"1.0.1","keywords":["express","inertia","inertiajs","middleware","blade","ejs","vite","ssr","vue","react","svelte"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.0.1","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"7ce38f0131b120f2e3b621630a66552148f5fe5c","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.0.1.tgz","fileCount":25,"integrity":"sha512-OVHejPnsWUen2w5Kl/td+eJUKWQMGAsILbqCs2WU0SDGEf/ZQ7zmba2eksd/K8/wNl8Cp1pOs4PKZSv6aDb5Cw==","signatures":[{"sig":"MEQCIE7s/eQERm3ek3czEpdFyoBTukMSQqdZcdqeQR6xUvo9AiBX4nK3Xoj1k4aVGRJYsJfiWUblkH5u64yfnMEe5dwG6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":591418},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"8f7b1231cfa5ae8521089766b15090271744b49c","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Next-generation Inertia.js adapter and middleware for Express with Blade-style EJS components, Vite integration, and SSR support","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","@vitejs/plugin-vue":"^5.2.3"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.0.1_1788968564356_0.26630837719558453","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@arponascension/express-inertia","version":"1.5.0","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","blade","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.5.0","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"0526b3843a65825c132f969334c518e8936f92b0","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.5.0.tgz","fileCount":25,"integrity":"sha512-V+KOvHD1bepT1eI8UgKX8UuEQFSkDlPuiRIABHxnOhQlz0eE5zRuQBJZs3T3qSEUFbmq1OZ8xSOg4m2S78/IIA==","signatures":[{"sig":"MEUCIQCm5PMIUdRqDtOzEZgLIIgV2j8cdhMfsK/DA+Kade4m1QIgUcjCAyEvBTkoyQpnaAbrAyhtzVKtNXcgrPLSmtn6aP0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":635252},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"101ee9c05b6763db998051028e1efa122ca6908d","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js (Node.js). Build modern single-page applications (SPA) with Vue 3, React, or Svelte using classic server-side routing — Blade-style EJS templates, Vite integration (HMR + manifest.json), server-side renderi","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.5.0_1789014193574_0.9004778139377403","host":"s3://npm-registry-packages-npm-production"}},"1.5.1":{"name":"@arponascension/express-inertia","version":"1.5.1","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","blade","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.5.1","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"bbf430f9935f279effc1beb984bf16cf92f4dd97","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.5.1.tgz","fileCount":25,"integrity":"sha512-qaBKeVIWerafFFxfKjSGfBsBIkIfy4wyA3U83jW03eT5brscbzAcAjcVRtO00aFHP/29Gx7V3Pm2YmTSCEgSKA==","signatures":[{"sig":"MEUCIQDRvVHyZB60eMK8piUDyNmkF/r0FkVcpzaZi1BS8b1mfgIgFftsC499CzDkScu5Elji6fMxDHEgXI0oxxpFgPADz1Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":635202},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"2e73aacbe46d5908829baea60410f130dc887ecc","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, Blade EJS templates, Vite, and server-side rendering (SSR).","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.5.1_1789014662755_0.7867278657815568","host":"s3://npm-registry-packages-npm-production"}},"1.5.2":{"name":"@arponascension/express-inertia","version":"1.5.2","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","blade","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.5.2","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"94cbc9e2fe6f51ff03507266c335b49e0bd81d7c","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.5.2.tgz","fileCount":25,"integrity":"sha512-UxtULQ6VrAvf4FN6jZK4GG2fn5ov7RpLrNrZxcsPuBjk3uA3tdfliJoEwAyiu0IsV4WlzcSFRTKBH7/d5zKMOw==","signatures":[{"sig":"MEYCIQCiOwgEHCaAOdvhbUeWXVLxeyi0gP18C28hfp+9jUe71gIhAMS5kXQOHlHtirb8ZU/UfavWql8ak4i3Q2SEZJ+GakX2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCeEgOLm4uoYltIz9+izUjwPqhRvcnHHVgKVz247h+PdAIgGUHKoN1qUPbHUt0ZmyZ3ULSWJqATfhZ14rmkFiv8Vn8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":691065},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"4e0198caada2fde55bfeb5e17226867675f8deaa","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, Blade EJS templates, Vite, and server-side rendering (SSR).","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.5.2_1789268411012_0.1906212929480957","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@arponascension/express-inertia","version":"1.6.0","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.6.0","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"fb7990ec3310da88447a3266ce115f9d75e7e890","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.6.0.tgz","fileCount":25,"integrity":"sha512-I/IKmIQa2XcfKZ5zwADGLCdK8HFFJawbZa9plOOpnXrZ7uRBj29La02AWSvRaOZMzaHrWj2LEv/N0VYZIhulwA==","signatures":[{"sig":"MEUCIQCD0GZIWs1sk/zOOko2LL02LCLy36Gv4KyHyXy4Xkf8iwIgILihidUec8uNG9j+L2AOybPEbbXJ4QE+k0NpcxL0MBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAZxkEPSUj1haJ501fUrMmnQV9imclgoLi6B/EWBswYjAiEA6BstEeeHulQcWm/2Q5PYNf4K6t/wJOUh8vQ3AorasRc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":634989},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"267d6f10b1775bbd6727776454c4fd1a87d0e927","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, EJS templates, Vite, and server-side rendering (SSR).","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.6.0_1790875980598_0.20818695662434927","host":"s3://npm-registry-packages-npm-production"}},"1.6.1":{"name":"@arponascension/express-inertia","version":"1.6.1","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"author":{"name":"Arpon"},"license":"MIT","_id":"@arponascension/express-inertia@1.6.1","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"homepage":"https://github.com/arponascension/express-inertia#readme","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"ae95ccb3fbf0028036845f4e843eb6ec3edc8e24","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.6.1.tgz","fileCount":25,"integrity":"sha512-eE1kR3LW4E8MEjsMhqWXkmo7l/fss0gfuwABVFAfHcPZit3ZHb/pTmXTgDCpNH8F/Kacl5aRiG5e0L95YQlPuw==","signatures":[{"sig":"MEQCIA+5MjCDUePMgbN8nsaDNpmealxe7PdkFr/jjfQEkU5yAiBSAH0HWcej0SHeXMpLpt6ys97H5TTcp+wUSq3DyyWDlw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCYlbnJ32xmhJWfg255IrAr6QYuqiRlZFL75fuaJy6Z9AIgOn97Hh0fXD66UV2FsYQKe8SFvYozwm8ml6aW+7O06J0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":635795},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"8f78129d682d591e5de1b67ba71f005a5e3f7df5","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, EJS templates, Vite, and server-side rendering (SSR).","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-inertia_1.6.1_1790960015510_0.9225482961110996","host":"s3://npm-registry-packages-npm-production"}},"1.6.2":{"_id":"@arponascension/express-inertia@1.6.2","bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"dist":{"shasum":"9f4bd348f125a247644d74dfc5676a9c8984801f","tarball":"https://registry.npmjs.org/@arponascension/express-inertia/-/express-inertia-1.6.2.tgz","fileCount":25,"integrity":"sha512-E/nnSN1twC92qselaEcV0Ye6qmo0j2XC4zI1QZPPAllDxf4UF0fMfknUMY5u0492ukLoVVgZvWx7KB2rt7kdSA==","signatures":[{"sig":"MEQCICLPNifnbL1dfeQwiIQx9OQe4kOkI8X4dzq26jkfj2YZAiBlO4hWPmaJmaR511PPhdQQLy9TUMmNCvdIelHZ4f2ZoA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQChFsdUv0qYE/77+UiMy68WWa0CXQk+i3i34xpdF9FnDAIhAJKfA/w8nTfPW2XIZWieaerd4qmfZ10FkWZ0gRjaEIkU"}],"unpackedSize":635827},"main":"./dist/index.js","name":"@arponascension/express-inertia","types":"./dist/index.d.ts","author":{"name":"Arpon"},"module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./vite":{"types":"./dist/vite.d.ts","import":"./dist/vite.mjs","require":"./dist/vite.js"},"./engine":{"types":"./dist/engine.d.ts","import":"./dist/engine.mjs","require":"./dist/engine.js"}},"gitHead":"894af6ec1cf28ccb607756f3fed6406e2f889bb5","license":"MIT","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","prepare":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"version":"1.6.2","_npmUser":{"name":"arponascension","email":"arponascension20@gmail.com"},"homepage":"https://github.com/arponascension/express-inertia#readme","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"_npmVersion":"10.8.2","description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, EJS templates, Vite, and server-side rendering (SSR).","directories":{},"maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"_nodeVersion":"20.20.2","dependencies":{"ejs":"^3.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","tsup":"^8.3.5","vite":"^6.4.3","eslint":"^10.10.0","vitest":"^3.0.5","express":"^4.21.2","supertest":"^7.0.0","@types/ejs":"^3.1.5","typescript":"^5.7.3","@types/node":"^22.0.0","@types/express":"^4.17.21","@inertiajs/vue3":"^2.2.12","@types/supertest":"^6.0.2","typescript-eslint":"^8.70.0","@vitejs/plugin-vue":"^5.2.3","@vitest/coverage-v8":"^3.2.7"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/express-inertia_1.6.2_1790960572028_0.11229359311089304"}}},"time":{"created":"2026-09-08T15:28:54.265Z","modified":"2026-10-02T17:02:52.319Z","0.1.0":"2026-09-08T15:28:54.802Z","0.1.1":"2026-09-08T15:42:50.178Z","0.1.2":"2026-09-09T14:48:32.212Z","1.0.0":"2026-09-09T15:37:53.410Z","1.0.1":"2026-09-09T15:42:44.470Z","1.5.0":"2026-09-10T04:23:13.811Z","1.5.1":"2026-09-10T04:31:02.897Z","1.5.2":"2026-09-13T03:00:11.135Z","1.6.0":"2026-10-01T17:33:00.690Z","1.6.1":"2026-10-02T16:53:35.608Z","1.6.2":"2026-10-02T17:02:52.139Z"},"bugs":{"url":"https://github.com/arponascension/express-inertia/issues"},"author":{"name":"Arpon"},"license":"MIT","homepage":"https://github.com/arponascension/express-inertia#readme","keywords":["express","inertia","inertiajs","express-inertia","middleware","express-middleware","ejs","vite","vite-plugin","ssr","server-side-rendering","vue","react","svelte","spa","single-page-application","node","nodejs","typescript","hmr"],"repository":{"url":"git+https://github.com/arponascension/express-inertia.git","type":"git"},"description":"Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, EJS templates, Vite, and server-side rendering (SSR).","maintainers":[{"name":"arponascension","email":"arponascension20@gmail.com"}],"readme":"# Express-Inertia — Inertia.js Middleware, Adapter & SSR for Express.js\n\n[![npm version](https://img.shields.io/npm/v/@arponascension/express-inertia.svg)](https://npmjs.com/package/@arponascension/express-inertia)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n[![CI](https://github.com/arponascension/express-inertia/actions/workflows/ci.yml/badge.svg)](https://github.com/arponascension/express-inertia/actions)\n[![Bundle Size](https://img.shields.io/badge/bundle_minified-40KB-green.svg)](https://github.com/arponascension/express-inertia)\n\n**@arponascension/express-inertia** is a production-ready **Inertia.js adapter for Express.js**. It brings the official [Inertia.js](https://inertiajs.com) protocol to **Node.js and Express** apps so you can build modern **single-page applications (SPAs)** with **Vue 3**, **React**, or **Svelte** using classic server-side routing and controllers — without the complexity of a REST API or a client-side router.\n\nIt ships with a **native EJS template engine** with Inertia/Vite helpers, **zero-config Vite** integration (HMR in development, hashed `manifest.json` in production), **server-side rendering (SSR)** with circuit-breaker resilience, **security hardening**, **edge-runtime support** (Cloudflare Workers, Vercel Edge, Netlify Edge), and **first-class TypeScript** types — all in a tree-shakeable ~40KB bundle.\n\n> New to Inertia.js? Read [What is Inertia.js?](#what-is-inertiajs) or the [official documentation](https://inertiajs.com/docs).\n\n---\n\n## Table of Contents\n\n- [What is Inertia.js?](#what-is-inertiajs)\n- [Why use Inertia.js with Express?](#why-use-inertiajs-with-express)\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start: Express + Inertia + Vue 3](#quick-start-express--inertia--vue-3)\n- [Using Inertia.js with React](#using-inertiajs-with-react)\n- [EJS Template Helpers for Express](#ejs-template-helpers-for-express)\n- [Vite Integration for Express](#vite-integration-for-express)\n- [Server-Side Rendering (SSR) for SEO](#server-side-rendering-ssr-for-seo)\n- [Response API: `res.inertia()`](#response-api-resinertia)\n- [Prop Helpers (Lazy, Deferred, Merge)](#prop-helpers-lazy-deferred-merge)\n- [Security Hardening](#security-hardening)\n- [Structured Logging](#structured-logging)\n- [Edge Runtime Compatibility](#edge-runtime-compatibility)\n- [Resilience: Circuit Breaker & Retry](#resilience-circuit-breaker--retry)\n- [Performance](#performance)\n- [API Reference](#api-reference)\n- [FAQ](#faq)\n- [Compatibility Matrix](#compatibility-matrix)\n- [Testing](#testing)\n- [Resources & Ecosystem](#resources--ecosystem)\n- [License](#license)\n\n---\n\n## What is Inertia.js?\n\n[Inertia.js](https://inertiajs.com) is a protocol (by [Jonathan Reinink](https://twitter.com/reinink)) for building **modern single-page applications (SPAs)** with **classic server-side routing and controllers**. Instead of building a JSON API and a separate JavaScript frontend, you keep writing server-side routes and controllers exactly as you do today — but render your pages with **Vue**, **React**, or **Svelte** components.\n\nInertia requests return plain JSON to the client (no full page reloads); real full-page visits return your server-rendered HTML template. Page components, props, versions, and partial reloads are all handled automatically by the Inertia protocol.\n\n**express-inertia** is the Inertia.js server-side adapter for **Express.js** / **Node.js** — the Node equivalent of the official [Laravel](https://inertiajs.com/docs/getting-started) and [Rails](https://github.com/inertiajs/inertia-rails) adapters. The client side stays 100% compatible with the official `@inertiajs/vue3`, `@inertiajs/react`, and `@inertiajs/svelte` packages.\n\n## Why use Inertia.js with Express?\n\n- **No API layer, no client router** — classic MVC controllers on the server, components on the client.\n- **SEO-friendly** — full-page visits serve real HTML; enable **SSR** to pre-render pages for search engine indexing.\n- **Fast navigation** — Inertia requests are small JSON payloads with automatic prop merging, lazy evaluation, and deferred data.\n- **One codebase** — policies, validation, and DB queries stay where they belong, in your Express routes.\n\n## Features\n\n| Feature | What you get |\n|---|---|\n| **Native EJS template helpers** | Call `<%- inertia() %>`, `<%- vite('src/main.ts') %>`, `<%- csrf() %>`, and `<%- inertiaHead() %>` directly inside `.ejs` templates |\n| **Zero-config Vite integration** | Automatic HMR in development; hashed `manifest.json` asset resolution in production |\n| **Server-side rendering (SSR)** | Express + Inertia SSR endpoint proxying with retry/backoff and **circuit breaker** fallback to client rendering |\n| **Security hardening** | Component name validation against path traversal, `viewData` sanitization, SRI hash generation |\n| **Form helpers** | Semantic `postForm`, `putForm`, `patchForm`, `deleteForm` with flash messages |\n| **Prefetch & preload** | Auto-generate `<link rel=\"prefetch\">` / `<link rel=\"preload\">` tags from the Vite manifest |\n| **Edge compatible** | Works on Cloudflare Workers, Vercel Edge, Netlify Edge via injected manifest/config (no `fs`) |\n| **Structured logging** | Pluggable logger abstraction with request correlation IDs (`X-Request-ID`) |\n| **TypeScript first** | Full type definitions, ESM + CJS builds, tree-shakeable ~40KB bundle |\n\n---\n\n## Installation\n\n**Requirements:** Node.js `>=18` (the runtime globals `fetch`, `AbortController`, `crypto.randomUUID`, and `fs.rmSync` are used by the SSR and middleware layers). Express `^4.18 || ^5` is a peer dependency.\n\n```bash\nnpm install @arponascension/express-inertia ejs express\n\n# Choose one client adapter — Vue 3:\nnpm install @inertiajs/vue3 vue\nnpm install -D vite @vitejs/plugin-vue\n\n# Or React:\nnpm install @inertiajs/react react react-dom\nnpm install -D vite @vitejs/plugin-react\n```\n\nPeer dependencies:\n\n```bash\nnpm install express\n```\n\n---\n\n## Quick Start: Express + Inertia + Vue 3\n\n### 1. Configure the Express Inertia middleware\n\n```ts\nimport express from 'express';\nimport path from 'path';\nimport { inertia, createInertiaEngine } from '@arponascension/express-inertia';\n\nconst app = express();\n\n// EJS view engine with Inertia/Vite helpers for Express\napp.engine('ejs', createInertiaEngine());\napp.set('view engine', 'ejs');\napp.set('views', path.join(__dirname, 'views'));\n\n// Parse request bodies and serve static files\napp.use(express.json());\napp.use(express.urlencoded({ extended: true }));\napp.use(express.static(path.join(__dirname, 'public')));\n\n// Inertia.js middleware for Express\napp.use(\n  inertia({\n    rootView: 'base.ejs',\n    version: '1.0.0',\n    shared: (req) => ({\n      appName: 'My Express App',\n      auth: { user: (req as any).user || null },\n    }),\n  })\n);\n\n// Classic server-side routes\napp.get('/', (req, res) => {\n  res.inertia('Home', { title: 'Welcome Home' });\n});\n\napp.listen(3000, () => console.log('Server running on http://localhost:3000'));\n```\n\n### 2. Create the root view (`views/base.ejs`)\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title inertia><%= page?.props?.title || 'App' %></title>\n\n    <%- inertiaHead() %>\n    <%- vite('src/main.ts') %>\n  </head>\n  <body>\n    <%- inertia() %>\n    <%- csrf() %>\n  </body>\n</html>\n```\n\nKeep the `inertia` attribute on the title element. It allows the Inertia\nclient adapter to replace the server-rendered title during client-side\nnavigation.\n\n### 3. Configure the Vue 3 client (`src/main.ts`)\n\n```ts\nimport { createApp, h } from 'vue';\nimport { createInertiaApp } from '@inertiajs/vue3';\n\ncreateInertiaApp({\n  resolve: (name) => import(`./Pages/${name}.vue`),\n  setup({ el, App, props, plugin }) {\n    createApp({ render: () => h(App, props) }).use(plugin).mount(el);\n  },\n});\n```\n\n### 4. Configure Vite (`vite.config.ts`)\n\n```ts\nimport { defineConfig } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport { inertiaVitePlugin } from '@arponascension/express-inertia/vite';\n\nexport default defineConfig({\n  plugins: [vue(), inertiaVitePlugin({ input: 'src/main.ts', refresh: true })],\n});\n```\n\nStart Express and Vite in separate terminals during development; `inertiaVitePlugin()` writes `public/hot` so the EJS root view automatically uses the Vite dev server.\n\nWhen an `input` is provided, the plugin **auto-configures the production build**: it sets `build.manifest`, `build.outDir` (default `public/build`), `build.rollupOptions.input`, and a command-aware `base` (root-relative in dev, `/build/` at build time) — so `vite build` emits `public/build/.vite/manifest.json` ready for Express with **zero manual Vite config**. The `refresh: true` option makes the browser full-reload when an EJS view under `views/` changes.\n\n## Using Inertia.js with React\n\nInstall the React client adapter, configure the React client (`src/main.tsx`):\n\n```tsx\nimport { createRoot } from 'react-dom/client';\nimport { createInertiaApp } from '@inertiajs/react';\n\ncreateInertiaApp({\n  resolve: (name) => import(`./Pages/${name}.tsx`),\n  setup({ el, App, props }) {\n    createRoot(el).render(<App {...props} />);\n  },\n});\n```\n\nSet page titles with Inertia's `Head` component, not only with a server prop.\nThe EJS root view is rendered only on the initial full-page request; subsequent\n`<Link>` navigations receive JSON and do not render the EJS template again.\n\n```tsx\nimport { Head } from '@inertiajs/react';\n\nexport default function Dashboard() {\n  return (\n    <>\n      <Head title=\"Dashboard\" />\n      <h1>Dashboard</h1>\n    </>\n  );\n}\n```\n\nFor a shared suffix, configure the callback once:\n\n```tsx\ncreateInertiaApp({\n  titleCallback: (title) => `${title} | My App`,\n  // resolve and setup...\n});\n```\n\nFor Vue, use the equivalent `Head` component from `@inertiajs/vue3`.\n\nFor React, use a `.tsx` entrypoint in the root view and include `<%- viteReactRefresh() %>` before `<%- vite('src/main.tsx') %>`:\n\n```html\n<%- viteReactRefresh() %>\n<%- vite('src/main.tsx') %>\n```\n\nReplace the Vue plugin with `@vitejs/plugin-react` in `vite.config.ts` and keep the same `inertiaVitePlugin()`:\n\n```ts\nimport { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react';\nimport { inertiaVitePlugin } from '@arponascension/express-inertia/vite';\n\nexport default defineConfig({\n  plugins: [react(), inertiaVitePlugin({ input: 'src/main.tsx', refresh: true })],\n});\n```\n\n---\n\n## EJS Template Helpers for Express\n\nCall the Inertia and Vite helpers as normal EJS expressions, powered by a custom Express view engine:\n\n| EJS helper | Output |\n|---|---|\n| `<%- inertia() %>` | Renders `<div id=\"app\"></div><script data-page=\"app\" type=\"application/json\">` |\n| `<%- inertia('root') %>` | Custom root ID |\n| `<%- inertiaScript() %>` | JSON script only (manual root container) |\n| `<%- inertiaHead() %>` | Injects SSR `<head>` tags |\n| `<%- vite('src/main.ts') %>` | Dev HMR or production manifest |\n| `<%- viteReactRefresh() %>` | React Fast Refresh preamble |\n| `<%- csrf() %>` | CSRF hidden input |\n| `<%- routes() %>` | Ziggy / route definitions |\n| `<%- json(myVar) %>` | Safely stringifies a JS object |\n\n---\n\n## Vite Integration for Express\n\nAuto-detects the Vite dev server via the hot file (`public/hot`) and reads `manifest.json` in production.\n\n### Zero-config: `inertiaVitePlugin({ input, refresh })`\n\nThe recommended setup requires nothing but your client entrypoint:\n\n```ts\nimport { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react';\nimport { inertiaVitePlugin } from '@arponascension/express-inertia/vite';\n\nexport default defineConfig({\n  plugins: [react(), inertiaVitePlugin({ input: 'src/main.tsx', refresh: true })],\n});\n```\n\n| Option | Type | Default | Description |\n|---|---|---|---|\n| `input` | `string \\| string[]` | — | Client entrypoint(s) for the build. When set, the plugin auto-configures the build: enables `build.manifest`, builds into `public/{buildDirectory}`, registers `build.rollupOptions.input`, and uses a command-aware `base` (root in dev, `/{buildDirectory}/` at build time so hashed asset URLs resolve against the Express static mount). |\n| `refresh` | `boolean \\| string \\| string[]` | `false` | Auto full-page reload when a server-rendered template changes. `true` watches `views/**/*.ejs`; a glob string or array watches custom paths relative to the project root. |\n| `buildDirectory` | `string` | `'build'` | Directory inside `public/` that Vite builds into. |\n| `hotFile` | `string` | `'public/hot'` | Hot file written by the plugin in dev mode. |\n| `devServerUrl` | `string` | resolved dev URL | Override for the URL written to the hot file. |\n\n### Manual asset resolution\n\nIf you prefer to configure the build or engine yourself, the `vite` option on `createInertiaEngine()` (or the `inertia()` middleware, which is ignored there and only consumed by the engine) still gives you full control:\n\n```ts\napp.engine(\n  'ejs',\n  createInertiaEngine({\n    vite: {\n      publicDir: 'public',\n      buildDir: 'build',\n      devServerUrl: 'http://localhost:5173',\n      hotFile: 'public/hot',\n      base: '/build/',\n    },\n  })\n);\n```\n\n> For that manual route, configure the build yourself — and use a command-aware `base` (a static `base: '/build/'` would make the Vite dev server serve modules under `/build/`, breaking dev HMR):\n>\n> ```ts\n> export default defineConfig(({ command }) => ({\n>   plugins: [react(), inertiaVitePlugin()],\n>   base: command === 'build' ? '/build/' : '/',\n>   build: {\n>     manifest: true,\n>     outDir: 'public/build',\n>     rollupOptions: { input: 'src/main.tsx' },\n>   },\n> }));\n> ```\n\n### Prefetch and preload helpers\n\n```ts\nimport { createPrefetchHelper } from '@arponascension/express-inertia';\n\nconst prefetch = createPrefetchHelper(viteHelper);\n\n// In your base template:\n<%= prefetch.prefetch('src/Pages/Dashboard.vue') %>\n// <link rel=\"prefetch\" href=\"/build/assets/Dashboard.abc1234.js\">\n\n<%= prefetch.preload('src/main.ts') %>\n// <link rel=\"preload\" href=\"/build/assets/main.abc1234.js\">\n```\n\n---\n\n## Server-Side Rendering (SSR) for SEO\n\n**Server-side rendering (SSR) pre-renders your JavaScript pages on the server, so visitors and search engines receive fully rendered HTML** — better indexability, faster first paint, and a better core-web-vitals story. Inertia's official SSR server is a Node.js background process; `express-inertia` proxies render requests to it (default `http://127.0.0.1:13714/render`) with **retries, exponential backoff, a circuit breaker, and graceful client-side fallback** if SSR fails.\n\n```ts\napp.use(\n  inertia({\n    ssr: {\n      enabled: true,\n      url: 'http://127.0.0.1:13714/render',\n      timeout: 2000,\n      fallback: true,\n      retry: { maxRetries: 2, baseDelayMs: 200, maxDelayMs: 2000 },\n      circuitBreaker: { failureThreshold: 5, cooldownMs: 30000 },\n    },\n  })\n);\n```\n\nOr pass a custom in-process render function (no HTTP endpoint needed):\n\n```ts\napp.use(\n  inertia({\n    ssr: {\n      enabled: true,\n      render: async (page) => {\n        return {\n          head: [`<title inertia>${page.props.title}</title>`],\n          body: '<div id=\"app\">...</div>',\n        };\n      },\n    },\n  })\n);\n```\n\nSet up the SSR server for your client framework following the [official Inertia.js SSR guide](https://inertiajs.com/docs/v3/advanced/server-side-rendering).\n\n---\n\n## Response API: `res.inertia()`\n\n### `res.inertia(component, props?, viewData?)`\n\nRenders an Inertia response. In AJAX (X-Inertia) requests it returns JSON; on full page loads it renders the root template with `viewData` passed only to the template:\n\n```ts\napp.get('/users', (req, res) => {\n  res.inertia('Users/Index', {\n    users: await getUsers(),\n  }, {\n    metaTitle: 'User Directory', // viewData: passed to base.ejs only\n  });\n});\n```\n\n### Form helpers\n\nSemantic form submission helpers with automatic method semantics:\n\n```ts\napp.post('/login', (req, res) => {\n  res.inertia.postForm('Dashboard', { user: req.body.user });\n});\n\napp.put('/profile', (req, res) => {\n  res.inertia.putForm('Profile', { name: req.body.name });\n});\n\napp.patch('/settings', (req, res) => {\n  res.inertia.patchForm('Settings', { theme: req.body.theme });\n});\n\napp.delete('/account', (req, res) => {\n  res.inertia.deleteForm('Goodbye');\n});\n```\n\n### Flash messages\n\n```ts\nres.inertia\n  .withFlash('success', 'Profile updated!')\n  .inertia('Dashboard');\n```\n\n### Redirect helpers\n\n```ts\n// External redirect / full reload (409 + X-Inertia-Location)\nres.inertia.location('https://stripe.com/checkout');\n\n// Back to referrer (303 See Other)\nres.inertia.back('/dashboard');\n```\n\n### History encryption (Inertia v2)\n\n```ts\nres.inertia.encryptHistory(true);\nres.inertia.clearHistory(true);\nres.inertia('SecretReport');\n```\n\n---\n\n## Prop Helpers (Lazy, Deferred, Merge)\n\nFine-grained control over what props are sent to the client:\n\n```ts\nimport { lazy, always, defer, merge, optional } from '@arponascension/express-inertia';\n\napp.get('/dashboard', (req, res) => {\n  res.inertia('Dashboard', {\n    summary: await getSummary(),\n\n    // Omitted on initial load; fetched only when explicitly reloaded\n    heavyReport: lazy(async () => calculateComplexMetrics()),\n\n    // Always included, even on partial reloads of other keys\n    announcements: always(async () => getLatestAnnouncements()),\n\n    // Inertia v2: appends to existing client-side list\n    feed: merge(async () => getFeedItems()),\n\n    // Inertia v2: fetched in background after initial render\n    chartData: defer(async () => getChartData(), { group: 'analytics' }),\n\n    // Inertia v2: included on initial load, then treated as optional on updates\n    extraSetting: optional(() => getExtraSetting()),\n  });\n});\n```\n\n---\n\n## Security Hardening\n\n### Component name validation\n\nPrevents path traversal and injection attacks:\n\n```ts\napp.use(\n  inertia({\n    security: {\n      validateComponentNames: true,\n      componentNamePattern: /^[\\w\\/-]+$/,\n    },\n  })\n);\n```\n\n### ViewData sanitization\n\nAutomatically strips functions and `undefined` values from template data. Independently configurable from component name validation via `sanitizeViewData`:\n\n```ts\napp.use(\n  inertia({\n    security: {\n      validateComponentNames: false, // allow arbitrary component names\n      sanitizeViewData: true, // still sanitize view data (default)\n    },\n  })\n);\n```\n\nSet `sanitizeViewData: false` to preserve functions and `undefined` values in template locals (e.g. when passing helper functions to your root view by design).\n\n### SRI hash generation\n\n```ts\nimport { generateSriHash } from '@arponascension/express-inertia';\n\nconst hash = await generateSriHash(assetContent);\n// sha384-abc123...\n```\n\n---\n\n## Structured Logging\n\nReplace `console.warn` with a pluggable logger:\n\n```ts\nimport { createLogger, setGlobalLogger } from '@arponascension/express-inertia';\nimport pino from 'pino';\n\nsetGlobalLogger(createLogger({ prefix: 'my-app', logger: pino() }));\n```\n\n### Request correlation IDs\n\n```ts\nimport { requestIdMiddleware } from '@arponascension/express-inertia';\n\napp.use(requestIdMiddleware());\napp.use(inertia());\n```\n\nCorrelates logs across the request lifecycle using `X-Request-ID` or auto-generated IDs.\n\n---\n\n## Edge Runtime Compatibility\n\nWorks on Cloudflare Workers, Vercel Edge, and Netlify Edge by bypassing Node.js `fs`/`path` — inject the manifest, config, and template source directly:\n\n```ts\nconst viteHelper = createViteHelper({\n  manifest: await fetch('/build/.vite/manifest.json').then(r => r.json()),\n  base: '/build/',\n  isDev: false,\n});\n\napp.engine('ejs', createInertiaEngine({\n  templateSource: await fetch('/templates/base.ejs').then(r => r.text()),\n  vite: { manifest: await getManifest() },\n}));\n```\n\n---\n\n## Resilience: Circuit Breaker & Retry\n\n### Circuit breaker (SSR)\n\nPrevents cascade failures when the SSR endpoint is down:\n\n```ts\nimport { CircuitBreaker, resetAllCircuitBreakers } from '@arponascension/express-inertia';\n\nconst breaker = new CircuitBreaker({\n  failureThreshold: 5,\n  cooldownMs: 30000,\n  probeDelayMs: 1000,\n});\n```\n\n### Retry with exponential backoff\n\n```ts\nimport { calculateBackoff } from '@arponascension/express-inertia';\n\nconst delay = calculateBackoff(attempt, 200, 2000);\n```\n\n---\n\n## Performance\n\n- **Tree-shakeable**: import only what you need (ESM + CJS dual builds)\n- **Template caching**: compiled EJS templates cached (mtime-based in development, ejs `cache: true` in production)\n- **Lazy props**: defer expensive computations until needed\n- **Prefetching**: preload likely navigation targets from the Vite manifest\n- **Minified bundle**: ~40KB main entry\n\n---\n\n## API Reference\n\n### Middleware\n\n| Export | Description |\n|---|---|\n| `inertia(options?)` | Inertia.js Express middleware factory |\n| `createInertia(options?)` | Same as `inertia`, explicit name |\n| `requestIdMiddleware()` | Assigns `req.id` for log correlation |\n| `createInertiaEngine(options?)` | EJS view engine with Inertia/Vite helpers |\n| `inertiaEngine` | Default engine instance |\n\n### Prop helpers\n\n| Export | Description |\n|---|---|\n| `lazy(fn)` | Omit on initial load |\n| `always(fn)` | Always include |\n| `defer(fn, opts?)` | Inertia v2 deferred prop |\n| `merge(fn)` | Inertia v2 merge prop |\n| `optional(fn)` | Inertia v2 optional prop |\n| `resolveProps(props, req, isInertia)` | Resolve all prop wrappers |\n\n### Utilities\n\n| Export | Description |\n|---|---|\n| `validateComponentName(name, pattern?)` | Prevent path traversal |\n| `sanitizeViewData(data)` | Strip functions from template data |\n| `serializePage(page)` | Safe JSON serialization for HTML attributes |\n| `safeStringify(obj)` | Circular-reference-safe JSON.stringify |\n| `generateSriHash(content)` | SHA-384 SRI hash |\n| `createLogger(opts?)` | Pluggable structured logger |\n| `setGlobalLogger(logger)` | Replace global logger |\n| `getGlobalLogger()` | Get current global logger |\n\n### Resilience\n\n| Export | Description |\n|---|---|\n| `CircuitBreaker` | CLOSED / OPEN / HALF_OPEN state machine |\n| `shouldRetry(error, status, codes)` | Retry decision helper |\n| `calculateBackoff(attempt, base, max)` | Exponential backoff with jitter |\n| `resetAllCircuitBreakers()` | Bulk reset for testing |\n\n### Vite\n\n| Export | Description |\n|---|---|\n| `createViteHelper(config?)` | Vite asset resolver |\n| `inertiaVitePlugin(opts?)` | Vite plugin — hot file + auto build config (`input`, `refresh`, `buildDirectory`) |\n| `createPrefetchHelper(viteHelper)` | Prefetch/preload tag generator |\n\n---\n\n## FAQ\n\n### What is Inertia.js?\n\nInertia.js is a protocol for building modern single-page applications (SPAs) using classic server-side routing and controllers, without building an API. Server routes render Vue, React, or Svelte page components; navigation between pages uses small JSON responses instead of full page reloads.\n\n### How do I use Inertia.js with Express?\n\nInstall `@arponascension/express-inertia`, register the `inertia()` middleware (plus the `createInertiaEngine()` EJS view engine), and return `res.inertia('Component', { props })` from your routes. See the [Quick Start](#quick-start-express--inertia--vue-3) above.\n\n### Does express-inertia support Vue 3, React, and Svelte?\n\nYes — the client side uses the official `@inertiajs/vue3`, `@inertiajs/react`, and `@inertiajs/svelte` packages, so whichever framework you use with Vite works with this adapter.\n\n### Does express-inertia support server-side rendering (SSR)?\n\nYes. Enable `ssr: { enabled: true }` and point it at the official Inertia SSR server (or pass a custom `render` function). SSR is protected by retries, exponential backoff, and a circuit breaker with client-side fallback.\n\n### What template engine does express-inertia use?\n\nEJS. A custom `createInertiaEngine()` is provided so templates load through Express's normal view engine mechanism, with Inertia and Vite helpers exposed as template locals (`inertia()`, `vite()`, `csrf()`, `inertiaHead()`, and more).\n\n### Is express-inertia compatible with edge runtimes?\n\nYes. Provide `manifest`/`isDev`/`devServerUrlOverride` and a `templateSource` so no Node.js `fs` or `path` access is required — it runs on Cloudflare Workers, Vercel Edge, and Netlify Edge.\n\n### Which versions of Node.js and Express are supported?\n\nNode.js `>=18` (tested on 18, 20, 22, 25.8.x) and Express `^4.18 || ^5`. See the [compatibility matrix](#compatibility-matrix).\n\n---\n\n## Compatibility Matrix\n\nThe following versions are exercised by the integration suite. Test your application before upgrading a major version.\n\n| Dependency | Supported | Tested |\n|---|---|---|\n| Node.js | >= 18 | 18, 20, 22, 25.8.x |\n| Express | ^4.18 \\|\\| ^5 | 4.22.x |\n| `@inertiajs/core` | 2.x | 2.3.27 |\n| Vue | 3.x | 3.5.42 |\n\n---\n\n## Testing\n\n```bash\nnpm test\n```\n\nRun the full test suite with [Vitest](https://vitest.dev). The suite includes Vue/Inertia protocol integration coverage and a real Vite production-manifest build.\n\n```bash\nnpm run typecheck   # TypeScript type checking\nnpm run lint        # ESLint\nnpm run test:coverage # Coverage report (v8)\n```\n\n---\n\n## Resources & Ecosystem\n\n- [Inertia.js Documentation](https://inertiajs.com/docs) — the official protocol, client setup, and SSR guide\n- [inertiajs/inertia](https://github.com/inertiajs/inertia) — the official client library monorepo (Vue, React, Svelte)\n- [Express.js](https://expressjs.com) — the Node.js web framework this adapter targets\n- [Vite](https://vite.dev) — the frontend build tool used for HMR and production bundles\n- [CHANGELOG.md](./CHANGELOG.md) — release notes\n- [CONTRIBUTING.md](./CONTRIBUTING.md) — how to contribute\n\nLooking for Inertia.js on another framework? Official adapters exist for [Laravel](https://inertiajs.com/docs/getting-started) and [Rails](https://github.com/inertiajs/inertia-rails), and community adapters cover Fastify, Hono, and more.\n\n---\n\n## License\n\nMIT © [Arpon Ascension](https://github.com/arponascension/)","readmeFilename":"README.md"}