-
Notifications
You must be signed in to change notification settings - Fork 28
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
Unable to use iitm ESM loader with @apollo/server #31
Comments
Likely related to this: DataDog/dd-trace-js#3595 |
It appears the issue is in Node 20 the exports are obtained via AST parsing. Export * is not a valid export it just exports all data from the file it's importing so wrapping |
This does appear to be related in pre Node 20. However in Node 20 the proxying of exports outputs invalid syntax. |
This change adds support for modules that export entities through the `export * from 'module'` ESM syntax. This resolves issue nodejs#31.
This change adds support for modules that export entities through the `export * from 'module'` ESM syntax. This resolves issue nodejs#31.
This change adds support for modules that export entities through the `export * from 'module'` ESM syntax. This resolves issue nodejs#31.
This change adds support for modules that export entities through the `export * from 'module'` ESM syntax. This resolves issue #31.
This should be resolved by #43. |
Expected Behavior
Using import-in-the-middle/hook.mjs as a loader in an ESM project works when @apollo/server is used by the project.
Actual Behavior
The node application failed to start. The behavior varies based on the version of node in use.
Node v18: exit code 13
Node v20: exit code 1 with
SyntaxError: Unexpected token '*'
Steps to Reproduce the Problem
The text was updated successfully, but these errors were encountered: