github vitejs/vite-plugin-react plugin-react@4.3.1

latest releases: plugin-rsc@0.5.24, plugin-rsc@0.5.23, plugin-rsc@0.5.22...
22 months ago

Fix support for React Compiler with React 18

The previous version made this assumption that the compiler was only usable with React 19, but it's possible to use it with React 18 and a custom runtimeModule: https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43

When using a custom runtimeModule, the plugin will not try to pre-optimize react/compiler-runtime dependency.

Reminder: Vite expect code outside of node_modules to be ESM, so you will need to update the gist with import React from 'react'.

Don't miss a new vite-plugin-react release

NewReleases is sending notifications on new releases.