Dynamically import IIFE (and JSON) files in the browser.
For when you want to lazy-load some files, or do some really basic code splitting.
const load =
promise = load(url, [options])
url
: stringoptions
: objecttype
: string. Either'iife'
or'json'
The promise will reject if there is an error fetching or evaluating the file.
If the file is successfully evaluated, the result will be cached for future requests.