I have been struggling to find a solution to an ongoing issue and wasting time on futile attempts.
Currently, I am working with Angular 15 within a microfrontend architecture. My goal is to implement a system where I can download a compiled microfrontend using npm and visualize it in a development environment alongside the shell. The microfrontend itself is developed separately as a standalone Angular application.
In this microfrontend architecture, there is a process where a manifest is read to determine the URL of the microfrontend that needs to be loaded:
{
"mfe1": "http://localhost:3000/remoteEntry.js"
}
My objective is to make the compiled microfrontend accessible at the specified URL above, which points to the compiled code located within the node_modules directory.
While this is not an issue in production environments where the server's URL hosts the compiled microfrontend, I am seeking a way to dynamically load it from the node_modules during development.
It is crucial for this project to maintain separation between the development of the shell and the microfrontends, with only the ability to download the microfrontends in their compiled form.
Is there a feasible way to achieve this?
In comparison to a traditional microfrontend setup, I have attempted to modify the angular.json file so that my MFE1 reference does not point to a folder such as projects/mfe1/src/... but rather to the compiled code within the node_modules directory.