mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 06:30:53 +03:00
added webpack-dev-middleware for recompiling on source changes
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user