module-federation / practical-module-federation

75 stars 23 forks source link

Error in the book #19

Open XiaofengXie16 opened 3 years ago

XiaofengXie16 commented 3 years ago

I am not sure if this the best platform for reporting the errors in the book. On page 38, the path seems to be wrong for the code below

window.nav.get('Header').then(factory => console.log(factory()));

We should specify the param as ./Header instead of Header for the get function. Otherwise , we will get a promise reject error in the console.

CharidimosTzedakis commented 2 years ago

Indeed on the above.

In addition to this, if we specify the param as ./Header we do get the function but I noticed that the part factory => console.log(factory()) does not log anything on the console.