component-driven / component-driven/cypress-axe
Dependencies cannot be statically extracted - error when using with Cypress component testing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 641
- Forks
- 90
- Avg merge
- 6h 8m
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning from Cypress/support/index.js by importing cypress-axe alongside the Cypress React component-testing setup. Trace how that import is bundled, then verify the component mount no longer fails and the static dependency warning is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, react, typescript
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100