fix: module exports not working

Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
2023-07-18 12:46:39 +02:00
parent c392b27cac
commit 98c80fcd20
2 changed files with 9 additions and 11 deletions

View File

@ -1,11 +1,6 @@
import TCGdex from './tcgdex'
import unfetch from 'unfetch'
import TCGdex from './tcgdex'
TCGdex.fetch = window.fetch ?? unfetch as any
if (typeof global !== 'undefined') {
global.TCGdex = TCGdex
}
if (typeof window !== 'undefined') {
(window as any).TCGdex = TCGdex
}
export default TCGdex