Home > Web Front-end > Vue.js > body text

How to change the project name in vuejs

青灯夜游
Release: 2023-01-13 00:45:39
Original
4078 people have browsed it

Change method: 1. Open the "package.json" file in the project root directory and change the value of the "name" item to the new project name; 2. Delete the "node_modules" folder; 3. In the terminal Enter the project folder and execute the "npm install" and "npm run dev" commands.

How to change the project name in vuejs

The operating environment of this tutorial: CentOS 6 system, vue2.9.6 version, DELL G3 computer.

When using vue-cli scaffolding to build a Vue project, we will be asked to fill in the project name at the beginning. If you want to change the project name during subsequent development, you can do so. The following are the specific steps.

1. Modify the package.json file

Open the package.json file in the project root directory and change the name to the new project name.

How to change the project name in vuejs

#2, reinstall the plug-in

(1) Then we delete the "node_modules" folder.

(2) Then enter the project folder in the terminal and execute the following command to reinstall all plug-ins.

npm install
Copy after login

(3) Finally, we can execute the following command to start the project.

npm run dev
Copy after login

Related recommendations: "vue.js Tutorial"

The above is the detailed content of How to change the project name in vuejs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!