cht-conf
cht-conf copied to clipboard
Update to webpack 5.x
Describe the issue Webpack 5 promises to execute faster and produce smaller bundles (though this should be checked with our specific use case) so we should update when possible.
This will also mean we no longer support Node 8, which is ok because it's ancient anyway, but should be a major version change to make the breaking compatibility clear.
At the same time consider dropping support for Node 10, 12, and potentially 14...
I gave this a shot, but my very naive approach cause webpack to hang on execution in unit tests without any indication of why or where, so I've backed out for now.
Remember to reset the hashFunction
as explained in this comment: https://github.com/medic/cht-conf/pull/540#discussion_r1119345390
Copy/pasting my comment here for posterity's sake:
The unit tests were hanging because they were mocking timers. Webpack calls setImmediate
at some point during the compilation and since it was overridden by the mock, it never called its callback.