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

refactor: move to esm in sources #10879

Merged
merged 1 commit into from
Nov 17, 2022
Merged

refactor: move to esm in sources #10879

merged 1 commit into from
Nov 17, 2022

Conversation

dangreen
Copy link
Collaborator

Move to native ESM in sources with "moduleResolution": "NodeNext".

Also, it fixes the problem that I met here: https://github.com/reactchartjs/react-chartjs-2/pull/1109/files

The inferred type of 'Line' cannot be named without a reference to '../node_modules/chart.js/dist/chunks/helpers.core.js'. This is likely not portable. A type annotation is necessary.

For some reason, bundled types work differently with "moduleResolution": "Node" and "moduleResolution": "NodeNext".

@dangreen dangreen marked this pull request as ready for review November 16, 2022 21:35
@kurkle
Copy link
Member

kurkle commented Nov 17, 2022

So the changes are for tsc to find the files?

It seems developers are working for the tools and not the other way around, which is 💩 /rant

@dangreen
Copy link
Collaborator Author

@kurkle Sooner or later, it would still have to be done cause ESM is the new standard. And I don't know why, but it also fixes the problem I met.

@etimberg etimberg merged commit 5144127 into chartjs:master Nov 17, 2022
@dangreen dangreen deleted the refactor-esm-sources branch November 17, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants