component-driven / cypress-axe

Test accessibility with axe-core in Cypress
MIT License
622 stars 86 forks source link

Dependencies cannot be statically extracted - error when using with Cypress component testing #122

Open Phonesis opened 2 years ago

Phonesis commented 2 years ago

I am trying to use this lib with the cypress/react lib for component testing.

When I import this lib to the Cypress/support/index.js I get the following error and components I attempt to mount fail to render with:

 fix Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

As soon as I remove the import (import 'cypress-axe') it goes away.

Am I doing something wrong?