-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(es): Resolve plugin paths using config path as base #6800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
015addc to
1954c1e
Compare
This makes relative paths work, they will be relative to the location of the config that imports the plugin. Previously relative paths did not work, as the resolver attempted to resolve using the plugin path as the base and the target, resulting in mangled paths.
1954c1e to
866a06a
Compare
|
@kwonoj Thoughts? |
|
I am not sure if we want this. The reason I left the current experimental resolver to absolute only is, it is unclear which point we should use for the relative resolve. Having swcrc / config as implicit root may work, but also some cases may not work as expected. Having base to resolve in plugin context seems ok to do, but public-facing interface seems need some thought. |
|
In the case of |
|
I'd also be fine with a CLI flag or config setting explicitly specifying where relative paths should be resolved from. Implicitly using the config location seemed like good UX so I went with it, but any of these options are a couple lines of code for me to get working in my build at this point so I don't have a preference :) |
|
Closing in favor of adding a |
Description:
This makes relative paths work for plugin references, they will be relative to the location of the config that imports the plugin.
Previously relative paths did not work, as the resolver attempted to resolve using the plugin path as the base and the target, resulting in mangled paths.
Related issue (if exists): aspect-build/rules_swc#149