Closed loynoir closed 1 year ago
@antfu
Given
node
also have btoa
I suggest check Buffer
first
if (typeof Buffer === "function") {
// ...
} else if (typeof btoa === "function") {
// ...
}
It still fails as this logic was not updated:
https://github.com/Rich-Harris/magic-string/blob/master/src/SourceMap.js#L3
Env
service worker
Detail
Actual
Got Error.
Unsupported environment:
window.btoa
orBuffer
should be supportedExpected
service worker should be supported