-
Notifications
You must be signed in to change notification settings - Fork 19
Doesn't work with native ESM modules #59
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
Comments
Hi Tom,
In your case, either install Or start using Draft-07 with This is not self explanatory and I will add a clarification to the readme. Sorry for the inconvenience, |
Hi - I don't think that's the issue, installing 10.0.0-rc1 doesn't resolve the issue, and the issue is about ESM exports and compatibility - if I dial it back to just Draft import { Draft } from "json-schema-library";
console.log(Draft); This still produces the error with the given repro:
|
Note previous discussion on this topic #51 Can you share a simple build-setup to reproduce your issue? |
The top post is a complete setup for reproducing the issue - here's the same thing as a gist if you want something git-clonable. |
If I create a module:
package.json:
index.mjs:
And run it, then this module doesn't provide the expected exports:
It looks like the ESM mode of using this module doesn't work - there isn't a type: module, or an exports: property in package.json.
It also looks like the modules that are getting generated by the
tsconfig
use imports that lack.js
extensions, so the source won't be compatible with native ESM either.The text was updated successfully, but these errors were encountered: