Closed marvinhagemeister closed 3 years ago
Hey @marvinhagemeister could you confirm that in your karma configuration that you have 'webpack' included as a framework? This is usually the culprit when no tests are found by the runner at this time.
Looking at the upgrade guide it says that chunks: 'all' is still a recommendation.
It's recommended to use either the defaults or optimization.splitChunks: { chunks: 'all' }.
@codymikol That's interesting, I didn't know that. Iirc we didn't have it on the Frameworks so it's likely the cause of the problem 👍
We've replaced webpack with esbuild in the past weeks. So it doesn't make sense for me to spend more time investigating this I'm afraid.
This PR contains a:
Motivation / Use-Case
Just tried to upgrade our karma setup over at https://github.com/preactjs/preact to webpack v5 and ran into the issue that all chunks contained no user code. They only contained a thin module wrapper by webpack.
Some digging revealed that the
optimize.splitChunks
settings are to blame. The webpack v4 to v5 upgrade guide hints that setting it is not necessary anymore. When I follow that advice and remove them, the chunks work as expected.Breaking Changes
Additional Info