I found this thread which helps me to import other JS libs. It works with one vis library so far. However, when I tried to import another library to compute stat to show with vis, it might work as it doen't complain anything but I'm not sure how I can inspect the value or print it out to check or show the values. I tried 'document.write();' but no luck. Any help will be appreciated.
code below
// work
require.config({
paths: {
'Plotly': 'https://cdn.plot.ly/plotly-latest.min'
}
});
require(['Plotly'], function(Plotly) {
document.write('Hello world');
});
//not work
require.config({
paths: {
'Stat': 'https://unpkg.com/simple-statistics@4.1.0/dist/simple-statistics.min.js'
}
});
require(['Stat'], function(Stat) {
document.write('Hello world');
});
Cheers,