Feat: Add react-hot-loader
Combine webpack and browser-sync on one port
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import manifest from '../rev-manifest';
|
||||
/* eslint-disable import/default */
|
||||
import config from '../../webpack.config';
|
||||
/* eslint-enable import/default */
|
||||
|
||||
let chunkManifest;
|
||||
try {
|
||||
@@ -30,16 +27,9 @@ function removeOldTerms(str = '') {
|
||||
return str.replace(challengesRegex, '');
|
||||
}
|
||||
|
||||
function getBundleLocation() {
|
||||
return __DEV__ ?
|
||||
config.output.publicPath + '/bundle.js' :
|
||||
rev('/js', 'bundle.js');
|
||||
}
|
||||
|
||||
export default function jadeHelpers() {
|
||||
return function jadeHelpersMiddleware(req, res, next) {
|
||||
res.locals.removeOldTerms = removeOldTerms;
|
||||
res.locals.getBundleLocation = getBundleLocation;
|
||||
res.locals.rev = rev;
|
||||
// static data
|
||||
res.locals.user = req.user;
|
||||
|
Reference in New Issue
Block a user