Skip to content

Commit 68a0b19

Browse files
committed
Update to latest StarlingMonkey
Pulls in bytecodealliance/StarlingMonkey#231
1 parent 7f17009 commit 68a0b19

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/componentize.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,15 @@ export async function componentize(opts,
215215
// component to be relative to the current working directory.
216216
// This only works in wizer, not in weval, because the latter doesn't
217217
// support --mapdir.
218-
if (!opts.enableAot && workspacePrefix.startsWith(cwd())) {
219-
workspacePrefix = cwd();
220-
sourcePath = sourcePath.slice(workspacePrefix.length + 1);
218+
if (!opts.enableAot) {
219+
if (!useOriginalSourceFile) {
220+
workspacePrefix = sourceDir;
221+
sourcePath = sourceName;
222+
}
223+
if (workspacePrefix.startsWith(cwd())) {
224+
workspacePrefix = cwd();
225+
sourcePath = sourcePath.slice(workspacePrefix.length + 1);
226+
}
221227
}
222228
let args = `--initializer-script-path ${initializerPath} ${sourcePath}`;
223229
runtimeArgs = runtimeArgs ? `${runtimeArgs} ${args}` : args;

0 commit comments

Comments
 (0)