Enterprise Angular by Manfred Steyer

Enterprise Angular by Manfred Steyer

Author:Manfred Steyer [Manfred Steyer]
Language: eng
Format: epub
Publisher: leanpub.com
Published: 2019-10-19T00:00:00+00:00


This module has some routes of its own:

1 export const FLIGHTS_ROUTES: Routes = [ 2 { 3 path: 'flights-search', 4 component: FlightsSearchComponent 5 } 6 ];

In order to make it possible to load the FlightsModule into the shell, we also need to reference the ModuleFederationPlugin in the remote’s webpack configuration:

1 const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin\ 2 "); 3 4 module.exports = { 5 output: { 6 publicPath: "http://localhost:3000/", 7 uniqueName: "mfe1" 8 }, 9 optimization: { 10 // Only needed to bypass a temporary bug 11 runtimeChunk: false 12 }, 13 plugins: [ 14 new ModuleFederationPlugin({ 15 16 // For remotes (please adjust) 17 name: "mfe1", 18 library: { type: "var", name: "mfe1" }, 19 filename: "remoteEntry.js", 20 exposes: { 21 './Module': './projects/mfe1/src/app/flights/flights.module.ts', 22 }, 23 24 shared: ["@angular/core", "@angular/common", "@angular/router"] 25 }) 26 ], 27 };



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.