update karma to v6 and webpack to v5 and make corresponding updates to test configs #883
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After multiple try and re-try, this PR allows to switch to webpack 5 - which among other things allow to have a much more reduced file size for our default builds in
dist
(488199 bytes for the minified version with webpack 4 vs 472703 with webpack 5. Non minified is also reduced but much less).It also updates other dependencies that have be held back due to that, like karma to v6.
The biggest issue I had here, was with the
karma-webpack
dependency, which didn't seem to work with either karma 6 or webpack 5.Because
karma-webpack
is only a minor dependency used for tests and because of encouraging feedbacks, I decided to rely on the pre-release "alpha.5" release of that version, released more than a month ago.Everything seems to work with that version.
I also chose to remove
tests/integration/index.js
, which required all integration tests files, in profit of using the karma configuration file for that, at it seems to be the idiomatic way to do it.