Skip to content

Commit

Permalink
use mf-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Jun 6, 2021
1 parent bca3304 commit 83fd203
Show file tree
Hide file tree
Showing 8 changed files with 694 additions and 1,262 deletions.
1,813 changes: 687 additions & 1,126 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"webpack": "^5.0.0"
},
"dependencies": {
"@angular-architects/module-federation": "^1.0.2",
"@angular-architects/module-federation": "^12.0.0",
"@angular-architects/module-federation-tools": "0.0.2",
"@angular/animations": "12.0.0-rc.3",
"@angular/common": "12.0.0-rc.3",
"@angular/compiler": "12.0.0-rc.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { connectRouter } from '@angular-architects/module-federation-tools';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { connectRouter } from './router.utils';

declare const require: any;

Expand Down
5 changes: 3 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, Injector } from '@angular/core';
import { createCustomElement } from '@angular/elements';
import { endsWith } from '@angular-architects/module-federation-tools';
import { RouterModule } from '@angular/router';

import { AppComponent } from './app.component';
import { RouterModule } from '@angular/router';
import { endsWith } from './router.utils';
import { AComponent } from './a/a.component';
import { BComponent } from './b/b.component';


@NgModule({
imports: [
BrowserModule,
Expand Down
26 changes: 0 additions & 26 deletions src/app/router.utils.ts

This file was deleted.

23 changes: 1 addition & 22 deletions src/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
import { platformBrowser } from '@angular/platform-browser';
import { AppModule } from './app/app.module';
import { bootstrap } from './bootstrap.utils';
import { environment } from './environments/environment';

// platformBrowser().bootstrapModule(AppModule)
// .catch(err => console.error(err));

// declare const require: any;
// const ngVersion = require('../package.json').dependencies['@angular/core'];
// (window as any).plattform = (window as any).plattform || {};
// let platform = (window as any).plattform[ngVersion];
// if (!platform) {
// platform = platformBrowser();
// (window as any).plattform[ngVersion] = platform;

// if (environment.production) {
// enableProdMode();
// }
// }
// platform.bootstrapModule(AppModule)
// .catch(err => console.error(err));
declare const require: any;
import { bootstrap } from '@angular-architects/module-federation-tools';

bootstrap(AppModule, {
packageJson: require('../package.json'),
production: environment.production
});
84 changes: 0 additions & 84 deletions src/bootstrap.utils.ts

This file was deleted.

Empty file added src/decl.d.ts
Empty file.

0 comments on commit 83fd203

Please sign in to comment.