Problem seems to be related to the removal of webpack-dev-middleware in karma-webpack@5
Assets produced by webpack, such as new Worker("some/path", import.meta.url) are no longer served automatically by the karma server, so anything that tries to load them will get a 404
A temporary workaround has been applied, which is to explicitly set a webpack.output.path (which is usually not required), and then add that same path to the files array:
See https://github.com/ryanclark/karma-webpack/issues/498 (which itself may be waiting on https://github.com/karma-runner/karma/pull/3638)
In short, the issue is as follows:
webpack-dev-middleware
inkarma-webpack@5
new Worker("some/path", import.meta.url)
are no longer served automatically by the karma server, so anything that tries to load them will get a 404webpack.output.path
(which is usually not required), and then add that same path to thefiles
array: