I have a dustjs template heirarchy like so:
layout.dust
...
{> "book/BookListings" /}
...
Then, BookListings.dust:
{#books}
{> "templates/OneBook" /}
{/books}
I have several books to display in BookListings. For every Book, I use OneBook
template. It all works fine when I run it for the first time.
Problem arises when I try to reuse the compiled template on the front-end in a Single Page App mode.
I use dustc
to compile BookListings
template using the command:
dustc BookListings.dust BookListings.js
On the front end, when I try to load the template, I get the error:
Dust Error: Error {stack: (...), message: "Template Not Found: templates/OneBook"}
Please advise.