- Download source files
- Run
npm install
to install all dependencies. - Run
npm run build
to bundlesrc/app.js
intodist/bundle.js
- Open
index.html
in a browser.
Notice that imports should be done as the following:
// Do this. Import entire module into a single variable.
import * as Highcharts from 'highcharts';
// Do not do this. Works only with modules who exports a default
import Highcharts from 'highcharts'
Hi, I do not remember the exact use case for the gist anymore as its been a while, but I assume it was meant as a showcase/workaround to simply load and utilize Highcharts in a TypeScript project.
There has been a lot of development in Highcharts regarding TypeScript support since this gist was created, so you should look to Highcharts Type Declarations and Load Highcharts as a transpiled ES6/UMD module for more up to date information 🙂