feat: expose resolvePath to templates
This PR adds resolvePath to transform relative paths into absolute ones.
A use case for this is dynamic import, e.g.:
<% let utils = await import (resolvePath("./include/utils.mjs")) %>
The lack of this feature can be worked around by exposing Eta.resolvePath via it. However, if used in a partial, the base path used to resolve the relative path would always be the directory of the including (root) template, which could lead to confusion.
@aranor01 thanks for the PR! Your reasoning makes sense, but I'm not sure how common a use case this is. In the meantime, you can just put that value in config.functionHeader!
I'll leave this open to gauge interest.
Closing for now since it seems like there hasn't been a lot of interest, with the possibility of reopening in the future.