Method for realizing sub-module operation and packaging based on Webpack and related equipment thereof

By excluding the list of configuration files and using the Webpack module, the problems of slow startup, slow packaging and inability to accurately deliver files in the existing technology of project operation or packaging based on Webpack are solved, and faster file startup and accurate file delivery are achieved, reducing resource consumption.

CN119668669APending Publication Date: 2025-03-21SHENZHEN LANYOU TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311237184.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

When currently running or packaging a project based on Webpack, there are problems such as slow startup, slow packaging, and inability to deliver accurate files, resulting in unnecessary consumption of transmission resources and user storage and processing resources.

Method used

Through the configuration file exclusion list, files that are not needed during user development or debugging and files that users do not choose to transfer are excluded. The Webpack module is used to start or package the files that need to be run or packaged.

Benefits of technology

It improves file startup and operation speed, realizes accurate file delivery, and reduces unnecessary consumption of transmission resources and user storage and processing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668669A_ABST
    Figure CN119668669A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information transmission, and provides a method for realizing sub-module operation and packaging based on Webpack and related equipment thereof. Comparing the current request file with exclusion file parameters except for the files required to be operated by the user for developing or debugging, or comparing the current request file with exclusion file parameters not selected to be transmitted by the user, and according to a comparison result of the current request file and the exclusion file parameters except for the files required to be operated by the user for developing or debugging; the method comprises the following steps: selecting a current request file needing to be operated according to a comparison result between the current request file and excluded file parameters selected by a user, or selecting a current request file needing to be packaged and transmitted according to a comparison result between the current request file and excluded file parameters not selected by the user, calling a Webpack module, and starting and operating the current request file needing to be operated. Or the current request file needing to be packaged and transmitted is packaged and transmitted, so that the file starting and running speed is increased, accurate file delivery is achieved, and unnecessary consumption of resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information transmission technology, and more specifically, to a method for implementing module-based operation and packaging based on Webpack and related equipment. Background Art

[0002] As a static module packager for JavaScript applications, Webpack can be used to process the source files and dependencies of an application, and then package them to generate one or more output files. Webpack can identify and package a variety of file formats and resources, such as JavaScript, CSS, images, and fonts, so it can provide a better user experience. However, in the prior art, when running or packaging a project based on Webpack, the object of running or packaging is the entire front-end project. When the project scale is too large, this complete delivery method starts slowly and packages slowly. Moreover, the complete delivery method does not take into account the actual needs of users, and cannot achieve accurate file delivery, resulting in unnecessary consumption of transmission resources and user storage and processing resources.

[0003] In summary, the existing technologies for running or packaging projects based on Webpack have technical problems such as slow startup, slow packaging, inability to achieve accurate file delivery, and unnecessary consumption of transmission resources and user storage and processing resources. Summary of the invention

[0004] The technical problem to be solved by the present invention is that, in view of the shortcomings of the above-mentioned technical solutions, a method and related equipment for realizing module operation and packaging based on Webpack are provided to improve the file startup and running speed, achieve accurate file delivery, and reduce unnecessary consumption of transmission resources and user storage and processing resources.

[0005] In a first aspect, the present invention provides a method for implementing module-based operation and packaging based on Webpack, comprising the following steps:

[0006] S1. Configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected to transfer;

[0007] S2. Obtain the current request file, and compare the current request file with the exclusion file parameters other than the running files required for development or debugging by the user, or compare the current request file with the exclusion file parameters that the user has not selected to transmit;

[0008] S3. Select the current request file to be run according to the comparison result between the current request file and the exclusion file parameters other than the running file required for development or debugging by the user, or select the current request file to be packaged and transmitted according to the comparison result between the current request file and the exclusion file parameters not selected for transmission by the user;

[0009] S4. Call the Webpack module to start running the current request file that needs to be run, or package and transmit the current request file that needs to be packaged and transmitted.

[0010] Further, a file exclusion list is configured, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected for transmission, including:

[0011] Create the excludeFilesList.json file as a file exclusion list;

