UNPKG

@nx/react-native

Version:

The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: -Integration with libraries such as Jest, Detox, and Storybook. -Scaffolding for creating buildable libraries th

30 lines (29 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = update; const devkit_1 = require("@nx/devkit"); /** * Remove metro-* package since it is no longer explicity required in package.json. * react-native has dependency of @react-native/community-cli-plugin * @react-native/community-cli-plugin has dependency of metro * * Also remove @react-native-community/cli-* since it is a dependency of react-native. * (excpet reactNativeCommunityCliPlatformAndroidVersion because android files refer it by path) * * https://react-native-community.github.io/upgrade-helper/?from=0.72.6&to=0.73.1#RnDiffApp-package.json * @param tree * @returns */ async function update(tree) { (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], [ 'metro', 'metro-resolver', 'metro-config', 'metro-react-native-babel-preset', 'metro-babel-register', 'metro-react-native-babel-transformer', '@react-native-community/cli', '@react-native-community/cli-platform-ios', ]); await (0, devkit_1.formatFiles)(tree); }