App does not update when VueJs components are modified and styles added after deploying to heroku
I have a laravel/vuejs app that works well on localhost. After deploying to heroku, i realized that styles added to app.scss does not compile into my public/css file, thus have no effect. Also, modifications to my vuejs components does not update the app after i push to heroku with git push heroku master.
I have added heroku/nodejs buildpack on my heroku dashboard. Here is my webpack.mix.js file content;
The issue started after deployment.Compilation was successful locally but subsequent ones after the first deployment wouldn't update the app, no error messages.
Are you compiling your assets on the live server each time you deploy your changes? Try running npm run production or yarn build production on the live server.
Compiling assets on the local env and pushing them to the live one might not be suitable for some situations, especially if you're referencing evn values in your js files.
Thanks Pazitron.Running npm run production on live server returns error "cross-env is not recognised as an internal or external command, operable program or batch file"
I'm not for global packages on live servers. You probably are caching JS files and that is why you are not seeing any updates. SCP that JS file to your local computer and compare it to what you have in repo and they should be the same.