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
This commit is contained in:
Alasdair Smith 2018-03-26 11:12:45 +01:00
parent 13dfb8d6db
commit f544cebb0a

View file

@ -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