diff --git a/packages/embark/src/lib/modules/solidity/index.js b/packages/embark/src/lib/modules/solidity/index.js index e830044ac..a861161ad 100644 --- a/packages/embark/src/lib/modules/solidity/index.js +++ b/packages/embark/src/lib/modules/solidity/index.js @@ -145,7 +145,8 @@ class Solidity { compiled_object[className].abiDefinition = contract.abi; compiled_object[className].userdoc = contract.userdoc; compiled_object[className].filename = filename; - compiled_object[className].originalFilename = originalFilepaths[path.basename(filename)]; + const normalized = path.normalize(filename); + compiled_object[className].originalFilename = Object.values(originalFilepaths).find(ogFilePath => normalized.indexOf(ogFilePath) > -1); } }