A non-transitory computer readable storage medium, storing executable instructions, the executable instructions, when executed by a processor, implementing a sub-application loading method and included in a micro-frontend system, the micro-frontend system comprising:
- a routing registration service, a sub-application loading module and a sub-application running module, the method comprising:
- =
- acquiring a network access request, the network access request carrying a uniform resource locator (URL) address of a page to be accessed;
- pulling corresponding routing information from the routing registration service based on the URL address;
- acquiring, by the sub-application loading module based on the routing information, a sub-application resource corresponding to the routing information from the routing registration service based on a determination that, based on the routing information, the page to be accessed is a page of a sub-application;
- loading, by the sub-application loading module, the sub-application resource;
- and
- running, by the sub-application running module, the sub-application resource, and rendering the page of the sub-application,
- wherein
- the routing registration service is configured to provide routing information of a sub-application, a loading manner of the sub-application, and deployment information of the sub-application for the micro-frontend running framework of a primary application, the routing registration service being a Node backend service, that is maintained and run independently of the primary application;
- the command line tool is configured to provide a sub-application creation function, a sub-application access function, and a service registration function through a command line;
- and
- the micro-frontend running framework is a framework running in the primary application and is configured to load and run, based on a network request, the sub-application and provide a multi-framework sub-application running ability.