require solc for electron

pull/3094/head
0mkar 6 years ago
parent b159eb6dc1
commit f9d853c4f7
  1. 3
      remix-solidity/src/compiler/compiler.js

@ -73,7 +73,8 @@ function Compiler (handleImportCall) {
function onInternalCompilerLoaded () {
if (worker === null) {
var compiler
if (typeof (window) === 'undefined') {
var userAgent = navigator.userAgent.toLowerCase()
if (typeof (window) === 'undefined' || userAgent.indexOf(' electron/') > -1) {
compiler = require('solc')
} else {
compiler = solc(window.Module)

Loading…
Cancel
Save