Open babel5405 opened 4 years ago
II'm fairly certain I should be able to exclude the module from webpack and include it separately in the bundle, but ideally I'd still like to be able to pack it with the rest of the main entry point.
I would like to see if the developers have a better solution, but I went ahead and implemented an exclusion in webpack and it's resolved the issue (though this means the module isn't bundled.)
externals: [
function(context, request, callback) {
if (/^mymonero-core-js$/.test(request)) {
return callback(null, 'commonjs ' + request);
}
callback();
}
]
I'm importing mymonero-core-js wiith a standard require() in the main thread of my electron application and everything has been working for a while but I recently added my main.js to my webpack bundle and it's created some issues.
Liine 58 of MyMoneroCoreBridge.js is returning the file the bundle is in, instead of the expected monero_utils, which is causing the block below to move onto it's else, rendering everything non-functional.
(Note, I modified the code above slightly so it could be enclosed completely in a code block for the issue. Just replaced the backtick's with single quotes.)
What can I do to correct the path it's receiving so it gets what it actually needs? I'm assuming there's a reason it expects to be ran from monero_utils, but is there any way to work around that?