Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(register/esm): pass file urls as paths (#840)
compile() expects a filename, not a url: it passes the value directly to the bindings module, which immediately parses it as a `Path` unconditionally. This causes input file source maps to fail to load, as it attempts to find the URL as if it were a file on disk. (see swc-project/swc#9422) This is a targeted fix which hopefully minimizes the chance of things breaking.
- Loading branch information