I have installed Kirby via Herd.
How do you ensure that editing Kirby files (php,css,js…) in vscode ensures to give a reload in the browser?
Live server + the Firefox or Chrome plugin used to work, but since yesterday… it doesn’t anymore, and I have absolutely no idea why.
It simply stopped working. After a few quick tests it does work with .html files. But I am absolutely positive that via the live server plugin for firefox and chrome it worked…
After a full day of frustration and trial-and-errors I land here, in hope somebody who can guide me…
My best option right now is the vscode extention: Browser Refresh which you need to cmd+r to update the browser from within vscode.
Not ideal, but at least better than manually refresh the page.
Most people use BrowserSync for this, which you can add manually or as part of your build system if you have one. For example, using Laravel Mix you set it like this:
This will reload the browser if CSS/JS changes or any of the php templates/ snippets or any of the content txt get changed. You will need to adjust he paths if you structue things differently.
Thats great! I would suggest taking the SCSS watch out of the browsersync file watcher, because those get turned into CSS files which you are also watching. You might get a double reload in the browser with that. Saving the SCSS file will cause a reload and the SCSS to compile to change the CSS file, causing a second reload.