UNPKG

@nx/angular

Version:

The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypre

21 lines (20 loc) 989 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setupHostIfDynamic = setupHostIfDynamic; const devkit_1 = require("@nx/devkit"); function setupHostIfDynamic(tree, options) { if (options.federationType === 'static') { return; } const project = (0, devkit_1.readProjectConfiguration)(tree, options.appName); const pathToMFManifest = (0, devkit_1.joinPathFragments)(project.root, 'public/module-federation.manifest.json'); if (!tree.exists(pathToMFManifest)) { tree.write(pathToMFManifest, '{}'); } const pathToProdWebpackConfig = (0, devkit_1.joinPathFragments)(project.root, `webpack.prod.config.${options.typescriptConfiguration ? 'ts' : 'js'}`); if (tree.exists(pathToProdWebpackConfig)) { tree.delete(pathToProdWebpackConfig); } delete project.targets.build.configurations.production?.customWebpackConfig; (0, devkit_1.updateProjectConfiguration)(tree, options.appName, project); }