Home forums Using CanvasJS Can canvasjs work with webpack Reply To: Can canvasjs work with webpack




Thank you for the quick reply! I found the react example already actually and that is what I am currently trying to adapt to my VueJS project.

Honestly I don’t fully understand how it works in the React project. Maybe that’s just because I don’t really know React yet.

Anyway what I have tried to do so far is copying in the ./src/client/public/canvasjs.js file from that project into mine and then put the following line in my .vue file that I need it in:
const CanvasJS = require('../assets/js/canvasjs.js')

The result is that the CanvasJS variable is successfully created as an es6 module but doesn’t have the chart constructor defined in it.