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
Description
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
.
- fetch local copy of https://github.com/dotansimha/graphql-code-generator/tree/master/examples/typescript-esm
run
npm run 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:
- NextJS
- Styled Components
- Typescript
Additional Data
Version of cosmiconfig-typescript-loader
you're using:
3.1.1
Node Version:
18.4
Operating System:
Windows
Metadata
Metadata
Assignees
Labels
No labels