I have a frontend JS project. I want to use Mocha for testing and webpack for bundling. I use ES6 modules in my project.
Mocha requires to set the type
of my package to module
as described here.
While webpack fails in this case with
[webpack-cli] Failed to load 'webpack.config.js'
[webpack-cli] TypeError: Invalid host defined options
...
How can I use mocha and webpack in an ES6 project?