Skip to content

Commit 51de3e9

Browse files
committed
.
1 parent 9d1171b commit 51de3e9

5 files changed

Lines changed: 12 additions & 3 deletions

File tree

angular.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@
149149
"production": {
150150
"target": "first-mf:esbuild:production"
151151
},
152+
"demo": {
153+
"target": "first-mf:esbuild:production",
154+
"baseHref": "/mfe-angular/first-mf/"
155+
},
152156
"development": {
153157
"target": "first-mf:esbuild:development",
154158
"dev": true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build:all": "concurrently \"npm run build:shell\" \"npm run build:first-mf\" \"npm run build:template-editor\"",
1818
"serve:all": "concurrently \"npm run serve:shell\" \"npm run serve:first-mf\" \"npm run serve:template-editor\"",
1919

20-
"build:all:demo": "concurrently \"ng build shell --configuration=demo\" \"ng build first-mf --base-href /mfe-angular/first-mf/\" \"cd projects/template-editor && vite build --mode demo\""
20+
"build:all:demo": "concurrently \"ng build shell --configuration=demo\" \"ng build first-mf --configuration=demo\" \"cd projects/template-editor && vite build --mode demo\""
2121
},
2222
"private": true,
2323
"dependencies": {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const environment = {
22
production: false,
33
vueRemoteEntry: '/mfe-angular/template-editor/assets/remoteEntry.js',
4+
buildConfig: 'demo',
45
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const environment = {
22
production: false,
3-
vueRemoteEntry: '/mfe-angular/template-editor/assets/remoteEntry.js',
4-
// vueRemoteEntry: 'http://localhost:4202/assets/remoteEntry.js',
3+
vueRemoteEntry: 'http://localhost:4202/assets/remoteEntry.js',
4+
buildConfig: 'default',
55
};

projects/shell/src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import { initFederation } from '@angular-architects/native-federation';
2+
import { environment } from './environments/environment';
3+
4+
console.log('Environment:', environment.buildConfig);
5+
26

37
initFederation('federation.manifest.json')
48
.catch(err => console.error(err))

0 commit comments

Comments
 (0)