Skip to content
This repository has been 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 opened this issue Aug 14, 2022 · 2 comments
Open

Comments

@mikaelkaron
Copy link

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

@charlypoly
Copy link

@mikaelkaron The maintained version lives here: https://github.com/Codex-/cosmiconfig-typescript-loader/

@mikaelkaron
Copy link
Author

Ok. I guess I’ll file a bug there to. Thanks @charlypoly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants