-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.6.4 ESM build broken #1487
Comments
Surprised this isn't a more prominent issue. Any known work around for this ? |
We had the same issue and we solve it this way:
|
having the same problem, the 7.5.0 works , graphql-middleware can be the latest, just make sure to do the following when applying the middleware:
|
I was having the same issue, downgrade it to |
the fix was released in 7.6.5 |
Bug report
Describe the bug
Generated ESM
index.js
contains the following (which is identical totypings/index.d.ts
):with
types.js
containing:Problems here are:
types.js
module - noIRule
export.'./types'
,'./constructors'
, and'./shield'
- all are missing.js
extensions that are required due to relative import rules.IRule
is TypeScript-specific and should not be emitted in the JavaScript file to begin with...To Reproduce
"type": "module"
inpackage.json
fileImport
{ IRules }
from"graphql-shield"
. (Or pick your favorite export)This is my GraphQL Schema.
Not required to reproduce the error
Not required to reproduce the error.
Not required to reproduce the error.
When I keep the node resolution flag but comment out the first line of
esm/index.js
and run the application, it starts up fine. Without the flag, Node complains about the next module without a.js
extension...Expected behavior
The build process should produce ESM compliant code.
Actual behaviour
See the description above.
The text was updated successfully, but these errors were encountered: