3 exports
.install = function(app
) {
4 var express
= require('express');
5 var resolveStatic
= require('./resolve-static');
6 var favicon
= require('serve-favicon');
8 var webpackMiddleware
= require('webpack-dev-middleware'); // eslint-disable-line node/no-unpublished-require
9 var webpack
= require('webpack'); // eslint-disable-line node/no-unpublished-require
12 webpackMiddleware(webpack(require('../../public/js/webpack.config')), {
18 publicPath
: '/_s/l/js/',
19 writeToDisk
: filePath
=> {
20 // We use the `webpack-manifest.json` in `hbs-helpers`
21 // to determine which dynamic/dependent chunks to serve
22 return /webpack-manifest\.json$/.test(filePath
);
32 express
.static('output/assets/styles', {
37 var staticServer
= express
.static(resolveStatic(), {
41 app
.use('/_s/lt/:cacheBuster', staticServer
);
42 app
.use('/_s/l', staticServer
);
44 app
.use(favicon(resolveStatic('favicon.ico')));