UNPKG

@nx/expo

Version:

The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.

20 lines (19 loc) 712 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = update; const devkit_1 = require("@nx/devkit"); const path_1 = require("path"); /** * This function removes the deprecated webpack.config.js file from projects that use the expo:start executor * @param tree */ async function update(tree) { const projects = (0, devkit_1.getProjects)(tree); for (const [_, config] of projects.entries()) { if (config.targets?.['start']?.executor === '@nx/expo:start') { if (tree.exists((0, path_1.join)(config.root, 'webpack.config.js'))) { tree.delete((0, path_1.join)(config.root, 'webpack.config.js')); } } } }