[0012] Configure the file parameters that are not required to be run during user development or debugging in the list of the excludeFilesList.json file;

[0013] Configure the file parameters that the user does not select for transfer in the list in the excludeFilesList.json file.

[0014] Further, obtaining the current request file, and comparing the current request file with the exclusion file parameters other than the running file required for development or debugging by the user, or comparing the current request file with the exclusion file parameters that the user has not selected to transmit, includes:

[0015] Use Node.js's file system API to read all project files to get the current request file;

[0016] Compare the current request file with the exclusion file parameters other than the running files required for the user to develop or debug one by one;

[0017] Alternatively, the currently requested file is compared one by one with the parameters of the excluded files that the user has not selected to transfer.

[0018] Further, comparing the current request file with the exclusion file parameters other than the running file required for the user development or debugging, including:

[0019] Using the transfer process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack;

[0020] The currently requested file is compared one by one with the exclusion file parameters in the file exclusion list except the running files required for user development or debugging.

[0021] Further, comparing the currently requested file with the exclusion file parameters that the user has not selected to transfer, including:

[0022] Using the transfer process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack;

[0023] The currently requested file is compared one by one with the parameters of the excluded files in the file exclusion list that the user has not selected to transfer.

[0024] Further, according to the comparison result of the current request file and the exclusion file parameters other than the running file required for the user development or debugging, the current request file to be run is selected, including:

[0025] When the current request file corresponds to an exclusion file parameter other than the running file required for the user to develop or debug, it is concluded that the current request file is a file that needs to be excluded from running;

[0026] When the current request file does not correspond to the exclusion file parameters other than the running file required for the user development or debugging, it is concluded that the current request file is a file that needs to be started and run.

[0027] Further, according to the comparison result of the current request file and the exclusion file parameter that the user has not selected for transmission, the current request file that needs to be packaged for transmission is selected, including:

[0028] When the currently requested file corresponds to the exclusion file parameter that the user has not selected for transmission, it is concluded that the currently requested file is a file that needs to be excluded from transmission;

[0029] When the currently requested file does not correspond to the exclusion file parameter that the user has not selected for transmission, it is concluded that the currently requested file is a file that needs to be packaged and transmitted.

[0030] In a second aspect, the present invention provides a device for implementing module-based operation and packaging based on Webpack, comprising:

[0031] A file exclusion list configuration module, used to configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters not selected for transmission by the user;

[0032] A file parameter comparison module, used for obtaining a current request file, and comparing the current request file with parameters of excluded files other than the running files required for development or debugging by the user, or comparing the current request file with parameters of excluded files that the user has not selected for transmission;

[0033] A running or packaged file selection module, used to select the current request file to be run according to the comparison result of the current request file and the exclusion file parameters other than the running file required for the user to develop or debug, or to select the current request file to be packaged and transmitted according to the comparison result of the current request file and the exclusion file parameters not selected for transmission by the user;

[0034] The file running or packaging module is used to call the Webpack module to start running the current request file that needs to be run, or to package and transfer the current request file that needs to be packaged and transferred.

[0035] In a third aspect, the present invention provides a readable storage medium storing a computer program. When the computer program is run in a processor, it implements the method of implementing modular operation and packaging based on Webpack as described in any of the above items.

[0036] In a fourth aspect, the present invention provides a server comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method for implementing modular operation and packaging based on Webpack as described in any one of the above items.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] The method and related equipment for realizing module-based operation and packaging based on Webpack provided by the present invention configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the operation files required for user development or debugging and exclusion file parameters not selected for transmission by the user, obtain the current request file, and compare the current request file with the exclusion file parameters other than the operation files required for user development or debugging, or compare the current request file with the exclusion file parameters not selected for transmission by the user; select the current request file to be run according to the comparison result of the current request file with the exclusion file parameters other than the operation files required for user development or debugging, or select the current request file to be packaged and transmitted according to the comparison result of the current request file with the exclusion file parameters not selected for transmission by the user; call the Webpack module to start the current request file to be run, or package and transmit the current request file to be packaged and transmitted, thereby improving the file startup and operation speed, achieving accurate file delivery, and reducing unnecessary consumption of transmission resources and user storage and processing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flow chart of a method for implementing module-based operation and packaging based on Webpack in the present invention;

