@farfetch/blackout-react-native-metro-transformer v0.2.1
@farfetch/blackout-react-native-metro-transformer
Custom transformer for metro to be used by FPS react-native apps.
Imported package.json files will have all their fields removed from the bundle, except for the name and version fields. This reduces final bundle size.
Installation
yarn
yarn add @farfetch/blackout-react-native-metro-transformernpm
npm i @farfetch/blackout-react-native-metro-transformerUsage
This was tested for
metroversions 0.59 and higher but it is possible that it works in lower versions ofmetroif they support thetransformerPathconfiguration key inmetro.config.js. Make sure the version ofmetroyou are using satisfies this constraint.
Configure the transformer for your app:
- Create a
metro.config.jsfile in the root directory of your react-native project. - Edit the file to include a
transformerPathpointing to this module.module.exports = { transformerPath: require.resolve( '@farfetch/blackout-react-native-metro-transformer', ), };
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Please read the CONTRIBUTING file to know what we expect from your contribution and the guidelines you should follow.
License
MIT @ Farfetch