codymikol / karma-webpack

Karma webpack Middleware
MIT License
830 stars 222 forks source link

fix(mocha-env-loader): add `webpack >= v4.0.0` support #341

Closed ryanclark closed 6 years ago

ryanclark commented 6 years ago

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior?

Currently the loader uses this.options, which is deprecated in webpack 4, causing an error.

What is the new behavior?

Adds the compilation name to the loader options and uses loader-utils to parse the loader context and retrieve the name.

Drops webpack < v4.0.0 support as it doesn't work due to webpack-dev-middleware not supporting anything less than v4.0.0.

Does this PR introduce a breaking change?

michael-ciniawsky commented 6 years ago

https://github.com/webpack-contrib/karma-webpack/releases/tag/v4.0.0-beta.0 already droppedwebpack < v4.0.0, this PR is semver patch :)

michael-ciniawsky commented 6 years ago

Released in v4.0.0-rc.0 🎉

scipper commented 6 years ago

finally helpful error messages on failing execution! 🙌 I was searching for hours why my typescripts tests are not executed when I import certain modules. Now I now: I have to put them in the files array! Thanks folks! 😍