'You may need an appropriate loader to handle this file type' issue when upgrading from 2.9.4 to 3.1.1 #8953
-
We have a react application which uses chartjs to display various graphs. As there are more options from 3.1 for customizing the graphs, we were trying to upgrade the chartjs version from 2.9.4 to 3.1.1. After the upgrade the We are facing the error that appropriate loader is not present. The error does not show which loader is needed for the latest version to work. Please find the error message below |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Are you using chart.js as a bare lib or are you using a wrapper, in which case it might not be up to date and not support chart.js v3 |
Beta Was this translation helpful? Give feedback.
-
Mmh, it seems that |
Beta Was this translation helpful? Give feedback.
Mmh, it seems that
chart.js/dist/chart.js
contains object spread syntax ({ ...object }
), that triggers the error. You can fix the error by including thechart.js
lib in your/\.jsx?$/
rule, but I think there is an issue in Chart.js.