Plotly.js in Ionic 2

I’ve tried to use the plotly.js in Ionic 2 using the @types/plotly.js found here: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/plotly.js

To test this I’m using the test code found in the upper link. This code does work without Ionic after using ‘tsc’ and ‘browserify’. If I’m trying to run the ionic command ‘ionic serve’ I get a webpage with the following error:
"Runtime Error: It appears that you’re using glslify in browserify without its transform applied. Make sure that you’ve set up glslify as a source transform: https://github.com/substack/node-browserify#browserifytransform

Does anyone has any experience with using plotly.js in Ionic 2?

Thanks in advance,
Ronald

Solved!

There were two seperate problems at work here:

  1. glslify did not run correctly in browserify
  2. mapbox-gl used a no longer supported call

Both problems can be solved by adding the latest versions manually:

npm install --save glslify
npm install --save mapbox-gl

Now plotly.js can be used with ionic!