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

change require format so it is always attempted, which won't confuse …

Open smmccabe opened this issue 4 years ago • 1 comments

Webpack 5 throws Critical dependency: require function is used in a way in which dependencies cannot be statically extracted when used with cypress-axe. This PR changes the flow so that require is always attempted within a try/catch as opposed to a conditional, which doesn't upset webpack.

I don't understand why there would ever be a situation where require doesn't exist, but this should still work in that case.

fixes #106

smmccabe avatar Feb 03 '22 18:02 smmccabe

this fixes issue for me in cypress axe. Can we get this merged?

surbhirverma avatar Aug 11 '22 06:08 surbhirverma