Closed as not planned
Closed as not planned
Description
π Search Terms
"rewriteRelativeImportExtensions", "import.meta.resolve", "require.resolve", "shim", "experimental-strip-types", "experimental-transform-types"
π Version & Regression Information
- This changed in commit or PR Rewrite relative import extensions with flagΒ #59767
β― Playground Link
No response
π» Code
// tsc --rewriteRelativeImportExtensions
import("./foo.ts")
import.meta.resolve("./foo.ts")
// output:
import("./foo.js")
import.meta.resolve("./foo.ts")
π Actual behavior
While imports are correctly rewritten/shimmed, calls to import.meta.resolve
/require.resolve
are not impacted.
π Expected behavior
I would expect import.meta.resolve
to resolve to the same path as an import call, as per MDN Documentation.
Additional information about the issue
No response