From ba46fd3b5156a3851969b9a1bfa3713b5614dcc2 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 26 Jul 2018 09:14:09 -0400 Subject: [PATCH] Revert "remove solc require which is causing issues with browserify" This reverts commit 257541e8b2630c58bd3204301f3eca4cd0fc9fa8. --- remix-solidity/src/compiler/compiler.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/remix-solidity/src/compiler/compiler.js b/remix-solidity/src/compiler/compiler.js index eb0e423610..4238cb6a0f 100644 --- a/remix-solidity/src/compiler/compiler.js +++ b/remix-solidity/src/compiler/compiler.js @@ -72,7 +72,12 @@ function Compiler (handleImportCall) { function onInternalCompilerLoaded () { if (worker === null) { - var compiler = solc(window.Module) + var compiler + if (typeof (window) === 'undefined') { + compiler = require('solc') + } else { + compiler = solc(window.Module) + } compileJSON = function (source, optimize, cb) { var missingInputs = []