Please tell us about your environment:
Ubuntu 17.04 64bit
Browser: doesn't matter
Current behavior:
The mocha-env-loader still uses the this.options API which was deprecated in webpack@3 which has been removed in webpack@4. So I'm getting TypeError: Cannot read property 'name' of undefined errors when trying to use my own webpack config.
Expected/desired behavior:
Plugins should get their options via this.query -> Migration guide
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
Running my tests with the babel-loader@7.1.2 plugin results in this error:
ERROR in ./test/basicTest.js (./node_modules/karma-webpack/lib/mocha-env-loader.js!./test/basicTest.js)
Module build failed: TypeError: Cannot read property 'name' of undefined
at Object.module.exports (/path-to-project/node_modules/karma-webpack/lib/mocha-env-loader.js:19:24)
This line seems to fix the problem, although this was just a quick try:
I'm submitting a bug report
Webpack version: 4.8.1
Webpack Karma version: 3.0.0
Karma version: 1.7
Please tell us about your environment: Ubuntu 17.04 64bit
Browser: doesn't matter
Current behavior: The
mocha-env-loader
still uses thethis.options
API which was deprecated in webpack@3 which has been removed in webpack@4. So I'm gettingTypeError: Cannot read property 'name' of undefined
errors when trying to use my own webpack config.Expected/desired behavior: Plugins should get their options via
this.query
-> Migration guideRunning my tests with the
babel-loader@7.1.2
plugin results in this error:This line seems to fix the problem, although this was just a quick try:
My karma configuration