lightningFsPlugin path resolution fix

This commit is contained in:
Alex Gleason committed 2025-08-09 14:03:14 -05:00
1 parent 16863fd209
commit 1447c8f748
1 file changed
+5 -3
+5 -3
View File
@@ -12,10 +12,12 @@ export function lightningFsPlugin(fs: JSRuntimeFS, cwd: string): Plugin {
if (args.path.startsWith('@/')) {
resolved = path.join(cwd, args.path.slice(2));
} else if (args.path.startsWith('/')) {
resolved = args.path;
} else if (args.resolveDir === '/') {
resolved = path.join(cwd, args.path);
} else if (args.importer) {
resolved = path.join(path.dirname(args.importer), args.path);
} else {
resolved = path.join(cwd, args.resolveDir, args.path);
return;
}
try {