Home › Forums › Chart Support › Can canvasjs work with webpack › Reply To: Can canvasjs work with webpack
We don’t have official npm package as of now. However you can add CanvasJS Charts / StockCharts to your React/Angular/Vue.js app easily. Please follow the below instructions for the same.
1. Save CanvasJS script in your project source folder (src or src/assets or src/lib)
2. Import the script to your app (Please note to mention file path properly, if you have saved library in different folder like src/assets or src/lib)
For Charts: import * as CanvasJS from './canvasjs.min';
For StockCharts: import * as CanvasJS from './canvasjs.stock.min';
import * as CanvasJS from './canvasjs.min';
import * as CanvasJS from './canvasjs.stock.min';
If you have license, you can download the commercial version of CanvasJS from My Account.