1. Related configurationCase 1 (the tool used is vue-cil)If the project is created with vue-cli, there is no config folder in the project directory, so we need to create a configuration file ourselves; create a file vue.config.js in the root directory src. Note that the file name must be vue.config.js, and then insert the following code in the file: //Packaging configuration file module.exports = { assetsDir: 'static', parallel: false, publicPath: './', }; The structure is as follows: Case 2 (the tool used is webpack)If you are using webpack, modify the webpack configuration directly in the index.js file in config: assetsPublicPath: './' The structure is as follows: 2. PackagingAfter the configuration is completed, call up the console and enter the packaging command npm run build to start packaging; After success, there will be the following prompt; And the dist folder will be automatically generated in the project directory; The dist folder is the package we need, and then it can be put on the server for deployment. It should be noted that after packaging, no matter what changes are made in the project, npm run build is required to repackage. SummarizeThis article ends here. I hope it can be helpful to you. I also hope you can pay more attention to more content on 123WORDPRESS.COM! You may also be interested in:
|
<<: Solution to the failure of 6ull to load the Linux driver module
>>: Detailed explanation of scroll bar scrolling control of DOM elements in HTML
【background】 I encountered a very embarrassing th...
1. Installation 1. Download Go to the MySQL offic...
ssh is one of the two command line tools I use mo...
<br />Simple example of adding and removing ...
Overview: I drew lessons from several timetable s...
Many people have been told how to compile from th...
This article example shares the specific code of ...
Preface Index Condition Pushdown (ICP) is a new f...
In order to extend the disk life for storing audi...
Source: http://www.ruoyi.vip/ import Vue from ...
Table of contents 1. Supplementary knowledge poin...
1. Disconnection reason There are many reasons wh...
Currently, almost all large websites and applicat...
transform: scale(); Scaling will cause jitter in ...
In many cases, large and medium-sized websites wi...