fix parser: remappings

pull/4309/head
yann300 1 year ago
parent 073cbf8f2d
commit 5ae1e632ea
  1. 8
      apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts

@ -142,6 +142,14 @@ export default class CodeParserCompiler {
this.compiler.set('runs', state.runs)
this.compiler.set('useFileConfiguration', true)
this.compiler.set('compilerRetriggerMode', CompilerRetriggerMode.retrigger)
if (await this.plugin.call('fileManager', 'exists','remappings.txt')) {
const remappings = await this.plugin.call('fileManager', 'readFile','remappings.txt')
this.compiler.set('remappings', remappings.split('\n').filter(Boolean))
} else {
this.compiler.set('remappings', [])
}
const configFileContent = {
"language": "Solidity",
"settings": {

Loading…
Cancel
Save