How to register third-party JS libraries?

Elgg version = 3.3.13

I use elgg_define_js( ) to register third-party JS libraries in a start.php file of my plugin. Some works but some does not. 

Working

elgg_define_js('chart_js', [

    'src' => '/mod/my_plugin/vendors/JS/Chart.js'

]);

 

Not Working

elgg_define_js('pptxgen_js', [

    'src' => '/mod/my_plugin/vendors/JS/pptxgen.bundle.js'

]);

I am very curious why registering the second library does not work.

Clarification/suggestion would be greatly appreciated.

Thanks!

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking