-
-
Notifications
You must be signed in to change notification settings - Fork 819
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
Error importing with --experimental-modules #913
Comments
Do you know what is required for an npm package to be compatible with this experimental modules implementation? Perhaps there's some TypeScript feature we can turn on? |
@dandv import graphqlTools from 'graphql-tools'
// or
import * as graphqlTools from 'graphql-tools'
// and then get your `makeExecutableSchema` from there:
const { makeExecutableSchema } = graphqlTools edit: you might like: https://github.com/standard-things/esm. you can keep the |
@stubailo: yes, the modules property in Here's a gist outputting both. |
I just left a comment on that Gist, explaining what needs to happen for native ESM support. |
@jaydenseric Unfortunately GitHub doesn't send notifications for comments on gists. |
Please see jestjs/jest#4637 (comment).
|
Another option is to continue outputting CommonJS until Node 12 drops the
|
I've pasted this example in an
.mjs
file. When I attempt to run it with node v10.5.0 with the--experimental-modules
flag, I get this error:The text was updated successfully, but these errors were encountered: