diff --git a/src/config.js b/src/config.js index e6df93b..44ebfbe 100644 --- a/src/config.js +++ b/src/config.js @@ -4,6 +4,10 @@ import DEFAULT_CONFIG from './config.default' function getUserConfigFile() { try { + if (fs.existsSync(path.join(process.cwd(), 'cypress-image-diff.config.cjs'))) { + // eslint-disable-next-line import/no-dynamic-require, global-require + return require(path.join(process.cwd(), 'cypress-image-diff.config.cjs')) + } // eslint-disable-next-line import/no-dynamic-require, global-require return require(path.join(process.cwd(), 'cypress-image-diff.config')) } catch (err) {