-
Hi, I'm trying to upgrade chartjs from 2 to 3 in https://github.com/vmiklos/osm-gimmisn/, which uses webpack and typescript. I created a minimal repro here: https://github.com/vmiklos/chartjs-demo How to reproduce the problem:
Here is the commit: vmiklos/chartjs-demo@4c3f881 -- it just adds the dependency and imports + registers the plugin, the actual chart does not try to use it yet.
The output I get is:
While I expect that the build just finishes without errors, similar to when not yet using chartjs-plugin-datalabels. Any idea what is the problem here? Thanks! :-) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
At least it would be good to know what is a known-good setup for chartjs-plugin-datalabels and typescript. https://chartjs-plugin-datalabels.netlify.app/guide/typescript.html explicitly talks about typescript, so would it be that nobody tried to use this plugin with webpack? That would be a bit surprising, but perhaps that's it. Or is there anything special in my webpack config? Thanks! |
Beta Was this translation helpful? Give feedback.
-
vmiklos/chartjs-demo@843f55e fixes the problem, it was a webpack config problem, nothing to do with chartjs-plugin-datalabels. Thanks @balazsbotond for answering this. |
Beta Was this translation helpful? Give feedback.
-
@vmiklos - I still am getting the same errors even after making
This is my webpack.config.js
|
Beta Was this translation helpful? Give feedback.
vmiklos/chartjs-demo@843f55e fixes the problem, it was a webpack config problem, nothing to do with chartjs-plugin-datalabels. Thanks @balazsbotond for answering this.