connect-browser-sync | Connect middleware for BrowserSync | Runtime Evironment library
kandi X-RAY | connect-browser-sync Summary
kandi X-RAY | connect-browser-sync Summary
Connect middleware for BrowserSync
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of connect-browser-sync
connect-browser-sync Key Features
connect-browser-sync Examples and Code Snippets
Community Discussions
Trending Discussions on connect-browser-sync
QUESTION
I did a fresh install of express app. And my
package.json
...ANSWER
Answered 2018-Aug-25 at 13:28Reaload plugin reloads the page only if the express server is restarted by nodemon. From the docs:
When you restart the server, the client will detect the server being restarted and automatically refresh the page.
Nodemon does not watch Pug templates, so it's not restarted on template change:
By default, nodemon looks for files with the
.js
,.mjs
,.coffee
,.litcoffee
, and.json
extensions.
You can set .pug
extension to be monitored by nodemon. But I think it will lead to unnecessary server restarts because Pug templates seem to be evaluated at runtime when the request for the page is happening.
Don't also forget to add reload script to all your pages by modifying the main layout template:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install connect-browser-sync
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page