[0040] Figure 2 It is a schematic diagram of the architecture of a device for implementing module-based operation and packaging based on Webpack in the present invention;

[0041] Figure 3 It is a schematic diagram of the architecture of the server of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0044] Embodiment 1

[0045] See also Figure 1-Figure 3 Embodiment 1 provides a method for implementing sub-module operation and packaging based on Webpack, and the method for implementing sub-module operation and packaging based on Webpack includes steps S1, S2, S3 and S4, configuring a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the operating files required for user development or debugging and exclusion file parameters that the user has not selected to transmit, obtaining a current request file, and comparing the current request file with the exclusion file parameters other than the operating files required for user development or debugging, or comparing the current request file with the exclusion file parameters that the user has not selected to transmit, selecting the current request file to be run according to the comparison result of the current request file with the exclusion file parameters other than the operating files required for user development or debugging, or selecting the current request file to be packaged and transmitted according to the comparison result of the current request file with the exclusion file parameters that the user has not selected to transmit, calling the Webpack module, starting and running the current request file to be run, or packaging and transmitting the current request file to be packaged and transmitted, thereby improving the file startup and running speed, achieving accurate file delivery, and reducing unnecessary consumption of transmission resources and user storage and processing resources.

[0046] It should be noted that the method for implementing sub-module operation and packaging based on Webpack provided in this embodiment can be run on a server. As the execution subject of all or part of the steps in the method for implementing sub-module operation and packaging based on Webpack, the server can execute steps S1, S2, S3 and S4 in this embodiment, and can also run some or all of the steps of the method involved below. It should be noted that the server includes a memory, a processor, and a network interface that communicate with each other through a system bus. It should be pointed out that only some components of the server are shown in the figure, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the server here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc. The server can interact with the user through a keyboard, mouse, remote control, touchpad or voice control device. The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the server, such as a hard disk or memory of the server. In other embodiments, the memory can also be an external storage device of the server, such as a plug-in hard disk equipped on the server, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory can also include both the internal storage unit of the server and its external storage device.

[0047] Specifically, in step S1, the server configures a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected to transmit.

[0048] In some preferred embodiments, a file exclusion list is configured, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected to transfer, and may include:

[0049] Create the excludeFilesList.json file as a file exclusion list;

[0050] Configure the file parameters that are not required to be run during user development or debugging in the list of the excludeFilesList.json file;

[0051] Configure the file parameters that the user does not select for transfer in the list in the excludeFilesList.json file.

[0052] It should be noted that, in this embodiment, the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not chosen to transfer, so that in subsequent steps, file processing can be performed based on different needs, making the file exclusion list targeted. For example, during the development or debugging process, other files other than the running files required for development or debugging can be excluded by exclusion, and not started during the development or debugging process, thereby improving operating efficiency. For another example, during the file transmission process, files in the entire project file that the user has not chosen to transmit can be excluded by exclusion, and not packaged and transmitted, thereby achieving accurate file delivery and reducing unnecessary consumption of transmission resources and user storage and processing resources.

[0053] Specifically in step S2, the server obtains the current request file, and compares the current request file with the exclusion file parameters other than the running files required for the user to develop or debug, or compares the current request file with the exclusion file parameters that the user has not chosen to transmit. In some preferred embodiments, obtaining the current request file, and comparing the current request file with the exclusion file parameters other than the running files required for the user to develop or debug, or comparing the current request file with the exclusion file parameters that the user has not chosen to transmit, may include: using the file system API of Node.js to read all project files to obtain the current request file; comparing the current request file with the exclusion file parameters other than the running files required for the user to develop or debug one by one; or, comparing the current request file with the exclusion file parameters that the user has not chosen to transmit one by one.

