vitejs / vite-plugin-react-pages

A vite framework for building react app. Especially suitable for document site and demos/playgrounds of react components.
https://vitejs.github.io/vite-plugin-react-pages/
MIT License
453 stars 70 forks source link
mdx react storybook vite vite-pages

📘 vite-plugin-react-pages

npm package

vite-plugin-react-pages (vite-pages) is a React app framework powered by vite. It is very suitable for:

It provides many features that help developers build a React App quickly:

Translation of this README

Getting stated

Try it online on StackBlitz

You can play with these demo projects in your browser, without installing anything on your machine.

Initialize a demo project locally

  1. Initialize a vite-pages project (with npm 7+):
    • execute npm init vite-pages app-demo -- --template app to initialize an app project, or
    • execute npm init vite-pages library-demo -- --template lib to initialize a library project, or
    • execute npm init vite-pages library-monorepo-demo -- --template lib-monorepo to initialize a library project with monorepo setup.
    • If you are using npm 6.x, the extra double-dash before --template should be deleted. For example, npm init vite-pages app-demo --template app.
  2. npm install
  3. npm run dev and play with the local dev environment.
  4. npm run build.
  5. npm run ssr. You can disable javascript in your browser, to verify if it can still render.

Read the documentation

Read the documentation of vite-plugin-react-pages.