consider remappings from file

pull/4229/head
aniket-engg 1 year ago committed by yann300
parent 3d739cc438
commit 5e8614e048
  1. 7
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts

@ -106,10 +106,15 @@ export class CompileTabLogic {
compileFile (target) {
if (!target) throw new Error('No target provided for compiliation')
return new Promise((resolve, reject) => {
this.api.readFile(target).then((content) => {
this.api.readFile(target).then(async(content) => {
const sources = { [target]: { content } }
this.event.emit('removeAnnotations')
this.event.emit('startingCompilation')
if(!this.useFileConfiguration && await this.api.fileExists('remappings.txt')) {
this.api.readFile('remappings.txt').then( remappings => {
this.compiler.set('remappings', remappings.split('\n'))
})
}
if (this.configFilePath) {
this.api.readFile(this.configFilePath).then( contentConfig => {
this.compiler.set('configFileContent', contentConfig)

Loading…
Cancel
Save