dotansimha / dotansimha/graphql-code-generator

emitLegacyCommonJSImports=false on graphql-modules preset

Open
#8,806 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

### Which packages are impacted by your issue?

@graphql-codegen/graphql-modules-preset

### Describe the bug

When emitLegacyCommonJSImports is set to false, the graphql-modules preset generates imports without ".js" extensions.

### Your Example Website or App

na

### Steps to Reproduce the Bug or Issue

Just use the graphql-modules preset with emitLegacyCommonJSImports set to false. The generated code won't contain ".js" extensions on imports.

### Expected behavior

With emitLegacyCommonJSImports set to false. The generated code should contain ".js" extensions on imports.

### Screenshots or Videos

_No response_

### Platform

- OS: [e.g. macOS, Windows, Linux]
- NodeJS: [e.g. 18.5.0]
- `graphql` version: [e.g. 16.3.0]
- `@graphql-codegen/*` version(s): [e.g. 2.6.2]

### Codegen Config File

_No response_

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.