-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: Resolve relative URLs in property values #18
Conversation
Hi @alex-ketch |
@alex-ketch ping |
Hi @unlight, I've been busy with work but will try to to confirm what I encountered by making a test repo. But from I remember, I tried using ( Thanks for your patience |
Hi again @unlight, I've made a repo with a minimal setup demonstrating the issue this PR tries to solve. I also have a couple configurations using the plugins you suggested, but they don‘t seem to solve the problem either. Let me know if you have any questions are need clarification. |
@alex-ketch |
Appreciate it @unlight, I can put it behind a flag. |
|
@unlight I've made the changes, added test, and update the README. |
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi @unlight, and thanks for this plugin!
I encountered a need for converting relative paths referenced in remote files to be absolute, as otherwise it the relative files would fail to resolve, and cause build issues down the pipeline.
Let me know if this PR is something you'd want to accept or not.
But for our use case, resolving assets paths to be absolute allows for chaining with other plugins to either download the assets or inline them as base64.
I've added tests which should illustrate the resolution better, but here's the idea:
Output
One question though, I didn't put this functionality behind an option flag as I didn't think keeping asset paths relative would be a desirable very often, but I can see how that might be misconception on my part, or even a breaking change for some setups.
I'd appreciate your guidance on how, and if, you'd like this to work.
Thanks again 👋