make Web3 (note capital 'w') globally accessible

This commit is contained in:
Michael Bradley, Jr 2018-07-16 17:31:43 -05:00 committed by Iuri Matias
parent 0c4438941d
commit dcf9b4a645

View File

@ -374,6 +374,7 @@ class CodeGenerator {
let providerCode = self.generateProvider(false);
code += providerCode;
code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
code += "\nwindow.Web3 = Web3;\n";
code += "\nwindow.web3 = web3;\n";
code += "\nexport default web3;\n";
next(null, code);