Skip to content

Commit ecb7c20

Browse files
authored
Fix error with deprecation warnings and legacy importers (#339)
1 parent 4bd7558 commit ecb7c20

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/src/legacy/utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ export function removeLegacyImporter(string: string): string {
3838
// syntax.
3939
export function removeLegacyImporterFromSpan(span: SourceSpan): SourceSpan {
4040
if (!span.url) return span;
41-
return {...span, url: new URL(removeLegacyImporter(span.url.toString()))};
41+
return {
42+
...span,
43+
url: new URL(
44+
removeLegacyImporter(span.url.toString()),
45+
pathToFileURL(process.cwd())
46+
),
47+
};
4248
}
4349

4450
// Converts [path] to a `file:` URL and adds the [legacyImporterProtocolPrefix]

0 commit comments

Comments
 (0)