mirror of https://github.com/embarklabs/embark.git
fix(@embarkjs): unconditionally require symlinked embarkjs-* modules
This commit is contained in:
parent
312c631f86
commit
b45b2e21db
|
@ -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);
|
||||
`;
|
||||
|
||||
|
|
|
@ -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);
|
||||
`;
|
||||
|
||||
|
|
|
@ -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);
|
||||
`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue