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

feat: introduce esm and cjs support #42

Merged
merged 3 commits into from Mar 1, 2021
Merged

feat: introduce esm and cjs support #42

merged 3 commits into from Mar 1, 2021

Conversation

n1ru4l
Copy link
Collaborator

@n1ru4l n1ru4l commented Feb 22, 2021

I am following this comment:

d3/d3#3469 (comment)

This should close #3 (and also #42)

See https://unpkg.com/browse/gqtx@0.8.1-a9325d31.0/ for a folder structure overview of the published package.
See https://unpkg.com/browse/gqtx@0.8.1-913ef0b2.0/ for a file directory overview.

@n1ru4l n1ru4l changed the title feat: introduce esm and cjs support according to https://github.com/d… feat: introduce esm and cjs support Feb 22, 2021
@n1ru4l n1ru4l requested a review from sikanhe February 22, 2021 17:21
@sikanhe
Copy link
Owner

sikanhe commented Feb 22, 2021

LGTM

@n1ru4l
Copy link
Collaborator Author

n1ru4l commented Feb 22, 2021

Please not merge yet I still need to confirm out whether it works correctly with the most common use-cases

@sikanhe
Copy link
Owner

sikanhe commented Feb 22, 2021

@n1ru4l feel free to merge when you have it working!

@n1ru4l n1ru4l force-pushed the feat-esm-cjs branch 3 times, most recently from 3f7134f to dbe8740 Compare February 23, 2021 12:08
@n1ru4l
Copy link
Collaborator Author

n1ru4l commented Feb 23, 2021

Ok, it seems to work. It is a bit ugly though and all the files had to be moved to the package root... But it seems like its the only way to properly support both ESM and typescript in a backwards-compatible way until typescript introduces proper ESM support...

See https://unpkg.com/browse/gqtx@0.8.1-913ef0b2.0/ for a file directory overview.

Gonna leave this open for a few days if anyone has some more feedback. Otherwise, I will merge it probably some day on the weekend. Maybe @zth has something to add?

@n1ru4l n1ru4l merged commit e640f17 into master Mar 1, 2021
@n1ru4l n1ru4l deleted the feat-esm-cjs branch March 1, 2021 10:18
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.

None yet

2 participants