@nx/expo
Version:
20 lines (19 loc) • 712 B
JavaScript
;
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'));
}
}
}
}