Changes in the vue file not applying in the browser

Viewed 2312

I am working in project having technology(laravel + vuejs).In that there is a form created in vue file and i want to add a text in the vue file.So as i have seen that "when any changes is done in vue file then need to rebuild the application".And i see that there are commands for rebuild the application is npm run dev , npm run prod , npm run watch and npm run watch-poll. I have tried all this commands after saving the file through FTP but sometimes the changes is applied (Note : Not immediately but after some duration) and sometimes no changes apply in the browser.When i tried the above command by executing it then there is no such error occurs and the rebuild is done successfully.So what will be the issue can you please suggest something that i need to configure?

Below is the code of package.json,webpack.mix.js file and after that i have attached image of putty in which application rebuild is done.

enter image description here

enter image description here

enter image description here

Thanks in advance!

1 Answers

I think you are not understanding what npm run dev/prod/watch do. If you alter the .vue file in your resources folder, then have npm rebuild your assets, then ftp the vue file to your server, nothing should happen.

Depending on how you have your laravel mix file set-up, the file you need to ftp to the server is likely public/js/app.js.

You should really consider getting your local environment setup for development, there is nothing I can image worse than viewing your changes by ftp-ing files to a server.

Related