Open ludovicm67 opened 7 months ago
I created a simple repository to let you reproduce the issue: https://github.com/ludovicm67/bug-fastify-point-of-view-absolute-paths
I've been knee-deep in refactoring this plugin for about a week now so the implementation details are fresh in my mind, if I push the implementation of this feature to my fork could you help out with test coverage @ludovicm67?
Prerequisites
🚀 Feature Proposal
Allow the use of absolute paths to configure the
root
, thelayout
and theoptions.partials
properties when Handlebars is used.Motivation
The files on the file system are like this:
Right now, when I try to use absolute paths for
layout
, the app crashes with the following error:If I
cat
that exact same path, I'm able to see my template file. So there is an issue.I have a use-case where I need to allow a user to configure the full path of the layout, the path of the templates and the paths to some partials and the views independently.
Example
This is a basic example of code that is currently not supported:
Maybe I'm doing something wrong? I'm also open to any suggestion to get this working.