Skip to content
This repository was archived by the owner on Oct 2, 2022. It is now read-only.
This repository was archived by the owner on Oct 2, 2022. It is now read-only.

default export of cosmiconfig-typescript-loader not working in esm #238

Open
@mikaelkaron

Description

@mikaelkaron

Description

As mentioned in downstream issues in graphql-codegen and graphql-config it looks like loading cosmiconfig-typescript-loader default export is buggy in esm.

What went wrong?

The error is exposed when trying the latest esm example in graphql-codegen.

What did you expect should have happened?

Execution without error

What was the config you used?

Nothing except what's available in the example.

What stacktrace or error messages did you see?

loadTs is not a function

This is caused by default import of cosmiconfig-typescript-loader and later export of loadTs

Similar or dependent issues:

A lot of other packages have the same problems with esm and there's a temporary fix in the default-import package that also adds a few related issues:

Additional Data

Version of cosmiconfig-typescript-loader you're using:

3.1.1

Node Version:

18.4

Operating System:

Windows

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