cyntler / cyntler/hamburger-react

Default import not working

Open
#67 4 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
1k
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Just had a really weird bug I want to document. I was using the import as expected:

`import Hamburger from "hamburger-react";`

and for some reason I was running into this issue, `Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.` which means that my import wasn't right.

Super weird since the default import is already specified **and** it works in development, but it fails when I run `npm run build`

If I change the import to ` import {Squash as Hamburger} from 'hamburger-react';`, it works again.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.