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
Table of contents 1. What is two-way data binding...
First, understand the updatexml() function UPDATE...
Table of contents Conditional compilation Page La...
I recently started learning database, and I feel ...
Correspondence between flutter and css in shadow ...
Docker Hub official website 1. Search for Python ...
When using element-ui, there is a commonly used c...
Previously, I summarized how to use CSS to achieve...
Table of contents 1. Database bottleneck 2. Sub-l...
Table of contents 1. Basic principles 2. Specific...
Preface The solution to the problem of not being ...
Table of contents Short Introduction 1. Check the...
Table of contents 1. React Basic Usage Notable Fe...
1. Concat function. Commonly used connection stri...
Table of contents Preface Case: Imitation of JD.c...