UNPKG

@nx/module-federation

Version:

The Nx Plugin for Module Federation contains executors and utilities that support building applications using Module Federation.

18 lines (17 loc) 546 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyDefaultEagerPackages = applyDefaultEagerPackages; function applyDefaultEagerPackages(sharedConfig) { const DEFAULT_REACT_PACKAGES_TO_LOAD_EAGERLY = [ 'react', 'react-dom', 'react-router-dom', 'react-router', ]; for (const pkg of DEFAULT_REACT_PACKAGES_TO_LOAD_EAGERLY) { if (!sharedConfig[pkg]) { continue; } sharedConfig[pkg] = { ...sharedConfig[pkg], eager: true }; } }