@farfetch/blackout-react-native-metro-transformer
v0.2.1
Published
Custom transformer for metro to be used by FPS react-native apps
Downloads
2
Readme
@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-transformer
npm
npm i @farfetch/blackout-react-native-metro-transformer
Usage
This was tested for
metro
versions 0.59 and higher but it is possible that it works in lower versions ofmetro
if they support thetransformerPath
configuration key inmetro.config.js
. Make sure the version ofmetro
you are using satisfies this constraint.
Configure the transformer for your app:
- Create a
metro.config.js
file in the root directory of your react-native project. - Edit the file to include a
transformerPath
pointing 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