@csr632/vite-plugin-react

React fast refresh plugin for Vite


Keywords
vite, react, hmr
License
MIT
Install
npm install @csr632/vite-plugin-react@1.1.1

Documentation

vite-plugin-react

Provides React Fast Refresh support for Vite.

Note: Vite requires using @pika/react and @pika/react-dom which are ESM mirrors of the official React packages. This plugin automatically injects the correct alias for you so you can just import React from 'react' as usual.

This plugin is included by default in the create-vite-app React template.

// vite.config.js
module.exports = {
  jsx: 'react',
  plugins: [require('vite-plugin-react')]
}