Skip to content

Commit

Permalink
Fix error with deprecation warnings and legacy importers (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak authored Oct 17, 2024
1 parent 4bd7558 commit ecb7c20
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/legacy/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ export function removeLegacyImporter(string: string): string {
// syntax.
export function removeLegacyImporterFromSpan(span: SourceSpan): SourceSpan {
if (!span.url) return span;
return {...span, url: new URL(removeLegacyImporter(span.url.toString()))};
return {
...span,
url: new URL(
removeLegacyImporter(span.url.toString()),
pathToFileURL(process.cwd())
),
};
}

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

0 comments on commit ecb7c20

Please sign in to comment.