@nx/rspack 0.0.0-pr-29047-57d3073 → 0.0.0-pr-28808-eac89e6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/migrations.json CHANGED
@@ -1,5 +1,12 @@
1
1
  {
2
- "generators": {},
2
+ "generators": {
3
+ "update-20-2-0-update-with-module-federation-import": {
4
+ "cli": "nx",
5
+ "version": "20.2.0-beta.3",
6
+ "description": "Update the withModuleFederation import use @nx/module-federation/rspack.",
7
+ "factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package"
8
+ }
9
+ },
3
10
  "packageJsonUpdates": {
4
11
  "18.1.0": {
5
12
  "version": "18.1.0-beta.0",
@@ -1 +1,4 @@
1
- export * from './src/utils/module-federation/public-api';
1
+ /**
2
+ * @deprecated Use `@nx/module-federation/rspack` instead. This will be removed in Nx v22.
3
+ */
4
+ export { withModuleFederation, withModuleFederationForSSR, } from '@nx/module-federation/rspack';
@@ -1,4 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./src/utils/module-federation/public-api"), exports);
3
+ exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
4
+ /**
5
+ * @deprecated Use `@nx/module-federation/rspack` instead. This will be removed in Nx v22.
6
+ */
7
+ var rspack_1 = require("@nx/module-federation/rspack");
8
+ Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return rspack_1.withModuleFederation; } });
9
+ Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return rspack_1.withModuleFederationForSSR; } });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "0.0.0-pr-29047-57d3073",
4
+ "version": "0.0.0-pr-28808-eac89e6",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "0.0.0-pr-29047-57d3073",
28
- "@nx/devkit": "0.0.0-pr-29047-57d3073",
29
- "@nx/web": "0.0.0-pr-29047-57d3073",
30
- "@nx/module-federation": "0.0.0-pr-29047-57d3073",
27
+ "@nx/js": "0.0.0-pr-28808-eac89e6",
28
+ "@nx/devkit": "0.0.0-pr-28808-eac89e6",
29
+ "@nx/web": "0.0.0-pr-28808-eac89e6",
30
+ "@nx/module-federation": "0.0.0-pr-28808-eac89e6",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.1.2",
33
33
  "@rspack/dev-server": "^1.0.9",
@@ -97,7 +97,7 @@
97
97
  "extractLicenses": {
98
98
  "type": "boolean",
99
99
  "description": "Extract all licenses in a separate file.",
100
- "default": true
100
+ "default": false
101
101
  },
