diff --git a/src.browser/shims.ts b/src.browser/shims.ts index 9a8dd58a9..adf7c3737 100644 --- a/src.browser/shims.ts +++ b/src.browser/shims.ts @@ -1 +1,4 @@ + require('setimmediate'); + +module.exports.platform = 'browser'; diff --git a/src.ts/ethers.ts b/src.ts/ethers.ts index 3c185b084..a9dec757a 100644 --- a/src.ts/ethers.ts +++ b/src.ts/ethers.ts @@ -1,8 +1,7 @@ 'use strict'; // This is empty in node, and used by browserify to inject extra goodies -import {} from './utils/shims'; - +import { platform } from './utils/shims'; import { Contract, Interface } from './contracts'; import * as providers from './providers'; @@ -37,6 +36,7 @@ export { wordlists, + platform, version }; diff --git a/src.ts/utils/shims.ts b/src.ts/utils/shims.ts index 2e6d7e87f..d3a94759b 100644 --- a/src.ts/utils/shims.ts +++ b/src.ts/utils/shims.ts @@ -1,3 +1,3 @@ /* no shims for node */ -export default { }; +export const platform = 'node';