Chartjs-'Uncaught ReferenceError: Chart is not defined' when using Chart.JS with vanilla JS

0๐Ÿ‘

<script type="module" have a default scope of the module level and not the global level.


Follow the getting started guide if you want to use Chart as a global:

<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

Leave a comment