I am developing vue project and syncing dist folder with git. This worked well while using webpack. However, I have moved to @vue/cli --- using vue create myProject
instead of vue init webpack myProj
.
The issue is that every time i run npm run build
, it deletes dist folder and recreates it -- all .git and other files gone.
How do I prevent new build from deleting required files in dist folder and only update the changes?
build: vue-cli-service build
you can pass additional flags after--
so in CLI you'd callnpm run build -- --no-clean
and npm would pass the params after--
to the actual script command. – Coreencorel