-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: re-add export files #486
Conversation
"types": "./dist/browser.d.ts", | ||
"import": "./dist/browser.mjs", | ||
"require": "./dist/browser.js", | ||
"types": "./dist/browser.d.ts" | ||
"require": "./dist/browser.js" | ||
}, | ||
"./cairo": { | ||
"types": "./dist/cairo.d.ts", | ||
"import": "./dist/cairo.mjs", | ||
"require": "./dist/cairo.js", | ||
"types": "./dist/cairo.d.ts" | ||
"require": "./dist/cairo.js" | ||
}, | ||
"./napi-rs": { | ||
"types": "./dist/napi-rs.d.ts", | ||
"import": "./dist/napi-rs.mjs", | ||
"require": "./dist/napi-rs.js", | ||
"types": "./dist/napi-rs.d.ts" | ||
"require": "./dist/napi-rs.js" | ||
}, | ||
"./skia": { | ||
"types": "./dist/skia.d.ts", | ||
"import": "./dist/skia.mjs", | ||
"require": "./dist/skia.js", | ||
"types": "./dist/skia.d.ts" | ||
"require": "./dist/skia.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt these refer to the root files then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that would make Node.js load extra code and go thru one more import hop.
The export files are merely for compatibility with older versions of Node.js, as well as TypeScript and also old versions of other tools, such as Jest.
Fixes #485