Using http://valor-software.com/ng2-charts/ I must add a script
tag in my index for:
<script src="node_modules/chart.js/src/chart.js"></script>
However, because the scope of the app does not see node_modules
, I have to do:
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
Which is awful.
Is there a way to add a JS file to the build?
- No, using
import
does not work in this case as it is needed as a global variable (the library is built that way)