/react-compiler-runtime-polyfill

A simple polyfill for react-compiler-runtime, designed to provide developers who cannot upgrade to React 19 at the moment with the ability to use react-compiler.

Primary LanguageTypeScriptMIT LicenseMIT

react-compiler-runtime-polyfill

NPM version bundle JSDocs License

This is a simple polyfill for react-compiler-runtime, designed to provide developers who cannot upgrade to React 19 at the moment with the ability to use react-compiler.

Usage

Configure the runtimeModule field for your Babel plugin:

// babel.config.js
module.exports = function (api) {
  return {
    plugins: [
      [
        'babel-plugin-react-compiler',
        {
          runtimeModule: 'react-compiler-runtime-polyfill'
        }
      ]
    ]
  }
}

That`s all!

Credit

https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43

License

MIT License © 2023 Riri