From cc530666abf43d190d65cc0aff0db0360cd008c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez=20Capel?= Date: Fri, 11 May 2018 09:57:36 +0100 Subject: [PATCH] Configure handlerbars loader in webpack Needed for the metrics app. --- services/web/webpack.config.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index da0dc8257e..7050a7eb0e 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -1,5 +1,6 @@ const fs = require('fs') const path = require('path') +const webpack = require('webpack') const MODULES_PATH = path.join(__dirname, '/modules') @@ -60,10 +61,23 @@ module.exports = { cacheDirectory: true } }] + }, + { + test: /\.handlebars$/, + loader: "handlebars-loader", + options: { + compat: true, + knownHelpersOnly: false, + runtimePath: 'handlebars/runtime', + } }] }, - + resolve: { + alias: { + handlebars: 'handlebars/dist/handlebars.min.js', + jquery: path.join(__dirname, 'node_modules/jquery/dist/jquery'), + } + }, // TODO // plugins: {} } -