This commit is contained in:
parent
a592af1eb3
commit
ba657da7c5
@ -4,7 +4,7 @@ import {
|
|||||||
readCachedProjectGraph,
|
readCachedProjectGraph,
|
||||||
} from '@nrwl/devkit';
|
} from '@nrwl/devkit';
|
||||||
import { readCachedProjectConfiguration } from 'nx/src/project-graph/project-graph';
|
import { readCachedProjectConfiguration } from 'nx/src/project-graph/project-graph';
|
||||||
import { extname, join } from 'path';
|
import { extname } from 'path';
|
||||||
import {
|
import {
|
||||||
getNpmPackageSharedConfig,
|
getNpmPackageSharedConfig,
|
||||||
SharedLibraryConfig,
|
SharedLibraryConfig,
|
||||||
@ -59,7 +59,11 @@ function mapRemotes(remotes: MFRemotes) {
|
|||||||
const remoteLocationExt = extname(remoteLocation);
|
const remoteLocationExt = extname(remoteLocation);
|
||||||
mappedRemotes[remoteName] = ['.js', '.mjs'].includes(remoteLocationExt)
|
mappedRemotes[remoteName] = ['.js', '.mjs'].includes(remoteLocationExt)
|
||||||
? remoteLocation
|
? remoteLocation
|
||||||
: join(remoteLocation, 'remoteEntry.mjs');
|
: `${
|
||||||
|
remoteLocation.endsWith('/')
|
||||||
|
? remoteLocation.slice(0, -1)
|
||||||
|
: remoteLocation
|
||||||
|
}/remoteEntry.mjs`;
|
||||||
} else if (typeof remote === 'string') {
|
} else if (typeof remote === 'string') {
|
||||||
mappedRemotes[remote] = determineRemoteUrl(remote);
|
mappedRemotes[remote] = determineRemoteUrl(remote);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import {
|
|||||||
SharedLibraryConfig,
|
SharedLibraryConfig,
|
||||||
} from './models';
|
} from './models';
|
||||||
import { readRootPackageJson } from './package-json';
|
import { readRootPackageJson } from './package-json';
|
||||||
import { extname, join } from 'path';
|
import { extname } from 'path';
|
||||||
import ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
|
import ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
|
||||||
|
|
||||||
function collectDependencies(
|
function collectDependencies(
|
||||||
@ -133,7 +133,11 @@ function mapRemotes(remotes: Remotes, projectGraph: ProjectGraph) {
|
|||||||
const remoteLocationExt = extname(remoteLocation);
|
const remoteLocationExt = extname(remoteLocation);
|
||||||
mappedRemotes[remoteName] = ['.js', '.mjs'].includes(remoteLocationExt)
|
mappedRemotes[remoteName] = ['.js', '.mjs'].includes(remoteLocationExt)
|
||||||
? remoteLocation
|
? remoteLocation
|
||||||
: join(remoteLocation, 'remoteEntry.js');
|
: `${
|
||||||
|
remoteLocation.endsWith('/')
|
||||||
|
? remoteLocation.slice(0, -1)
|
||||||
|
: remoteLocation
|
||||||
|
}/remoteEntry.js`;
|
||||||
} else if (typeof remote === 'string') {
|
} else if (typeof remote === 'string') {
|
||||||
mappedRemotes[remote] = determineRemoteUrl(remote, projectGraph);
|
mappedRemotes[remote] = determineRemoteUrl(remote, projectGraph);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user