Vite Plugin Next React Router
Description
A Next.js style routing vite plugin for react.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
vite-plugin-next-react-router
 
A Next.js style file system based routing plugin for vite, inspired by [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages).
Install
# with npm
npm install vite-plugin-next-react-router -D
# with yarn
yarn add vite-plugin-next-react-router -D
# with pnpm
pnpm add vite-plugin-next-react-router -D
Usage
Add plugin to your `vite.config.js`
import reactRouterPlugin from 'vite-plugin-next-react-router';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
//...
reactRouterPlugin(),
],
});
Config options like this, this is also the default config below:
export default defineConfig({
plugins: [
reactRouterPlugin({
pageDir: 'src/pages',
extensions: ['js', 'jsx', 'ts', 'tsx'],
// like '_app' in Next.js, `_document` is not supported since all rendering is done in client side
layout: '_layout',
}),
],
});
This plugin will scan your pages folder then automatically inject code to index html, you don't have to write any other code for initial rendering, just like Next.js. There is a example project under `/example/react` folder.
It follows most of the Next.js style file system based routing rules. You can check their docs [here](https://nextjs.org/docs/routing/introduction).
If you found any inconsistency with Next.js, please open an issue.
Related Skills
Algorithmic Art
Create generative art using p5.js with seeded randomness, flow fields, and particle systems
Design Brand Guidelines
Apply Anthropic's official brand colors and typography to artifacts
Design Canvas Design
Create beautiful visual art in PNG and PDF documents using design philosophy
Design Frontend Design
Create distinctive, production-grade frontend interfaces with high design quality
Design Slack Gif Creator
Create animated GIFs optimized for Slack's size constraints
Design Theme Factory
Style artifacts with professional themes including 10 pre-set color/font combinations
Design Related Agents
Codemod Runner
Writes and runs codemod scripts that replace hardcoded visual values with token references in ui/src/index.css
Designguru
Expert Design Guidance & Analysis Specialist who provides professional UI/UX insights, design system guidance,
Html Css
| Web standards for semantic markup, maintainable styling, and accessibility. | - | [wshobson/agents](https://