diff --git a/Request.ts b/Request.ts index 7c1b98c..74574f3 100644 --- a/Request.ts +++ b/Request.ts @@ -1,5 +1,5 @@ import fetch from 'isomorphic-unfetch' -import pkg from './package.json' +import { version, name } from './package.json' export default class RequestWrapper { private static cache: Array> = [] @@ -38,7 +38,7 @@ export class Request { // Fetch Response const resp = await fetch(this.url, { headers: { - 'user-agent': `${pkg.name}/${pkg.version}` + 'user-agent': `${name}/${version}` } }) if (resp.status !== 200) {