In short, I think that the answer depends on the environment...
I'm recommending this package: https://github.com/single-spa/import-map-overrides
It works for browsers and NodeJS too...
You register your aliases in the main.js
(or your entry point), then any other module can use that alias to import the aliased file.