A small chrome extension endpoint for livereload I build for my chrome-extension-kickstarter.
npm install --save-dev chromereload- reconnect after livereload restart
- reduce amout of reloads
- supports reload of non chrome pages
Include the module in your chrome extension context (backgroundscript/contentscript/etc.).
import ChromeReload from 'chromereload';
new ChromeReload({
host: 'localhost'
port: 35729,
reconnectTime: 3000 /* ms */,
debug: true
});For convenience you can also import the lib without configuring it:
import 'chromereload/devonly';this only works if process.env.NODE_ENV is set to development.