This reverts the previous "fix" and uses the newly available loaderContext from unplugin to do path resolution. Previous solution was "hacky" in a sense since at that time, Unplugin did not expose loader's context. So we had to do things manually which did not work reliably. Now that we have "loaderContext" data, it's straighforward to just call loaderContext.resolve() with the path and this works as expected.
Tested on our docs and user submitted repro repository.
This reverts the previous "fix" and uses the newly available
loaderContext
from unplugin to do path resolution. Previous solution was "hacky" in a sense since at that time, Unplugin did not expose loader's context. So we had to do things manually which did not work reliably. Now that we have "loaderContext" data, it's straighforward to just callloaderContext.resolve()
with the path and this works as expected.Tested on our docs and user submitted repro repository.
Fixes #171