Small adjustments for esm (& default build) (#798)

This commit is contained in:
Jaco Greeff
2020-12-11 17:08:16 +01:00
committed by GitHub
parent 28b2435019
commit 4c02b25a2d
40 changed files with 101 additions and 94 deletions
+3 -3
View File
@@ -3,6 +3,6 @@
import { TextDecoder as NodeTextDecoder } from 'util';
export default typeof TextDecoder === 'undefined'
? NodeTextDecoder as unknown as typeof TextDecoder
: TextDecoder;
export const TextDecoder = typeof global.TextDecoder === 'undefined'
? NodeTextDecoder as unknown as typeof global.TextDecoder
: global.TextDecoder;