I am trying to import and use Plotly.js in my angular2-meteor project. I got it working by adding plotly.js in the public folder and adding a script tag like this:
And just declaring Plotly:
declare var Plotly: any;
However this feels very un-meteor/un-angular-like.
So then I found out there is a Plotly npm package. However I can’t figure out how to use it. The readme says to use require:
var Plotly = require('plotly.js');
But require is not recognized, and adding
aramk:requirejs gives conflicts.