cht-conf icon indicating copy to clipboard operation
cht-conf copied to clipboard

Update to webpack 5.x

Open garethbowen opened this issue 2 years ago • 2 comments

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...

garethbowen avatar Feb 22 '23 01:02 garethbowen

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.

garethbowen avatar Feb 22 '23 01:02 garethbowen

Remember to reset the hashFunction as explained in this comment: https://github.com/medic/cht-conf/pull/540#discussion_r1119345390

garethbowen avatar Feb 28 '23 01:02 garethbowen

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.

m5r avatar Jul 24 '24 14:07 m5r