I'm using semantic-ui-react in a create-react-app based React app. I ran into an issue where simply using components like <CardGroup> or <StepGroup> throws a generic, and unfortunately unhelpful, error message:
ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization
After banging my head against the wall for several hours, I finally figured out that there are circular dependencies in those components, with <Card> and <Step> respectively.
Then I stumbled upon this old github issue, with this interesting comment. I would love to understand two things here:
- What aspect of the design makes this a difficult thing to resolve?
- How can/should this work with webpack?