I am currently working on an Angular 9 application and experimenting with the new module federation feature provided by beta Webpack 5.
My standalone store application, which is served on localhost:9006 with module federation, offers an external remote bundle that my shell (Angular 9) application can import at runtime.
For example:
import('s1').then( m => {
});
Although the path 's1' is not a part of Angular, I declared it as a module to prevent TypeScript from throwing errors:
declare module 's1'
The declaration is located in src under the filename decl.d.ts.
However, when I start my application, I encounter the following error:
ERROR in ./src/app/app.component.ts 78:8-20
Module not found: Error: Can't resolve 's1' in '/home/alecoder/Projects/JS/adj_integration/packages/shell/src/app'
...
Here is a snippet of my webpack configuration:
...
This issue seems to stem from Typescript being unable to locate the module and attempting to find it within node_modules. It appears there may be a misconfiguration somewhere, but I have yet to pinpoint where.