I'm in the process of packaging a library so that it can be utilized in two different ways:
<script src="myLib.js"/>
as well as
mylib = require('myLib')
However, myLib relies on several other libraries, some of which I believe the user of myLib will already have.
Is there a way to create myLib and enable its usage in either of the mentioned methods without including all the dependent libraries within myLib? What approach is considered the best practice?