GodziLaravel's avatar

Is it possible to add webpack.mix.js to .gitignore

Is it normal to add webpack.mix.js to .gitignore file to prevent changes when pulling from the git repository ?

and what other files should I added to gitignore ?

/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.testing
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.idea/
/public/img/avatars
0 likes
4 replies
tykus's avatar

You can add webpack.mix.js (and whatever else you want) to the ignored file(s), but this would assume your deployment contains the compiled assets, and you are not intending to run npm run prod on the server

tykus's avatar

Not specifically an issue, but it will lead to big diffs in your VCS as you swap from dev to prod builds. Is there a reason not to build on deployment?

GodziLaravel's avatar

@tykus Thank you

Is there a reason not to build on deployment? : no no reason in fact

Please or to participate in this conversation.