Skip to content

Commit 7fd1994

Browse files
committed
fix remapping when compiling code under the ".debug" folder
1 parent 4b8f3c4 commit 7fd1994

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,21 @@ export class FetchAndCompile extends Plugin {
176176
}
177177
}
178178
const { config, compilationTargets, version } = data
179+
/*
180+
* If the remappings are defined in the config, we need to update them to point to the targetPath
181+
* it's beeing disabled for the moment.
182+
*/
183+
/*if (config && config.settings && config.settings.remappings) {
184+
console.log(config.settings.remappings)
185+
config.settings.remappings = config.settings.remappings.map((remapping) => {
186+
let [virtual, path] = remapping.split('=')
187+
if (virtual.includes(':')) {
188+
let [scope, path] = virtual.split(':')
189+
virtual = `${targetPath}/${scope}:${path}`
190+
}
191+
return `${virtual}=${targetPath}/${path}`
192+
})
193+
}*/
179194

180195
try {
181196
setTimeout(_ => this.emit('compiling', config.settings), 0)

0 commit comments

Comments
 (0)