[0054] In some preferred embodiments, comparing the current request file with the exclusion file parameters other than the running files required for user development or debugging may include: using the transmission process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack; comparing the current request file with the exclusion file parameters other than the running files required for user development or debugging in the file exclusion list one by one. Comparing the current request file with the exclusion file parameters that the user has not chosen to transmit includes: using the transmission process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack; comparing the current request file with the exclusion file parameters that the user has not chosen to transmit in the file exclusion list one by one.

[0055] It should be noted that by comparing the current request file with the exclusion file parameters other than the running files required for development or debugging by the user, or by comparing the current request file with the exclusion file parameters that the user has not selected for transmission, the current request file that needs to be run or excluded can be selected, and the current request file that needs to be packaged for transmission or needs to be excluded can be selected.

[0056] Specifically in step S3, the server selects the current request file to be run based on the comparison result of the current request file and the exclusion file parameters other than the running files required for development or debugging by the user, or selects the current request file to be packaged and transmitted based on the comparison result of the current request file and the exclusion file parameters that the user has not selected to transmit.

[0057] In some preferred embodiments, selecting the current request file to be run based on a comparison result between the current request file and exclusion file parameters other than the running file required for user development or debugging may include: when there is a correspondence between the current request file and the exclusion file parameters other than the running file required for user development or debugging, concluding that the current request file is a file that needs to be excluded from running; when the current request file does not correspond to the exclusion file parameters other than the running file required for user development or debugging, concluding that the current request file is a file that needs to be started and run.

[0058] In some preferred embodiments, based on the comparison result between the current request file and the exclusion file parameters that the user has not selected for transmission, the current request file that needs to be packaged and transmitted is selected, which may include: when there is a correspondence between the current request file and the exclusion file parameters that the user has not selected for transmission, concluding that the current request file is a file that needs to be excluded from transmission; when the current request file does not correspond to the exclusion file parameters that the user has not selected for transmission, concluding that the current request file is a file that needs to be packaged and transmitted.

[0059] It should be noted that after selecting the current request file that needs to be run, or the current request file that needs to be packaged and transmitted, the subsequent steps can be used for corresponding processing. For example, during the development or debugging process, the user only starts running the running files required for development or debugging, thereby improving the operating efficiency. For another example, during the file transfer process, only the files selected by the user in the entire project file are packaged and transmitted, so as to achieve accurate file delivery and reduce unnecessary consumption of transmission resources and user storage and processing resources.

[0060] Specifically in step S4, the server calls the Webpack module to start running the current request file that needs to be run, or packages and transmits the current request file that needs to be packaged and transmitted.

[0061] In a further improved embodiment, when the server determines that the currently requested file is a file that needs to be excluded from running or that the currently requested file is a file that needs to be excluded from transmission, it returns an empty character and calls the exclude rule of the Webpack module to exclude the files that need to be excluded from running or exclude the files that need to be excluded from transmission, thereby screening out the files that need to be run or packaged for transmission, thereby improving the startup and operation efficiency of development or debugging project files, and only packaging and transmitting the files selected by the user in the entire project file, so as to achieve accurate file delivery and reduce unnecessary consumption of transmission resources and user storage and processing resources.

[0062] Embodiment 2

[0063] See also Figure 1-Figure 3 This embodiment provides a device for implementing module-based operation and packaging based on Webpack, including:

[0064] A file exclusion list configuration module, used to configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters not selected for transmission by the user;

[0065] A file parameter comparison module, used for obtaining a current request file, and comparing the current request file with parameters of excluded files other than the running files required for development or debugging by the user, or comparing the current request file with parameters of excluded files that the user has not selected for transmission;

[0066] A running or packaged file selection module, used to select the current request file to be run according to the comparison result of the current request file and the exclusion file parameters other than the running file required for the user to develop or debug, or to select the current request file to be packaged and transmitted according to the comparison result of the current request file and the exclusion file parameters not selected for transmission by the user;

