|
|
@ -215,7 +215,6 @@ export class Compiler { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (source && source.sources) { |
|
|
|
if (source && source.sources) { |
|
|
|
const { optimize, runs, evmVersion, language, remappings, useFileConfiguration, configFileContent } = this.state |
|
|
|
const { optimize, runs, evmVersion, language, remappings, useFileConfiguration, configFileContent } = this.state |
|
|
|
console.log('remappings---->', remappings) |
|
|
|
|
|
|
|
if (useFileConfiguration) { |
|
|
|
if (useFileConfiguration) { |
|
|
|
input = compilerInputForConfigFile(source.sources, JSON.parse(configFileContent)) |
|
|
|
input = compilerInputForConfigFile(source.sources, JSON.parse(configFileContent)) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -338,7 +337,10 @@ export class Compiler { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
if (useFileConfiguration) { |
|
|
|
if (useFileConfiguration) { |
|
|
|
input = compilerInputForConfigFile(source.sources, JSON.parse(configFileContent)) |
|
|
|
let compilerInput = JSON.parse(configFileContent) |
|
|
|
|
|
|
|
if (compilerInput.settings.remappings?.length) compilerInput.settings.remappings.push(...remappings) |
|
|
|
|
|
|
|
else compilerInput.settings.remappings = remappings |
|
|
|
|
|
|
|
input = compilerInputForConfigFile(source.sources, compilerInput) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
input = compilerInput(source.sources, { optimize, runs, evmVersion, language, remappings }) |
|
|
|
input = compilerInput(source.sources, { optimize, runs, evmVersion, language, remappings }) |
|
|
|
} |
|
|
|
} |
|
|
|