added webpack-dev-middleware for recompiling on source changes
This commit is contained in:
parent
314ab237ec
commit
21b7f16b1e
4 changed files with 63 additions and 14 deletions
|
@ -38,6 +38,17 @@ function prodLangs() {
|
|||
|
||||
const availableLanguages = conf.l10n_dev ? allLangs() : prodLangs();
|
||||
|
||||
if (conf.env === 'development') {
|
||||
const webpack = require('webpack');
|
||||
const webpackDevMiddleware = require('webpack-dev-middleware');
|
||||
const config = require('../webpack.config.js');
|
||||
config.devtool = 'inline-source-map';
|
||||
const compiler = webpack(config);
|
||||
app.use(webpackDevMiddleware(compiler, {
|
||||
publicPath: config.output.publicPath
|
||||
}));
|
||||
}
|
||||
|
||||
app.engine(
|
||||
'handlebars',
|
||||
exphbs({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue