Add webpack cold reloading

On changes to the react bundle
webpack will store the current redux state
in localStorage, waits (to allow the server to restart)
then refreshes the page. On page load, it checks if it
has state stored and loads it into the app.
This commit is contained in:
Berkeley Martinez
2016-03-14 17:22:56 -07:00
parent 6898d961bf
commit 4e12c45057
10 changed files with 114 additions and 83 deletions

View File

@ -3,12 +3,14 @@ var pmx = require('pmx');
pmx.init();
var _ = require('lodash'),
Rx = require('rx'),
loopback = require('loopback'),
boot = require('loopback-boot'),
expressState = require('express-state'),
path = require('path'),
setupPassport = require('./component-passport');
Rx.config.longStackSupport = process.env.NODE_DEBUG !== 'production';
var app = loopback();
var isBeta = !!process.env.BETA;