diff --git a/src/asm.ts b/src/asm.ts index 1d9155a..ae3f5e5 100644 --- a/src/asm.ts +++ b/src/asm.ts @@ -414,7 +414,11 @@ class Assembler { if (p !== undefined) { return p; } - const newPlugin = importFresh(path.resolve(this.makeSourceRelativePath(fname))); + + const pluginName = './'.indexOf(fname[0]) < 0 + ? fname + : path.resolve(this.makeSourceRelativePath(fname)); + const newPlugin = importFresh(pluginName); this.pluginCache.set(fname, newPlugin); return newPlugin; } diff --git a/test/cases/array2.input.asm b/test/cases/array2.input.asm index fdcd05f..111f05f 100644 --- a/test/cases/array2.input.asm +++ b/test/cases/array2.input.asm @@ -1,7 +1,7 @@ * = $801 -!use "plugin-multiple-exports" as m +!use "./plugin-multiple-exports" as m !for s in m.nestedArray() { ; Iterate list elems directly