cypress-axe
cypress-axe copied to clipboard
change require format so it is always attempted, which won't confuse …
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
this fixes issue for me in cypress axe. Can we get this merged?