Skip to content

No default ES module export when using import dgraph from "dgraph-js" #41

@aryzing

Description

@aryzing

I'm currently bundling my server project using webpack, while using babel-loader for the transpilation (set with the modules: false option so module import code is handled by webpack.

When importing dgraph-js, it throws a runtime error if I import it without star, but works fine with the star import:

import dgraph from 'dgraph-js' // ERROR in runtime
import * as dgraph from 'dgraph-js' // OK

The last time the package was published was about 6 months ago, not sure if trying again with a newer version of TypeScript would help, perhaps using the esModuleInterop: true flag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions