0.2.0 β’ Published 1 year ago
@rnx-kit/polyfills v0.2.0
@rnx-kit/polyfills
π§π§π§π§π§π§π§π§π§π§π§
THIS TOOL IS EXPERIMENTAL β USE WITH CAUTION
π§π§π§π§π§π§π§π§π§π§π§
This is a polyfills "autolinker" for React Native. It works like native module autolinking, but gathers polyfills from dependencies instead.
Motivation
Please read the Modularity section of the React Native WebAPIs RFC for its raison d'Γͺtre.
Installation
yarn add @rnx-kit/polyfills --devor if you're using npm
npm add --save-dev @rnx-kit/polyfillsUsage
Add the Babel plugin:
// babel.config.js module.exports = { presets: ["module:@react-native/babel-preset"], + plugins: [require("@rnx-kit/polyfills")], };In your
index.ts(orindex.js), add the following comment at the top of the file:// @react-native-webapis