Skip to content
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

Merged
merged 1 commit into from
Jun 6, 2022
Merged

fix: re-add export files #486

merged 1 commit into from
Jun 6, 2022

Conversation

kyranet
Copy link
Owner

@kyranet kyranet commented Jun 5, 2022

Fixes #485

Comment on lines +16 to +33
"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"
Copy link
Collaborator

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

Copy link
Owner Author

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.

@favna favna merged commit d27a04a into main Jun 6, 2022
@favna favna deleted the fix/add-export-files branch June 6, 2022 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: imports don't work
2 participants