Vite Plugin Pagefiles

JSON →
library 0.4.2 ·javascript
verified Apr 27, 2026

Vite plugin that statically extracts metadata from React component files and generates client-side route declarations, currently at version 0.4.2 (pre-release, API unstable). Instead of file-system-based routing, this plugin allows developers to define routes inline within component files using a Meta export, providing flexibility in code organization. It generates a virtual module 'virtual:pagefiles' containing route configurations. Currently supports React only, but extensible to other frameworks. Releases are on GitHub but no fixed cadence. Key differentiator: route metadata lives inside the component file, not the file path, decoupling URL structure from file organization.

total hits 11
actors 3 distinct systems
last hit 5d ago Bingbot
GPTBot
5
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · ET · MA