Support for ESM config files (with "type": "module")
Author: tschaubCreated Apr 26, 2021Updated May 12, 2026
If a project's package.json has "type": "module", Karma fails to load the config file. I'm wondering if there would be interest in supporting ESM config files in addition to CJS (and the other currently supported flavors).
While this might not be complete or the desired solution, it looks like something like this could add ESM config support: https://github.com/tschaub/karma/commit/99f1a92ec85a1dd2efbcd0faf1ad653e4b29cf8e
Source: karma-runner/karma