From b45b2e21db237b6ba883f5ea88906da1b58691fc Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Wed, 5 Jun 2019 12:26:50 -0500 Subject: [PATCH] fix(@embarkjs): unconditionally require symlinked embarkjs-* modules --- packages/embark-whisper/src/index.js | 2 +- packages/embark/src/lib/modules/ipfs/index.js | 2 +- packages/embark/src/lib/modules/swarm/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/embark-whisper/src/index.js b/packages/embark-whisper/src/index.js index 90baede34..f59141cc9 100644 --- a/packages/embark-whisper/src/index.js +++ b/packages/embark-whisper/src/index.js @@ -130,7 +130,7 @@ class Whisper { if (process.platform === 'win32') linkedModulePath = linkedModulePath.replace(/\\/g, '\\\\'); const code = ` - const __embarkWhisperNewWeb3 = EmbarkJS.isNode ? require('${linkedModulePath}') : require('embarkjs-whisper'); + const __embarkWhisperNewWeb3 = require('${linkedModulePath}'); EmbarkJS.Messages.registerProvider('whisper', __embarkWhisperNewWeb3.default || __embarkWhisperNewWeb3); `; diff --git a/packages/embark/src/lib/modules/ipfs/index.js b/packages/embark/src/lib/modules/ipfs/index.js index f3e3d75cb..18fc13fc5 100644 --- a/packages/embark/src/lib/modules/ipfs/index.js +++ b/packages/embark/src/lib/modules/ipfs/index.js @@ -150,7 +150,7 @@ class IPFS { if (process.platform === 'win32') linkedModulePath = linkedModulePath.replace(/\\/g, '\\\\'); const code = ` - const __embarkIPFS = EmbarkJS.isNode ? require('${linkedModulePath}') : require('embarkjs-ipfs'); + const __embarkIPFS = require('${linkedModulePath}'); EmbarkJS.Storage.registerProvider('ipfs', __embarkIPFS.default || __embarkIPFS); `; diff --git a/packages/embark/src/lib/modules/swarm/index.js b/packages/embark/src/lib/modules/swarm/index.js index 8b4d45420..e068a8784 100644 --- a/packages/embark/src/lib/modules/swarm/index.js +++ b/packages/embark/src/lib/modules/swarm/index.js @@ -130,7 +130,7 @@ class Swarm { if (process.platform === 'win32') linkedModulePath = linkedModulePath.replace(/\\/g, '\\\\'); const code = ` - const __embarkSwarm = EmbarkJS.isNode ? require('${linkedModulePath}') : require('embarkjs-swarm'); + const __embarkSwarm = require('${linkedModulePath}'); EmbarkJS.Storage.registerProvider('swarm', __embarkSwarm.default || __embarkSwarm); `;