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 conditional export for CommonJS #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DevSDK
Copy link

@DevSDK DevSDK commented Dec 11, 2023

Hi folks,
I have a problem using this package in the CommonJS environment in my company.

According to the nodejs specification [1], the 'require' key should be the target for CommonJS.

Therefore, change the target that is already built for the 'require' key for conditional exports.

[1] https://nodejs.org/api/packages.html#conditional-exports

@Fuzzyma
Copy link
Member

Fuzzyma commented Dec 11, 2023

Please use the esm package. I removed the support for csm to lower the burden of maintenance for me.
There is a section in the readme on how to use it: https://github.com/svgdotjs/svgdom#use-svgdom-as-cjs-module

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.

2 participants