
Magento 2 bundles an example grunt based server-side compilation workflow. grunt livereload Share Improve this question Follow edited at 15:10 asked at 15:19 PINC 11. Incase if you have your own server, then live reload must refresh the pages served from your own server. LiveReload routing is currently supported on the magento2, pwa-studio and. Above code works well when you don't need/have your own server to serve pages. The connect task in above code run its own server to serve the static pages.Īnd the livereload task refreshes the pages if any changes in the files that is mentioned in the watch:livereload task. connect-livereload itself does not serve the livereload.js script. Getting Started This plugin requires Grunt 0.4.
GRUNT CONNECT LIVERELOAD EXAMPLE GENERATOR
livereloadSnippet var mountFolder = function ( connect, dir ) this middleware can be used with a LiveReload server e.g. grunt-express-angular-example is a minimal example that shows how you can use grunt-express to run a basic express server that hosts an Angular app, it is based on bford's Yeoman generator generator-angular. If you need liveReload on static html files, then place it before the static.


In your connect or express application add this after the static and before the dynamic routes. grunt-contrib-connect or grunt-contrib-watch.

Generated on using generator-webapp 0.1.7 'use strict' var lrSnippet = require ( 'grunt-contrib-livereload/lib/utils' ). this middleware can be used with a LiveReload module e.g.
