The project uses the same public portal, all modules reuse the portal, and point to different modules according to different projects.
All micro module resources and framework resources in the project can communicate with each other, refer to each other and access each other. There is no barrier between micro modules in the development version. To ensure the high availability of code components, all components can cross business communication, cross business use.
Resources include: business components, static resources (CSS, pictures, audio and video files, etc.), JS tools, etc
In order to ensure that the project teams can run independently and develop independently. Although it is the same entry when starting the project, it can start the functions of the respective micro modules. It can start all or only one without interference.
Start Engineering OrderWhen starting, it is started by normal start command + micro module name. For example:npm run dev:project1The command startsproject1Micro module. When it starts, the browser will automatically open the page, which will be discussed in detail later.
Each module can be packaged and launched independently without affecting each other to ensure high availability. The structure of the packaged resource directory is as follows:
Project packaging resources The first micro module package resource │ │ ├── static │ │ ├── index.html In this paper, we present a method to solve this problem The second micro module packages resources │ │ ├── static │ │ ├── index.html In this paper, we present a method to solve this problem │ └── 。。。
Packaging Engineering OrderWhen packaging, it is started by normal packaging Command + micro module name. For example:npm run build:project1The command is packaged asproject1Micro module. After packaging, the corresponding micro module folder is produced in the dist folder.
This work adoptsCC agreementReprint must indicate the author and the link of this article