I'm using VSCode with Live Server extension and a tailwindcss npm watch process in the terminal.
It often happens that on save, the live server reloads the page before the tailwindcss process finishes analyzing all classes and compiling its css file. Which often results in me manually refreshing the page to see the changes. How can I improve this situation?
Related
I have been trying to perform a hot-reload for my flutter-web project.
Been struggling to get hot restart functionality enabled when running via viscose dev-containers. I tried:
Having the flutter run -d at the entry point.
Executing the debug via the vs-code debugger.
Neither of them solves the hot-restart issue on the browser on which the initial page is rendered after building from the inside container. Please help how to achieve what I am trying. TIA.
I'm running a local server on localhost through VS Code using nodemon on my mac. So everytime I save, the server restarts and updates. My problem is that VS Code always switches window to my browser when the server restarts, so my flow gets interrupted. There must be a way to prohibit VS Code from opening my browser, or at least not doing it at every restart of server?
Look into script your nodemon runs when it's watcher detects change and locate call that starts the browser there: presumably you have one in your "start server" script.
It would probably involve your local server address and call like require('child_process').exec(); see How to use nodejs to open default browser and navigate to a specific URL.
I kind of solved it by adding "BROWSER=none" so my start script (which otherwise only said "nodemon server.js"). But then the browser won't refresh automatically and I'm still curious what's causing it.
I was styling nested modal elements on a working styles.scss file and suddenly my extensions Live Sass Compiler and Live Server crushed. Every time i open my project Extensions host terminated unexpectedly and it purposes me open developer tools or restart extension host. What should i do in order to make it work again?
Today i opened the project and everything worked fine. Probably it was caused from an update of VSCode or live Sass Compiler conflicted with node-sass. I disabled temporally live Sass Compiler and i git reset to previous commit.
Helping a colleague out remotely with some coding using VS Code's LiveShare extension. I'd like to work on a file, save it, and have the server reload with the changes I have made. Typically this would just hot-reload when I save the file, but it isn't because I am remotely editing via live-share session. Also, even with a shared terminal I don't know of a way to restart the server as ctrl-c will exit out of the shared terminal. Any help would be greatly appreciated!
This is probably dependent on what type of code you are working on.
If it is js/css/html, you can launch the server with no cache and turn on the debugger, when you use the "Restart" function of the debugger, it will save the file and push the new version to the server.
I use the https://www.npmjs.com/package/http-server. It can be launched with no cache using the -c-1 option.
I've been using Atom, Sublime Text and Code, and all of those would make the server restart after any changes. With Netbens it doesn't happen.
I have two different servers in my project, one for the client and other for API. Simply executing the commands in either my OS's terminal or Netbeans's terminal also doesn't make the server to restart. Tried to look for suggestions but those I found also didn't happen. The solution was to modify the start file in Properties > Run and check the only checkbox it's in there, but nothing.
What's necessary to do in Netbeans to refresh the server automatically after saving any file? And also, how to run two at the same time? Client and API.