Skip to content

Commit 0f033fe

Browse files
committed
fix: Set name by default
1 parent 9f04774 commit 0f033fe

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

apps/mfe2/federation.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const {
44
} = require('@angular-architects/native-federation/config');
55

66
module.exports = withNativeFederation({
7+
name: "mfe2",
78
shared: {
89
...shareAll({
910
singleton: true,

apps/playground/federation.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const {
44
} = require('@angular-architects/native-federation/config');
55

66
module.exports = withNativeFederation({
7+
name: "playground-shell",
78
shared: {
89
...shareAll({
910
singleton: true,

libs/native-federation-core/src/lib/core/bundle-shared.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,11 @@ export async function bundleShared(
107107

108108
let bundleResult: BuildResult[] | null = null;
109109

110-
const internalImports = new Set(Object.keys(sharedBundles));
111110
try {
112111
bundleResult = await bundle({
113112
entryPoints,
114113
tsConfigPath: fedOptions.tsConfig,
115-
external: [
116-
...additionalExternals,
117-
...externals.filter((e) => !internalImports.has(e)),
118-
],
114+
external: [...additionalExternals, ...externals],
119115
outdir: cacheOptions.pathToCache,
120116
mappedPaths: config.sharedMappings,
121117
dev: fedOptions.dev,

libs/native-federation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ The host configuration (`projects/shell/federation.config.js`) looks like what y
175175
const { withNativeFederation, shareAll } = require('@angular-architects/native-federation/config');
176176

177177
module.exports = withNativeFederation({
178+
name: 'my-host',
178179
shared: {
179180
...shareAll({
180181
singleton: true,

libs/native-federation/src/schematics/init/files/federation.config.js__tmpl__

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const { withNativeFederation, shareAll } = require('@angular-architects/native-federation/config');
22

33
module.exports = withNativeFederation({
4-
<% if (type === 'remote') { %>
54
name: '<%=project%>',
65

6+
<% if (type === 'remote') { %>
7+
78
exposes: {
89
'./Component': './<%=appComponentPath%>',
910
},

0 commit comments

Comments
 (0)