102
102
  "fileReplacements": {
103
103
  "description": "Replace files with other files in the build.",
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
6
  const package_json_1 = require("nx/package.json");
8
7
  const configuration_1 = tslib_1.__importDefault(require("../configuration/configuration"));
9
8
  const init_1 = tslib_1.__importDefault(require("../init/init"));
10
9
  const normalize_options_1 = require("./lib/normalize-options");
11
10
  async function default_1(tree, _options) {
12
- (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'rspack', 'application');
13
11
  const tasks = [];
14
12
  const initTask = await (0, init_1.default)(tree, {
15
13
  ..._options,
@@ -3,12 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configurationGenerator = configurationGenerator;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
6
  const generator_utils_1 = require("../../utils/generator-utils");
8
7
  const create_ts_config_1 = require("../application/lib/create-ts-config");
9
8
  const init_1 = tslib_1.__importDefault(require("../init/init"));
10
9
  async function configurationGenerator(tree, options) {
11
- (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'rspack', 'configuration');
12
10
  const task = await (0, init_1.default)(tree, {
13
11
  ...options,
14
12
  // TODO: Crystalize the default rspack.config.js file.
@@ -119,7 +119,7 @@ function transformModuleFederationConfig(tree, configPath, scope) {
119
119
  if (configContents.charAt(endIndex) === ',') {
120
120
  endIndex++;
121
121
  }
122
- const newContents = `const { ModuleFederationConfig } = require('@nx/rspack/module-federation');
122
+ const newContents = `const { ModuleFederationConfig } = require('@nx/module-federation');
123
123
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
124
124
  tree.write(configPath, newContents);
125
125
  }
@@ -141,7 +141,7 @@ function transformWithModuleFederation(tree, configPath, scope) {
141
141
  if (configContents.charAt(endIndex) === ',') {
142
142
  endIndex++;
143
143
  }
144
- const newContents = `const { withModuleFederation } = require('@nx/rspack/module-federation');
144
+ const newContents = `const { withModuleFederation } = require('@nx/module-federation/rspack');
145
145
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
146
146
  tree.write(configPath, newContents);
147
147
  }
@@ -163,7 +163,7 @@ function transformWithModuleFederationSSR(tree, configPath, scope) {
163
163
  if (configContents.charAt(endIndex) === ',') {
164
164
  endIndex++;
165
165
  }
166
- const newContents = `const { withModuleFederationForSSR } = require('@nx/rspack/module-federation');
166
+ const newContents = `const { withModuleFederationForSSR } = require('@nx/module-federation/rspack');
167
167
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
168
168
  tree.write(configPath, newContents);
169
169
  }
@@ -119,7 +119,7 @@ function transformWithModuleFederation(tree, configPath, scope) {
119
119
  if (configContents.charAt(endIndex) === ',') {
120
120
  endIndex++;
121
121
  }
122
- const newContents = `import { withModuleFederation } from '@nx/rspack/module-federation';
122
+ const newContents = `import { withModuleFederation } from '@nx/module-federation/rspack';
123
123
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
124
124
  tree.write(configPath, newContents);
125
125
  }
@@ -141,7 +141,7 @@ function transformModuleFederationConfig(tree, configPath, scope) {
141
141
  if (configContents.charAt(endIndex) === ',') {
142
142
  endIndex++;
143
143
  }
144
- const newContents = `import { ModuleFederationConfig } from '@nx/rspack/module-federation';
144
+ const newContents = `import { ModuleFederationConfig } from '@nx/module-federation';
145
145
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
146
146
  tree.write(configPath, newContents);
147
147
  }
@@ -163,7 +163,7 @@ function transformWithModuleFederationSSR(tree, configPath, scope) {
163
163
  if (configContents.charAt(endIndex) === ',') {
164
164
  endIndex++;
165
165
  }
166
- const newContents = `import { withModuleFederationForSSR } from '@nx/rspack/module-federation';
166
+ const newContents = `import { withModuleFederationForSSR } from '@nx/module-federation/rspack';
167
167
  ${configContents.slice(0, startIndex)}${configContents.slice(endIndex)}`;
168
168
  tree.write(configPath, newContents);
169
169
  }
@@ -5,11 +5,9 @@ exports.rspackInitGenerator = rspackInitGenerator;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
7
7
  const js_1 = require("@nx/js");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
8
  const plugin_1 = require("../../../plugin");
10
9
  const versions_1 = require("../../utils/versions");
11
10
  async function rspackInitGenerator(tree, schema) {
12
- (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'rspack', 'init');
13
11
  const tasks = [];
14
12
  const nxJson = (0, devkit_1.readNxJson)(tree);
15
13
  const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
@@ -0,0 +1,2 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function migrateWithMfImport(tree: Tree): Promise<void>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrateWithMfImport;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
7
+ const NX_RSPACK_MODULE_FEDERATION_IMPORT_SELECTOR = 'ImportDeclaration > StringLiteral[value=@nx/rspack/module-federation], VariableStatement CallExpression:has(Identifier[name=require]) > StringLiteral[value=@nx/rspack/module-federation]';
8
+ const NEW_IMPORT_PATH = `'@nx/module-federation/rspack'`;
9
+ async function migrateWithMfImport(tree) {
10
+ const projects = new Set();
11
+ (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/rspack:module-federation-dev-server', (options, project, target) => {
12
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
13
+ projects.add(projectConfig.root);
14
+ });
15
+ for (const projectRoot of projects) {
16
+ (0, devkit_1.visitNotIgnoredFiles)(tree, projectRoot, (filePath) => {
17
+ if (!filePath.endsWith('.ts') && !filePath.endsWith('.js')) {
18
+ return;
19
+ }
20
+ let contents = tree.read(filePath, 'utf-8');
21
+ if (!contents.includes('@nx/rspack/module-federation')) {
22
+ return;
23
+ }
24
+ const ast = tsquery_1.tsquery.ast(contents);
25
+ const importNodes = (0, tsquery_1.tsquery)(ast, NX_RSPACK_MODULE_FEDERATION_IMPORT_SELECTOR);
26
+ if (importNodes.length === 0) {
27
+ return;
28
+ }
29
+ const importPathNode = importNodes[0];
30
+ contents = `${contents.slice(0, importPathNode.getStart())}${NEW_IMPORT_PATH}${contents.slice(importPathNode.getEnd())}`;
31
+ tree.write(filePath, contents);
32
+ });
33
+ }
34
+ await (0, devkit_1.formatFiles)(tree);
35
+ }
@@ -1,3 +0,0 @@
1
- import { withModuleFederation } from './with-module-federation/with-module-federation';
2
- import { withModuleFederationForSSR } from './with-module-federation/with-module-federation-ssr';
3
- export { withModuleFederation, withModuleFederationForSSR };
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
4
- const with_module_federation_1 = require("./with-module-federation/with-module-federation");
5
- Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
6
- const with_module_federation_ssr_1 = require("./with-module-federation/with-module-federation-ssr");
7
- Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return with_module_federation_ssr_1.withModuleFederationForSSR; } });
@@ -1,12 +0,0 @@
1
- import { ModuleFederationConfig } from '@nx/module-federation';
2
- export declare function getFunctionDeterminateRemoteUrl(isServer?: boolean): (remote: string) => string;
3
- export declare function getModuleFederationConfig(mfConfig: ModuleFederationConfig, options?: {
4
- isServer: boolean;
5
- determineRemoteUrl?: (remote: string) => string;
6
- }): Promise<{
7
- sharedLibraries: import("@nx/module-federation").SharedWorkspaceLibraryConfig;
8
- sharedDependencies: {
9
- [x: string]: import("@nx/module-federation").SharedLibraryConfig;
10
- };
11
- mappedRemotes: {};
12
- }>;
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFunctionDeterminateRemoteUrl = getFunctionDeterminateRemoteUrl;
4
- exports.getModuleFederationConfig = getModuleFederationConfig;
5
- const devkit_1 = require("@nx/devkit");
6
- const project_graph_1 = require("nx/src/project-graph/project-graph");
7
- const module_federation_1 = require("@nx/module-federation");
8
- function getFunctionDeterminateRemoteUrl(isServer = false) {
9
- const target = 'serve';
10
- const remoteEntry = isServer ? 'server/remoteEntry.js' : 'remoteEntry.js';
11
- return function (remote) {
12
- const mappedStaticRemotesFromEnv = process.env
13
- .NX_MF_DEV_SERVER_STATIC_REMOTES
14
- ? JSON.parse(process.env.NX_MF_DEV_SERVER_STATIC_REMOTES)
15
- : undefined;
16
- if (mappedStaticRemotesFromEnv && mappedStaticRemotesFromEnv[remote]) {
17
- return `${mappedStaticRemotesFromEnv[remote]}/${remoteEntry}`;
18
- }
19
- let remoteConfiguration = null;
20
- try {
21
- remoteConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(remote);
22
- }
23
- catch (e) {
24
- throw new Error(`Cannot find remote: "${remote}". Check that the remote name is correct in your module federation config file.\n`);
25
- }
26
- const serveTarget = remoteConfiguration?.targets?.[target];
27
- if (!serveTarget) {
28
- throw new Error(`Cannot automatically determine URL of remote (${remote}). Looked for property "host" in the project's "${serveTarget}" target.\n
29
- You can also use the tuple syntax in your rspack config to configure your remotes. e.g. \`remotes: [['remote1', 'http://localhost:4201']]\``);
30
- }
31
- const host = serveTarget.options?.host ??
32
- `http${serveTarget.options.ssl ? 's' : ''}://localhost`;
33
- const port = serveTarget.options?.port ?? 4201;
34
- return `${host.endsWith('/') ? host.slice(0, -1) : host}:${port}/${remoteEntry}`;
35
- };
36
- }
37
- async function getModuleFederationConfig(mfConfig, options = { isServer: false }) {
38
- let projectGraph;
39
- try {
40
- projectGraph = (0, devkit_1.readCachedProjectGraph)();
41
- }
42
- catch (e) {
43
- projectGraph = await (0, devkit_1.createProjectGraphAsync)();
44
- }
45
- const project = projectGraph.nodes[mfConfig.name]?.data;
46
- if (!project) {
47
- throw Error(`Cannot find project "${mfConfig.name}". Check that the name is correct in module-federation.config.js`);
48
- }
49
- const dependencies = (0, module_federation_1.getDependentPackagesForProject)(projectGraph, mfConfig.name);
50
- if (mfConfig.shared) {
51
- dependencies.workspaceLibraries = dependencies.workspaceLibraries.filter((lib) => mfConfig.shared(lib.importKey, {}) !== false);
52
- dependencies.npmPackages = dependencies.npmPackages.filter((pkg) => mfConfig.shared(pkg, {}) !== false);
53
- }
54
- const sharedLibraries = (0, module_federation_1.shareWorkspaceLibraries)(dependencies.workspaceLibraries);
55
- const npmPackages = (0, module_federation_1.sharePackages)(dependencies.npmPackages);
56
- const sharedDependencies = {
57
- ...sharedLibraries.getLibraries(project.root),
58
- ...npmPackages,
59
- };
60
- (0, module_federation_1.applySharedFunction)(sharedDependencies, mfConfig.shared);
61
- (0, module_federation_1.applyAdditionalShared)(sharedDependencies, mfConfig.additionalShared, projectGraph);
62
- // Choose the correct mapRemotes function based on the server state.
63
- const mapRemotesFunction = options.isServer ? module_federation_1.mapRemotesForSSR : module_federation_1.mapRemotes;
64
- // Determine the URL function, either from provided options or by using a default.
65
- const determineRemoteUrlFunction = options.determineRemoteUrl
66
- ? options.determineRemoteUrl
67
- : getFunctionDeterminateRemoteUrl(options.isServer);
68
- // Map the remotes if they exist, otherwise default to an empty object.
69
- let mappedRemotes = {};
70
- if (mfConfig.remotes && mfConfig.remotes.length > 0) {
71
- mappedRemotes = mapRemotesFunction(mfConfig.remotes, 'js', determineRemoteUrlFunction, true);
72
- }
73
- return { sharedLibraries, sharedDependencies, mappedRemotes };
74
- }
@@ -1,3 +0,0 @@
1
- import { ModuleFederationConfig, NxModuleFederationConfigOverride } from '@nx/module-federation';
2
- import { NxRspackExecutionContext } from '../../config';
3
- export declare function withModuleFederationForSSR(options: ModuleFederationConfig, configOverride?: NxModuleFederationConfigOverride): Promise<(config: any, { context }: NxRspackExecutionContext) => any>;
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withModuleFederationForSSR = withModuleFederationForSSR;
4
- const core_1 = require("@rspack/core");
5
- const utils_1 = require("./utils");
6
- async function withModuleFederationForSSR(options, configOverride) {
7
- if (global.NX_GRAPH_CREATION) {
8
- return (config) => config;
9
- }
10
- const { sharedLibraries, sharedDependencies, mappedRemotes } = await (0, utils_1.getModuleFederationConfig)(options, {
11
- isServer: true,
12
- });
13
- return (config, { context }) => {
14
- config.target = 'async-node';
15
- config.output.uniqueName = options.name;
16
- config.output.library = {
17
- type: 'commonjs-module',
18
- };
19
- config.optimization = {
20
- ...(config.optimization ?? {}),
21
- runtimeChunk: false,
22
- };
23
- config.plugins.push(
24
- // eslint-disable-next-line @typescript-eslint/no-var-requires
25
- new (require('@module-federation/enhanced/rspack').ModuleFederationPlugin)({
26
- name: options.name.replace(/-/g, '_'),
27
- filename: 'remoteEntry.js',
28
- exposes: options.exposes,
29
- remotes: mappedRemotes,
30
- shared: {
31
- ...sharedDependencies,
32
- },
33
- isServer: true,
34
- library: {
35
- type: 'commonjs-module',
36
- },
37
- remoteType: 'script',
38
- /**
39
- * Apply user-defined config overrides
40
- */
41
- ...(configOverride ? configOverride : {}),
42
- runtimePlugins: process.env.NX_MF_DEV_REMOTES &&
43
- !options.disableNxRuntimeLibraryControlPlugin
44
- ? [
45
- ...(configOverride?.runtimePlugins ?? []),
46
- require.resolve('@module-federation/node/runtimePlugin'),
47
- require.resolve('@nx/module-federation/src/utils/plugins/runtime-library-control.plugin.js'),
48
- ]
49
- : [
50
- ...(configOverride?.runtimePlugins ?? []),
51
- require.resolve('@module-federation/node/runtimePlugin'),
52
- ],
53
- virtualRuntimeEntry: true,
54
- }, {}), sharedLibraries.getReplacementPlugin());
55
- // The env var is only set from the module-federation-dev-server
56
- // Attach the runtime plugin
57
- config.plugins.push(new core_1.DefinePlugin({
58
- 'process.env.NX_MF_DEV_REMOTES': process.env.NX_MF_DEV_REMOTES,
59
- }));
60
- return config;
61
- };
62
- }
@@ -1,8 +0,0 @@
1
- import type { Configuration } from '@rspack/core';
2
- import { ModuleFederationConfig, NxModuleFederationConfigOverride } from '@nx/module-federation';
3
- import { NxRspackExecutionContext } from '../../config';
4
- /**
5
- * @param {ModuleFederationConfig} options
6
- * @param {NxModuleFederationConfigOverride} configOverride
7
- */
8
- export declare function withModuleFederation(options: ModuleFederationConfig, configOverride?: NxModuleFederationConfigOverride): Promise<(config: Configuration, { context }: NxRspackExecutionContext) => Configuration>;
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withModuleFederation = withModuleFederation;
4
- const rspack_1 = require("@module-federation/enhanced/rspack");
5
- const core_1 = require("@rspack/core");
6
- const utils_1 = require("./utils");
7
- const isVarOrWindow = (libType) => libType === 'var' || libType === 'window';
8
- /**
9
- * @param {ModuleFederationConfig} options
10
- * @param {NxModuleFederationConfigOverride} configOverride
11
- */
12
- async function withModuleFederation(options, configOverride) {
13
- if (global.NX_GRAPH_CREATION) {
14
- return function makeConfig(config) {
15
- return config;
16
- };
17
- }
18
- const { sharedDependencies, sharedLibraries, mappedRemotes } = await (0, utils_1.getModuleFederationConfig)(options);
19
- const isGlobal = isVarOrWindow(options.library?.type);
20
- return function makeConfig(config, { context }) {
21
- config.output.uniqueName = options.name;
22
- config.output.publicPath = 'auto';
23
- if (isGlobal) {
24
- config.output.scriptType = 'text/javascript';
25
- }
26
- config.optimization = {
27
- ...(config.optimization ?? {}),
28
- runtimeChunk: false,
29
- };
30
- if (config.mode === 'development' &&
31
- Object.keys(mappedRemotes).length > 1 &&
32
- !options.exposes) {
33
- config.optimization.runtimeChunk = 'single';
34
- }
35
- config.plugins.push(new rspack_1.ModuleFederationPlugin({
36
- name: options.name.replace(/-/g, '_'),
37
- filename: 'remoteEntry.js',
38
- exposes: options.exposes,
39
- remotes: mappedRemotes,
40
- shared: {
41
- ...sharedDependencies,
42
- },
43
- /**
44
- * remoteType: 'script' is required for the remote to be loaded as a script tag.
45
- * remotes will need to be defined as:
46
- * { appX: 'appX@http://localhost:3001/remoteEntry.js' }
47
- * { appY: 'appY@http://localhost:3002/remoteEntry.js' }
48
- */
49
- ...(isGlobal ? { remoteType: 'script' } : {}),
50
- /**
51
- * Apply user-defined config overrides
52
- */
53
- ...(configOverride ? configOverride : {}),
54
- runtimePlugins: process.env.NX_MF_DEV_REMOTES &&
55
- !options.disableNxRuntimeLibraryControlPlugin
56
- ? [
57
- ...(configOverride?.runtimePlugins ?? []),
58
- require.resolve('@nx/module-federation/src/utils/plugins/runtime-library-control.plugin.js'),
59
- ]
60
- : configOverride?.runtimePlugins,
61
- virtualRuntimeEntry: true,
62
- }), sharedLibraries.getReplacementPlugin());
63
- // The env var is only set from the module-federation-dev-server
64
- // Attach the runtime plugin
65
- config.plugins.push(new core_1.DefinePlugin({
66
- 'process.env.NX_MF_DEV_REMOTES': process.env.NX_MF_DEV_REMOTES,
67
- }));
68
- return config;
69
- };
70
- }