Notes:-
Problem with using <src = 'script.js> is when you have multiple scripts. you would have to organize them in such a way that the dependencies, if any are satisfied(manually keep track of which script depends on another script). For example, if in {script.js,script1.js,script2.js} consider script.js where you want to refer to a global variable in script2.js, you want the order to be {script2.js,script.js,script1.js}. The algorithm which does this ordering is called "topological sorting".
ES6 Modules : In Vizhub platform, when you rename the js file to index.js, a bundle.js is created(only in vizhub) by means of "rollup" internally(within vizhub). A bundle is a file that combines many modules together.
D3 only uses named exports
can use a CDN to import d3