Home » vue » What files can be removed before deploying a VueJS project?

What files can be removed before deploying a VueJS project?

Posted by: admin November 26, 2021 Leave a comment

Questions:

I was recently working on a Vue.js project and I am done with the “Beta-Version”. I want to deploy my website to an online server and share it with the world. I used npm run build to generate the scripts in the dist folder, and now I want to upload the files to the server, but I doubt that all the files are necessary to be uploaded. I guess I should remove some files that don’t effect the user experience.

The Question: What are the files that can be removed before deploying a Vue.js project?

Note: I’m not talking only about the dist folder, I’m taking about removable files and folders in the root project directory, that contains dist and package.json and node_modules.

Answers:

The purpose of build process is to put any and all files and nothing else necessary for deployment into a folder, in this case, dist folder.
Oops. This was meant to be a comment.

###

You really shouldn’t delete any file in dist folder unless you know for sure you don’t need it.
If you do know that certain file doesn’t belong, it shouldn’t be there to begin with.
But unless you modified build portion to add something you don’t need, it most likely doesn’t contain any that shouldn’t be there.