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
Recently I want to use goaccess to analyze nginx ...
Table of contents 1. How is cross-domain formed? ...
View installation and uninstallation # View rpm -...
In ordinary projects, I often encounter this prob...
Set the width of the body to the width of the wind...
Table of contents 1.watch monitors changes in gen...
1. Title HTML defines six <h> tags: <h1&...
Problem Description When we are working on a proj...
What is volume? Volume means capacity in English,...
css3 background image related Compatibility: IE9+...
1. Export the database using the mysqldump comman...
This article introduces how to solve the problem ...
nginx traffic control Rate-limiting is a very use...
Table of contents 1. Problem Discovery 2. View de...
Fabric.js is a very useful canvas operation plug-...