A construction method, device, equipment and storage medium applicable to multiple front-end frameworks
By obtaining and modifying the default build configuration and target plug-ins of the front-end build tool, the problem of different build configurations of different front-end frameworks is solved, and the standardization and cost reduction of multi-frame development is achieved.
Patent Information
- Application Number
- CN202111331287.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-11-11
AI Technical Summary
Different front-end frameworks have different construction configurations, which leads to the inability of single scaffolding tools to effectively solve the needs of multi-frame development, increasing the cost of understanding and maintenance, and not conducive to the standardization and unity of the team.
By obtaining the default build configuration and multiple target plug-ins for the front-end build tool, passing in the starting target plug-in and executing the target plug-in method, gradually modifying and passing the build configuration, and finally generating a build configuration suitable for multi-frameworks, passing it to the front-end build tool for construction.
It realizes front-end development for coexistence of multiple frameworks, without the need to maintain multiple scaffolding tools, reduces the understanding and maintenance costs during cross-frame development, and standardizes the overall development workflow of the team.
Smart Images

Figure CN114035780B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of front-end technologies, and in particular, to a construction method, device, equipment, and storage medium applicable to multiple front-end frameworks. Background Art
[0002] On the premise that front-end construction tools are widely used, there are different scaffolding tools for different front-end frameworks. Using these scaffolding tools, developers can quickly build projects corresponding to the frameworks.
[0003] However, different frameworks have different construction configurations, including common and different configurations. Without differential separation, a single scaffolding tool can only meet the requirements of its corresponding framework. If there are usage scenarios of different frameworks, multiple corresponding scaffolding tools need to be installed. Different scaffolding tools increase additional understanding and maintenance costs, which is not conducive to the standardization and unification of the team. Summary of the Invention
[0004] Embodiments of the present invention provide a construction method, device, equipment, and storage medium applicable to multiple front-end frameworks, so as to realize front-end development with multiple frameworks coexisting, without the need to maintain multiple scaffolding tools, thereby reducing understanding and maintenance costs and standardizing the overall development workflow of the team.
[0005] In a first aspect, embodiments of the present invention provide a construction method applicable to multiple front-end frameworks, and the method includes:
[0006] Obtain the default construction configuration of the front-end construction tool and multiple target plugins, and pass the default construction configuration to the starting target plugin, where the target plugin carries a target plugin method for modifying the configuration of the front-end construction tool, and the starting target plugin is one of the target plugins;
[0007] Execute the target plugin method in the starting target plugin to modify the default construction configuration, and pass the modified construction configuration to the next target plugin for execution and transmission;
[0008] After executing the target plugin methods of all the target plugins, obtain the final construction configuration, and pass the final construction configuration to the front-end construction tool to perform front-end construction.
[0009] Optionally, the obtaining of the multiple target plugins includes:
[0010] Initialize the engine API object;
[0011] Load multiple preset plugins and execute them to obtain the engine API objects respectively. Each of the preset plugins carries a corresponding preset plugin function for determining the plugin methods required by each preset plugin. After the preset plugin function is executed, the engine API object is passed into the interior of each preset plugin function;
[0012] Call the plugin methods required by each preset plugin through the engine API object, and monitor and store the call process to complete the initialization of each preset plugin and obtain each target plugin.
[0013] Optionally, before initializing the engine API object, it further includes:
[0014] Instantiate the engine class.
[0015] Optionally, before executing the target plugin method in the starting target plugin to modify the default build configuration and passing the modified build configuration to the next target plugin for execution and passing, it further includes:
[0016] Register execution commands in the preset plugin functions corresponding to each target plugin;
[0017] Receive the target execution command input by the user at the command line.
[0018] Optionally, before passing the default build configuration into the starting target plugin, it further includes:
[0019] Determine the execution order of the starting target plugin and each target plugin according to the registration order or preset priority of the execution command.
[0020] Optionally, the monitoring and storing of the call process includes:
[0021] Store the call subject, the plugin method call order, and the call function.
[0022] Optionally, the target plugins include Weex plugins, Vue plugins, React plugins, and mini-program plugins.
[0023] In a second aspect, an embodiment of the present invention further provides a construction device applicable to multiple front-end frameworks. The device includes:
[0024] A default configuration acquisition module, configured to acquire the default build configuration of the front-end construction tool and multiple target plugins, and pass the default build configuration into the starting target plugin, where the target plugin carries a target plugin method for modifying the configuration of the front-end construction tool, and the starting target plugin is one of the target plugins;
[0025] A plug-in method execution module, which is used to execute the target plug-in method in the starting target plug-in, so as to modify the default build configuration, and pass the modified build configuration to the next target plug-in for execution and transmission;
[0026] A front-end build module, which is used to obtain the final build configuration after executing the target plug-in methods of all the target plug-ins, and pass the final build configuration to the front-end build tool to execute the front-end build.
[0027] In a third aspect, an embodiment of the present invention further provides a computer device, which includes:
[0028] One or more processors;
[0029] A memory for storing one or more programs;
[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the front-end multi-framework applicable construction method provided by any embodiment of the present invention.
[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the front-end multi-framework applicable construction method provided by any embodiment of the present invention.
[0032] An embodiment of the present invention provides a front-end multi-framework applicable construction method. First, obtain the default build configuration of the front-end build tool and multiple target plug-ins, and pass the default build configuration to the starting target plug-in. Among them, the target plug-in carries a target plug-in method for modifying the front-end build tool configuration. Then execute the target plug-in method in the starting target plug-in to modify the default build configuration, and pass the modified build configuration to the next target plug-in for continuous execution and transmission. After executing the target plug-in methods of all the target plug-ins, the final build configuration can be obtained, and then the final build configuration can be passed to the front-end build tool to execute the front-end build. The front-end multi-framework applicable construction method provided by the embodiment of the present invention can extract the function points and configurations of different frameworks as plug-ins by using the plug-in idea, so that a unified management scaffolding tool can be designed, realizing front-end development with multiple frameworks coexisting, without the need to maintain multiple scaffolding tools, thereby reducing the understanding and maintenance costs in the cross-framework development process and standardizing the overall development workflow of the team. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flowchart of the front-end multi-framework applicable construction method provided by Embodiment 1 of the present invention;
[0034] Figure 2Schematic diagram of the construction device applicable to multiple front-end frameworks provided in the second embodiment of the present invention;
[0035] Figure 3 Schematic diagram of the computer device provided in the third embodiment of the present invention. Detailed implementation manners
[0036] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the sake of description, only parts related to the present invention rather than all structures are shown in the drawings.
[0037] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0038] Embodiment 1
[0039] Figure 1 Flowchart of the construction method applicable to multiple front-end frameworks provided in the first embodiment of the present invention. This embodiment is applicable to the situation of cross-frame front-end development. This method can be executed by the construction device applicable to multiple front-end frameworks provided in the embodiments of the present invention. This device can be implemented in a hardware and / or software manner and is generally integrated into a computer device. As Figure 1 shown, the specific steps are as follows:
[0040] S11. Obtain the default build configuration of the front-end build tool and multiple target plugins, and pass the default build configuration to the starting target plugin. Among them, the target plugin carries a target plugin method for modifying the configuration of the front-end build tool, and the starting target plugin is one of the target plugins.
[0041] S12. Execute the target plugin method in the starting target plugin to modify the default build configuration, and pass the modified build configuration to the next target plugin for execution and transmission.
[0042] S13. Obtain the final build configuration after executing all the target plugin methods of the target plugins, and pass the final build configuration to the front-end build tool to perform front-end building.
[0043] Among them, the front-end construction tool can be webpack, etc., and the target plug-in is a JS module that conforms to the CommonJS specification. Specifically, the unified management scaffolding tool formed in this embodiment can default to support the construction of a framework, which can be vue, weex, react, or a small program, etc. Without the intervention of other plug-ins, it can be constructed according to the default construction configuration, that is, it can be used without the user writing a plug-in, which is convenient for the user. The default construction configuration can be written in advance by developers. When the default construction configuration cannot meet the requirements, the corresponding target plug-in for modifying the default construction configuration can be obtained additionally. Optionally, the target plug-in includes a weex plug-in, a vue plug-in, a react plug-in, and a small program plug-in, etc. Various target plug-ins can be designed in advance as backups according to all or different function points and configurations of various front-end frameworks, and can be loaded when needed. When cross-framework development is required, the corresponding multiple target plug-ins can be obtained additionally. After being processed by each target plug-in, the required final construction configuration can be obtained, and then the final construction configuration is passed to the front-end construction tool for front-end construction. Specifically, it can rely on the underlying node environment and use the webpack tool for construction and compilation, and output externally as dev, build, and test commands, so as to reference different target plug-ins to achieve different framework compilations. Among them, the target plug-in can carry a target plug-in method, and specifically, the configuration can be modified through the target plug-in method. All target plug-ins are executed in sequence. Further, there can also be a specific execution order among all the target plug-ins. Then there is a starting target plug-in among the target plug-ins. After obtaining the default construction configuration, the default construction configuration can be first passed into the starting target plug-in, and the default construction configuration can be personalized modified by executing the target plug-in method in the starting target plug-in, that is, it can be modified to meet the configuration requirements of the corresponding framework. After the modification is completed, the configuration can be returned and passed to the next target plug-in, and the target plug-in method in the next target plug-in is executed to modify it again, and then continue the process of passing and modifying until the target plug-in methods of all target plug-ins are completed, so as to obtain the final construction configuration.
[0044] Optionally, the obtaining of the multiple target plug-ins includes: initializing an engine API object; loading and executing multiple preset plug-ins to respectively obtain the engine API object, where each of the preset plug-ins carries a corresponding preset plug-in function for determining the plug-in methods required by each of the preset plug-ins. After the execution of the preset plug-in function, the engine API object is passed into the interior of each of the preset plug-in functions; calling the plug-in methods required by each of the preset plug-ins through the engine API object, and monitoring and storing the calling process to complete the initialization of each of the preset plug-ins and obtain each of the target plug-ins.
[0045] Among them, the engine API object is the core object of the engine class and can be called by plugins. The preset plugins corresponding to each front-end framework can be designed in advance according to all or differentiated function points and configurations of the corresponding front-end framework and reserved for loading when needed. When cross-framework development is required, the plugin mechanism can be implemented first through the upper-layer encapsulated engine class, and the required target plugins can be obtained according to the preset plugins and the engine API object. Specifically, the engine API object can be initialized first, and then the addresses of each preset plugin can be found using the absolute path and referenced for loading. After loading, it can be executed. When executed, each preset plugin will default to exporting a preset plugin function and execute it. After execution, the engine API object can be passed into the internal of each preset plugin function. The preset plugin function corresponding to each preset plugin can be used to determine the plugin methods that each preset plugin needs to call. After passing the engine API object into the internal of the preset plugin function, executing the preset plugin function can call the required plugin methods through the engine API object. The call process can be monitored through Proxy, and all methods executed by all preset plugins through the engine API object will be recorded, so as to obtain the plugin methods that each preset plugin needs to carry and get the target plugin carrying the target plugin methods. In the above process, it can be cyclically checked whether all preset plugins are loaded. If not, continue to load until the initialization of all preset plugins is completed. Optionally, before initializing the engine API object, it further includes: instantiating the engine class to facilitate subsequent operations such as adding and deleting plugins to this instance.
[0046] Further optionally, the monitoring and storing of the call process includes: storing the call subject, the call order of the plugin method, and the call function. Among them, the call subject can be the identity identifier (ID) of the preset plugin. Then, the plugin methods called by each preset plugin, the call order of the plugin methods, and the call functions used can be recorded. When the target plugin method in the target plugin is executed subsequently, it can be executed according to the stored information. During the storing process, uniqueness judgment can also be performed to avoid duplication.
[0047] On the basis of the above technical solution, optionally, before executing the target plugin method in the starting target plugin to modify the default build configuration and pass the modified build configuration to the next target plugin for execution and passing, it further includes: registering execution commands in the preset plugin functions corresponding to each target plugin; receiving a target execution command input by the user at the command line. Specifically, execution commands can be pre-registered in the preset plugin functions corresponding to each target plugin for subsequent command line calls. When a target plugin is needed, the user can input a target execution command at the command line. After receiving the input target execution command, the above-registered execution commands can be executed, and the target plugin methods in each target plugin can be started to execute, thus providing a unified command registration entry and standardizing the execution of instructions.
[0048] Further optionally, before passing the default build configuration into the starting target plugin, it further includes: determining the execution order of the starting target plugin and each target plugin according to the registration order of the execution commands or preset priorities. Specifically, the execution order of each target plugin can be determined according to the registration order of the execution commands of each target plugin, and at the same time, the starting target plugin can be determined, so as to sequentially execute the target plugin methods in each target plugin according to the execution order and determine the transfer direction. Of course, the execution order of each target plugin can also be determined according to various preset priorities pre-written by the user, etc.
[0049] The technical solution provided by the embodiments of the present invention can implement Plugin-weex and support the weex build and compilation; it can implement Plugin-vue and support the 2.0 version build and compilation of vue; it can implement Plugin-vue3 and support the 3.0 version build and compilation of vue; it can implement Plugin-react and support the build and compilation of react; it can implement Plugin-mp and support the build and compilation of mini programs, etc.
[0050] The technical solution provided by the embodiments of the present invention first obtains the default build configuration of the front-end build tool and multiple target plugins, and passes the default build configuration to the starting target plugin. The target plugin carries a target plugin method for modifying the configuration of the front-end build tool. Then, the target plugin method in the starting target plugin is executed to modify the default build configuration, and the modified build configuration is passed to the next target plugin for continuous execution and passing. After executing the target plugin methods of all target plugins, the final build configuration can be obtained, and the final build configuration can be passed to the front-end build tool to execute the front-end build. By using the plugin idea, the function points and configurations of different frameworks can be extracted as plugins, so that a unified management scaffolding tool can be designed, realizing front-end development with multiple frameworks coexisting, without the need to maintain multiple scaffolding tools, thereby reducing the understanding and maintenance costs in the cross-framework development process and standardizing the overall development workflow of the team.
[0051] Embodiment 2
[0052] Figure 2 FIG. is a schematic structural diagram of a building device applicable to multiple front-end frameworks provided by Embodiment 2 of the present invention. The device can be implemented in a hardware and / or software manner and is generally integrated in a computer device for executing the building method applicable to multiple front-end frameworks provided by any embodiment of the present invention. As Figure 2 shown, the device includes:
[0053] A default configuration acquisition module 21, configured to obtain the default build configuration of the front-end build tool and multiple target plugins, and pass the default build configuration to the starting target plugin, where the target plugin carries a target plugin method for modifying the configuration of the front-end build tool, and the starting target plugin is one of the target plugins;
[0054] A plugin method execution module 22, configured to execute the target plugin method in the starting target plugin to modify the default build configuration, and pass the modified build configuration to the next target plugin for execution and passing;
[0055] A front-end build module 23, configured to obtain a final build configuration after executing the target plugin methods of all the target plugins, and pass the final build configuration to the front-end build tool to execute the front-end build.
[0056] For the technical solution provided by the embodiments of the present invention, first, the default build configuration of the front-end build tool and multiple target plugins are obtained, and the default build configuration is passed into the starting target plugin. The target plugin carries a target plugin method for modifying the front-end build tool configuration. Then, the target plugin method in the starting target plugin is executed to modify the default build configuration, and the modified build configuration is passed to the next target plugin for continuous execution and passing. After executing the target plugin methods of all target plugins, the final build configuration can be obtained, and the final build configuration can be passed to the front-end build tool to execute the front-end build. By utilizing the plugin concept, the function points and configurations of different frameworks can be extracted as plugins, so that a scaffolding tool with unified management can be designed, realizing front-end development with multiple frameworks coexisting. There is no need to maintain multiple scaffolding tools, thereby reducing the understanding and maintenance costs during cross-framework development and standardizing the overall development workflow of the team.
[0057] Based on the above technical solution, optionally, the default configuration acquisition module 21 includes:
[0058] An initialization unit for initializing the engine API object;
[0059] A preset plugin execution unit for loading and executing multiple preset plugins to respectively obtain the engine API object. Each preset plugin carries a corresponding preset plugin function for determining the plugin methods required by each preset plugin. After the preset plugin function is executed, the engine API object is passed into the interior of each preset plugin function;
[0060] A target plugin acquisition unit for calling the plugin methods required by each preset plugin through the engine API object, and monitoring and storing the calling process to complete the initialization of each preset plugin and obtain each target plugin.
[0061] Based on the above technical solution, optionally, the default configuration acquisition module 21 further includes:
[0062] An instantiation unit for instantiating the engine class before initializing the engine API object.
[0063] Based on the above technical solution, optionally, the build device applicable to multiple front-end frameworks further includes:
[0064] An execution command registration module for registering execution commands in the preset plugin functions corresponding to each target plugin before executing the target plugin method in the starting target plugin to modify the default build configuration and passing the modified build configuration to the next target plugin for execution and passing;
[0065] A target execution command receiving module, configured to receive a target execution command input by a user in a command line.
[0066] Based on the above technical solution, optionally, the building device applicable to multiple front-end frameworks further includes:
[0067] An execution order determination module, configured to determine the execution order of the starting target plugin and each target plugin according to the registration order of the execution command or a preset priority before passing the default build configuration into the starting target plugin.
[0068] Based on the above technical solution, optionally, the target plugin obtaining unit is specifically configured to:
[0069] Store a calling entity, a plugin method call order, and a calling function.
[0070] Based on the above technical solution, optionally, the target plugins include a weex plugin, a vue plugin, a react plugin, and a mini-program plugin.
[0071] The building device applicable to multiple front-end frameworks provided by the embodiments of the present invention can execute the building method applicable to multiple front-end frameworks provided by any embodiment of the present invention, and has function modules and beneficial effects corresponding to the execution method.
[0072] It should be noted that in the embodiments of the above building device applicable to multiple front-end frameworks, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0073] Embodiment III
[0074] Figure 3 It is a schematic structural diagram of a computer device provided by Embodiment III of the present invention, showing a block diagram of an exemplary computer device suitable for implementing the embodiments of the present invention. Figure 3 The displayed computer device is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention. As Figure 3 shown, the computer device includes a processor 31, a memory 32, an input device 33, and an output device 34; the number of processors 31 in the computer device can be one or more, Figure 3 Taking one processor 31 as an example, the processor 31, the memory 32, the input device 33, and the output device 34 in the computer device can be connected through a bus or other means, Figure 3 Taking the connection through a bus as an example.
[0075] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the construction method applicable to multiple front-end frameworks in the embodiments of the present invention (for example, the default configuration acquisition module 21, the plug-in method execution module 22, and the front-end construction module 23 in the construction device applicable to multiple front-end frameworks). The processor 31 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 32, that is, implements the above-mentioned construction method applicable to multiple front-end frameworks.
[0076] The memory 32 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 32 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 32 may further include a memory remotely set relative to the processor 31, and these remote memories may be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0077] The input device 33 can be used to obtain the default construction configuration of the front-end construction tool and multiple target plug-ins, and generate key signal inputs related to the user settings and function control of the computer device, etc. The output device 34 can be used to provide the user with the constructed front-end framework, etc.
[0078] Embodiment 4
[0079] Embodiment 4 of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a construction method applicable to multiple front-end frameworks when executed by a computer processor. The method includes:
[0080] Obtain the default construction configuration of the front-end construction tool and multiple target plug-ins, and pass the default construction configuration to the starting target plug-in. Among them, the target plug-in carries a target plug-in method for modifying the configuration of the front-end construction tool, and the starting target plug-in is one of the target plug-ins;
[0081] Execute the target plug-in method in the starting target plug-in to modify the default construction configuration, and pass the modified construction configuration to the next target plug-in for execution and transmission;
[0082] After all the target plug-in methods of the target plug-ins are executed, a final build configuration is obtained, and the final build configuration is passed to the front-end build tool to perform a front-end build.
[0083] The storage medium can be any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or tape drives; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. The storage medium can also include other types of memory or combinations thereof. Additionally, the storage medium can be located in the computer system in which the program is executed, or it can be located in a different second computer system that is connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term "storage medium" can include two or more storage media that can reside in different locations (such as in different computer systems connected via a network). The storage medium can store program instructions (such as specifically implemented as a computer program) executable by one or more processors.
[0084] Of course, the storage medium containing computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations as described above, and can also execute the relevant operations in the build method applicable to front-end multi-frameworks provided by any embodiment of the present invention.
[0085] A computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0086] The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and necessary general hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0088] Note that the above is only the preferred embodiment of the present invention and the applied technical principle. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, it can also include more other equivalent embodiments, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A construction method applicable to multiple front - end frameworks, characterized in that, including: Obtain the default build configuration of the front - end build tool and multiple target plugins, and pass the default build configuration to the starting target plugin, where the target plugin carries a target plugin method for modifying the configuration of the front - end build tool, and the starting target plugin is one of the target plugins; Execute the target plugin method in the starting target plugin to modify the default build configuration, and pass the modified build configuration to the next target plugin for execution and transfer; After executing the target plugin methods of all the target plugins, obtain the final build configuration, and pass the final build configuration to the front - end build tool to perform front - end build; The obtaining of the multiple target plugins includes: Initialize the engine API object; Load and execute multiple preset plugins to respectively obtain the engine API object, where each preset plugin carries a corresponding preset plugin function for determining the plugin methods required by each preset plugin, and the engine API object is passed into the interior of each preset plugin function after the execution of the preset plugin function; Call the plugin methods required by each preset plugin through the engine API object, and monitor and store the call process to complete the initialization of each preset plugin and obtain each target plugin.
2. The construction method applicable to multiple front - end frameworks according to claim 1, characterized in that, Before initializing the engine API object, it also includes: Instantiate the engine class.
3. The construction method applicable to multiple front - end frameworks according to claim 1, characterized in that, Before executing the target plugin method in the starting target plugin to modify the default build configuration and pass the modified build configuration to the next target plugin for execution and transfer, it also includes: Register execution commands in the preset plugin functions corresponding to each target plugin; Receive the target execution command input by the user at the command line.
4. The construction method applicable to multiple front - end frameworks according to claim 3, characterized in that, Before passing the default build configuration to the starting target plugin, it also includes: Determine the execution order of the starting target plugin and each target plugin according to the registration order of the execution commands or the preset priority.
5. The construction method applicable to multiple front - end frameworks according to claim 1, characterized in that, The monitoring and storing of the call process includes: Store the call subject, the plugin method call order, and the call function.
6. The construction method applicable to multiple front - end frameworks according to claim 1, characterized in that, The target plugins include weex plugins, vue plugins, react plugins, and mini - program plugins.
7. A construction device applicable to multiple front - end frameworks, characterized in that, including: A default configuration acquisition module for obtaining the default build configuration of the front - end build tool and multiple target plugins, and passing the default build configuration to the starting target plugin, where the target plugin carries a target plugin method for modifying the configuration of the front - end build tool, and the starting target plugin is one of the target plugins; A plugin method execution module for executing the target plugin method in the starting target plugin to modify the default build configuration, and passing the modified build configuration to the next target plugin for execution and transfer; A front - end build module for obtaining the final build configuration after executing the target plugin methods of all the target plugins, and passing the final build configuration to the front - end build tool to perform front - end build; The default configuration acquisition module includes: An initialization unit for initializing an engine API object; A preset plug-in execution unit for loading and executing a plurality of preset plug-ins to respectively obtain the engine API object. Each of the preset plug-ins carries a corresponding preset plug-in function for determining the plug-in methods required by each preset plug-in. After the preset plug-in function is executed, the engine API object is passed into the interior of each preset plug-in function; A target plug-in obtaining unit for calling the plug-in methods required by each of the preset plug-ins through the engine API object, and monitoring and storing the calling process to complete the initialization of each of the preset plug-ins and obtain each target plug-in.
8. A computer device, characterized in that, Comprising: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the construction method for a front-end multi-framework applicable to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the construction method for a front-end multi-framework applicable to any one of claims 1-6.