File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ [build ]
2
+ publish = " dist"
3
+ command = " npm ci && npm run lint bookings && npm run test bookings && npm run build bookings -- --configuration production"
Original file line number Diff line number Diff line change
1
+ [build ]
2
+ publish = " dist"
3
+ command = " npm ci && npm run lint train-platform && npm run test train-platform && npm run build train-platform -- --configuration production"
4
+
5
+ [[redirects ]]
6
+ from = " /frontends/bookings/*"
7
+ to = " https://cozy-concha-0ad972.netlify.app/:splat"
8
+ force = true
9
+ status = 200
10
+
11
+ [[redirects ]]
12
+ from = " /*"
13
+ to = " /index.html"
14
+ status = 200
Original file line number Diff line number Diff line change 1
1
import { CUSTOM_ELEMENTS_SCHEMA , NgModule } from '@angular/core' ;
2
2
import { RouterModule } from '@angular/router' ;
3
+ import { environment } from '../environments/environment' ;
3
4
import { BookingsHostComponent } from './bookings-host.component' ;
4
5
import { LoadMicroFrontendGuard } from './load-micro-frontend.guard' ;
5
6
import { MicroFrontendLanguageDirective } from './micro-frontend-language.directive' ;
6
7
import { MicroFrontendRoutingDirective } from './micro-frontend-routing.directive' ;
7
8
9
+ const getMicrofrontendBundleUrl = ( frontendName : 'bookings' ) =>
10
+ `/frontends/${ frontendName } /main.js` ;
11
+
8
12
@NgModule ( {
9
13
declarations : [
10
14
BookingsHostComponent ,
@@ -18,7 +22,9 @@ import { MicroFrontendRoutingDirective } from './micro-frontend-routing.directiv
18
22
canActivate : [ LoadMicroFrontendGuard ] ,
19
23
component : BookingsHostComponent ,
20
24
data : {
21
- bundleUrl : 'http://localhost:4201/main.js' ,
25
+ bundleUrl : environment . production
26
+ ? getMicrofrontendBundleUrl ( 'bookings' )
27
+ : 'http://localhost:4201/main.js' ,
22
28
} ,
23
29
} ,
24
30
] ) ,
You can’t perform that action at this time.
0 commit comments