From f544cebb0a657e66a2ea627bd87cf4c9c887d857 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 26 Mar 2018 11:12:45 +0100 Subject: [PATCH] Compile modules ES code with webpack Allows for bundling of third-party modules and prevents error when using import/export syntax outside of type="module" script --- services/web/karma.conf.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/karma.conf.js b/services/web/karma.conf.js index d5d6c7ea42..d4eab91999 100644 --- a/services/web/karma.conf.js +++ b/services/web/karma.conf.js @@ -32,7 +32,8 @@ module.exports = function (config) { preprocessors: { // Run ES test files through webpack (which will then include source // files in bundle) - 'test/unit_frontend/es/**/*.js': ['webpack'] + 'test/unit_frontend/es/**/*.js': ['webpack'], + 'modules/**/test/unit_frontend/es/**/*.js': ['webpack'] }, frameworks: ['requirejs', 'mocha', 'chai-sinon'], // Configure webpack in the tests