fix(@embarkjs): unconditionally require symlinked embarkjs-* modules

This commit is contained in:
Michael Bradley, Jr 2019-06-05 12:26:50 -05:00 committed by Michael Bradley
parent 312c631f86
commit b45b2e21db
3 changed files with 3 additions and 3 deletions

View File

@ -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);
`;

View File

@ -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);
`;

View File

@ -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);
`;