Skip to content

Default import not working #67

Description

@im-calvin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions