web
web copied to clipboard
Import structure is being detected as circular dependencies
Prior Issues
Are there any existing issues or PRs that relate to this problem? If so, link them here.
What is the current behavior?
Hooks all import dependencies from ../ (or the index.js file) which also exports all the hooks. This is being detected as a circular dependency in our build system.
What is the expected behavior?
Instead of importing from ../ the hooks should import from the dependant hook file directly
For example:
import { useRafCallback } from '..'; becomes import { useRafCallback } from '../useRafCallback/useRafCallback';
Environment Details
- _
@react-hookz/webversion:15.0.1 - _
reactversion:17.0.1 - _
react-domversion:17.0.1 - _
typescriptversion:4.5.2 - _Did this work in previous versions? unknown but probably not