Method for loading public component or library as required, electronic equipment and storage medium

The invention relates to the technical field of web, in particular to a method for loading public components or libraries as required in front-end micro-services. The method comprises the following steps: respectively constructing each shared component used by a main application and a sub-applicatio...

Full description

Saved in:
Bibliographic Details
Main Authors LYU PENGFEI, FU YUPING, DU HENG
Format Patent
LanguageChinese
English
Published 25.07.2023
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:The invention relates to the technical field of web, in particular to a method for loading public components or libraries as required in front-end micro-services. The method comprises the following steps: respectively constructing each shared component used by a main application and a sub-application in the front-end micro-service into an independent component library; when the main application is loaded, a variable a is loaded, and the variable a is used for storing storage addresses of the public library and the component library; mounting the variable a and a public method b on a window object, wherein the public method b loads a corresponding component library or a public library according to a specified library name of the component library or the public library used by the corresponding sub-application; the sub-application uses the corresponding common component or library by referencing the specified library name. According to the method, the address of the public library is cached and mounted under th
Bibliography:Application Number: CN202310465120