Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smmccabe
Copy link

@smmccabe smmccabe commented Feb 3, 2022

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

@surbhirverma
Copy link

surbhirverma commented Aug 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warnings with Webpack 5
2 participants