eta
eta copied to clipboard
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.