radiocity / twig-html-loader

Twig to html loader for webpack
MIT License
27 stars 11 forks source link

feat(#30): replace relative paths by absolute paths for Twig function "source" #31

Closed kostik-noir closed 4 years ago

kostik-noir commented 4 years ago

These changes allow to use the relative path for the Twig function source.

Twig function source uses the resource path value that is specified in the template. If this is a relative path (i.e. the one that starts with ./ or ../) it does not convert this path to an absolute path relative to the template file.
This leads to the fact that we cannot use {{ source('./path/to/some/file') }} in Twig templates.

The solution to this issue is to convert relative paths to absolute paths.

kostik-noir commented 4 years ago

30