::SOURCE_FILE:: must appear on the first line so that the .js.map line numbers match with our generated .js file line numbers
Added a comment to explain why that part of the file isn't formatted nicely with line breaks like the rest of the file.
This partially reverts bbcb8bea07
It's designed to solve exactly this problem, and has been universally available since 2020.
The most likely scenario for `globalThis` to fail is if the user is stuck with an old browser, in which case `self` will be available. `window` will be too, but `self` also works in web workers.
It took a lot of work to get web workers to work, but web workers finally work!
`transferList` doesn't seem to work, though. It makes the object
inaccessible as expected, but it doesn't seem to affect performance.
If the code is loaded via AMD/requirejs:
- we call define() instead of exporting 'lime' globally
- we disable AMD while the embedded libraries are loading, so that they
register themselves in the global scope.