Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the deployment skills of the Vue project?

Shulou Source: shulou.com Published: 2022-06-02 23:53:40 11月13日 Update

This article mainly explains "what are the deployment skills of Vue project". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "what are the deployment skills of Vue project" together.

project architecture

1. Basic library of package project

A base library may take some time to develop, but projects can progress faster if they are supported by a good base library. The time spent in the early development of the basic library can be made up. The most important thing is that with the support of the basic library, we can ensure a minimum quality limit of the project, so as not to cooperate with many people. The quality of different modules written by different people is uneven, and at the same time, we can ensure a better scalability.

Usually we say basic library includes-component library, basic css library, basic tool library (such as the second request encapsulation of the project, general cache method, general cookie operation, etc.);

2. Hierarchical management

To manage your requests, it is recommended to separate the api layer of your project into a hierarchy, which is conducive to better management and lower complexity under complex interfaces.

performance optimization

1. Cache

Caching some request information can effectively reduce requests and speed up. For example, we jump from the product list to the product details. We can use cookies or localstores to cache product details, and if the product details have already been loaded, we can reuse them.

2. Delayed loading

Delayed loading is generally to see content faster, we generally lazy loading for large resources such as images, and then lazy loading of our components. In fact, basically all performance optimization is nothing more than trying to find ways from these two aspects.

engineered

Modern front-end engineering and back-end engineering are definitely not just about writing code.

There will be a lot of engineering involved, such as webpack, server deployment, and more strictly, automated engineering systems. These will be very helpful to the advancement of the project, and will also guarantee the quality of the project. Our engineering improvements are generally reflected in the following three aspects.

1. Webpack improvements

For example, improve webpack configuration to improve packaging speed. When using your own syntax sugar, change webpack to support the new syntax sugar;

2. Control code quality

Control code quality, we will achieve through eslint;

3. Automated deployment

Automate deployment, deployment is a repetitive and time-consuming task. We can automate it. It saves us a lot of money.

Thank you for reading, the above is "Vue project deployment skills what" content, after the study of this article, I believe you have a deeper understanding of Vue project deployment skills, the specific use of the situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Tags: Project Foundation Engineering quality skills content Commodity caching Management Automation Code time details Assurance Learning support difference complexity hierarchy performance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Apple Linux Shulou Tech Info MySQL