cypress-axe icon indicating copy to clipboard operation
cypress-axe copied to clipboard

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

Open Phonesis opened this issue 3 years ago • 0 comments

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?

Phonesis avatar Feb 24 '22 17:02 Phonesis