[0067] The file running or packaging module is used to call the Webpack module to start running the current request file that needs to be run, or to package and transfer the current request file that needs to be packaged and transferred.

[0068] It should be noted that, in this embodiment, by configuring a file exclusion list, the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not chosen to transmit, the current request file is obtained, and the current request file is compared with the exclusion file parameters other than the running files required for user development or debugging, or the current request file is compared with the exclusion file parameters that the user has not chosen to transmit, and according to the comparison result of the current request file with the exclusion file parameters other than the running files required for user development or debugging, the current request file that needs to be run is selected, or according to the comparison result of the current request file with the exclusion file parameters that the user has not chosen to transmit, the current request file that needs to be packaged and transmitted is selected, and the Webpack module is called to start and run the current request file that needs to be run, or to package and transmit the current request file that needs to be packaged and transmitted, thereby improving the file startup and running speed, achieving accurate file delivery, and reducing unnecessary consumption of transmission resources and user storage and processing resources.

[0069] Embodiment 3

[0070] See also Figure 1-Figure 3 This embodiment provides a readable storage medium that stores a computer program. When the computer program runs in a processor, it implements the method for implementing modular operation and packaging based on Webpack as described in any of the above embodiments.

[0071] It should be noted that, in this embodiment, when the computer program stored in the readable storage medium is run in the processor, the method for implementing modular operation and packaging based on Webpack as described in any of the above embodiments is implemented, by configuring a file exclusion list, the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not chosen to transmit, obtaining the current request file, and comparing the current request file with the exclusion file parameters other than the running files required for user development or debugging, or comparing the current request file with the exclusion file parameters that the user has not chosen to transmit, selecting the current request file that needs to be run based on the comparison result of the current request file with the exclusion file parameters other than the running files required for user development or debugging, or selecting the current request file that needs to be packaged and transmitted based on the comparison result of the current request file with the exclusion file parameters that the user has not chosen to transmit, calling the Webpack module, starting and running the current request file that needs to be run, or packaging and transmitting the current request file that needs to be packaged and transmitted, thereby improving the file startup and running speed, achieving accurate file delivery, and reducing unnecessary consumption of transmission resources and user storage and processing resources.

[0072] Embodiment 4

[0073] See also Figure 1-Figure 3 This embodiment provides a server, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method of implementing modular operation and packaging based on Webpack as described in any of the above embodiments.

[0074] In this embodiment, the processor operation of the server implements the method for implementing modular operation and packaging based on Webpack as described in any of the above embodiments, configures a file exclusion list, the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not chosen to transmit, obtains the current request file, and compares the current request file with the exclusion file parameters other than the running files required for user development or debugging, or compares the current request file with the exclusion file parameters that the user has not chosen to transmit, selects the current request file to be run based on the comparison result of the current request file with the exclusion file parameters other than the running files required for user development or debugging, or selects the current request file to be packaged and transmitted based on the comparison result of the current request file with the exclusion file parameters that the user has not chosen to transmit, calls the Webpack module, starts the current request file to be run, or packages and transmits the current request file to be packaged and transmitted, thereby improving the file startup and running speed, achieving accurate file delivery, and reducing unnecessary consumption of transmission resources and user storage and processing resources.

[0075] It should be noted that the related equipment of the method for implementing sub-module operation and packaging based on Webpack includes but is not limited to servers, devices for implementing sub-module operation and packaging based on Webpack, and related equipment such as readable storage media.

[0076] It should be pointed out that the above embodiments are only preferred specific implementation modes of the present invention, and the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. The protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for implementing module-based operation and packaging based on Webpack, characterized in that: The following steps are involved: S1. Configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected to transfer; S2. Obtain the current request file, and compare the current request file with the exclusion file parameters other than the running files required for development or debugging by the user, or compare the current request file with the exclusion file parameters that the user has not selected to transmit; S3. Select the current request file to be run according to the comparison result between the current request file and the exclusion file parameters other than the running file required for development or debugging by the user, or select the current request file to be packaged and transmitted according to the comparison result between the current request file and the exclusion file parameters not selected for transmission by the user; S4. Call the Webpack module to start running the current request file that needs to be run, or package and transmit the current request file that needs to be packaged and transmitted.

2. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: The file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters that the user has not selected to transfer, including: Create the excludeFilesList.json file as a file exclusion list; Configure the file parameters that are not required to be run during user development or debugging in the list of the excludeFilesList.json file; Configure the file parameters that the user does not select for transfer in the list in the excludeFilesList.json file.

3. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: Obtaining a current request file, and comparing the current request file with an exclusion file parameter other than the running file required for development or debugging by the user, or comparing the current request file with an exclusion file parameter that the user has not selected to transmit, includes: Use Node.js's file system API to read all project files to get the current request file; Compare the current request file with the exclusion file parameters other than the running files required for the user to develop or debug one by one; Alternatively, the currently requested file is compared one by one with the parameters of the excluded files that the user has not selected to transfer.

4. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: Comparing the current request file with the exclusion file parameters other than the running file required for user development or debugging, including: Using the transfer process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack; The currently requested file is compared one by one with the exclusion file parameters in the file exclusion list except the running files required for user development or debugging.

5. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: Comparing the currently requested file with the exclusion file parameters that the user has not selected to transfer, comprising: Using the transfer process to pass in the file exclusion list, and importing the file exclusion list into the exclude parameter of Webpack; The currently requested file is compared one by one with the parameters of the excluded files in the file exclusion list that the user has not selected to transfer.

6. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: According to the comparison result of the current request file and the exclusion file parameters other than the running file required for the user development or debugging, the current request file to be run is selected, including: When the current request file corresponds to an exclusion file parameter other than the running file required for the user to develop or debug, it is concluded that the current request file is a file that needs to be excluded from running; When the current request file does not correspond to the exclusion file parameters other than the running file required for the user development or debugging, it is concluded that the current request file is a file that needs to be started and run.

7. The method for implementing module-based operation and packaging based on Webpack as claimed in claim 1, characterized in that: According to the comparison result of the current request file and the exclusion file parameter that the user has not selected for transmission, the current request file that needs to be packaged for transmission is selected, including: When the currently requested file corresponds to the exclusion file parameter that the user has not selected for transmission, it is concluded that the currently requested file is a file that needs to be excluded from transmission; When the currently requested file does not correspond to the exclusion file parameter that the user has not selected for transmission, it is concluded that the currently requested file is a file that needs to be packaged and transmitted.

8. A device for implementing module-based operation and packaging based on Webpack, characterized in that: include: A file exclusion list configuration module, used to configure a file exclusion list, wherein the file exclusion list includes exclusion file parameters other than the running files required for user development or debugging and exclusion file parameters not selected for transmission by the user; A file parameter comparison module, used for obtaining a current request file, and comparing the current request file with parameters of excluded files other than the running files required for development or debugging by the user, or comparing the current request file with parameters of excluded files that the user has not selected for transmission; A running or packaged file selection module, used to select the current request file to be run according to the comparison result of the current request file and the exclusion file parameters other than the running file required for the user to develop or debug, or to select the current request file to be packaged and transmitted according to the comparison result of the current request file and the exclusion file parameters not selected for transmission by the user; The file running or packaging module is used to call the Webpack module to start running the current request file that needs to be run, or to package and transfer the current request file that needs to be packaged and transferred.

9. A readable storage medium storing a computer program, which, when executed in a processor, implements the method for implementing modular operation and packaging based on Webpack as described in any one of claims 1 to 7.

10. A server comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method for implementing modular operation and packaging based on Webpack as described in any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Method and system for solving problem that codes are difficult to maintain due to version differentiation

    CN110647348A

  • Item processing method and device, electronic equipment, storage medium and program product

    CN113536180A

  • Operating system deployment method, system and device and computer readable storage medium

    CN114115920A

  • Packing and blocking method

    CN114356388A

  • Filtering Content for Adaptive Streaming

    US20140304373A1