Kentoss / koa-dust

Renderer for dustjs-linkedin through koa v2
0 stars 1 forks source link

Issue updating/rendering dust templates #1

Open jamesstar89 opened 7 years ago

jamesstar89 commented 7 years ago

Do you need to restart server each time you want to make an update to a dust template?

Thanks.

amitport commented 7 years ago

I have the same issue. {cache: false} does not seem to work

jamesstar89 commented 7 years ago

Cache seems to be associated with the isAbsolute template path?

jamesstar89 commented 7 years ago

@amitport done a quick work around...

Updated following lines in package index.js

var uniqueName = name + uuid(); cb(null, dust.loadSource(dust.compile(data, uniqueName || file)));

Might do a PR later on, but just caching the name as a unique name will let you see changes immediately without the server reload.