Skip to content

Vision never reloads/recompiles partials #110

@adamesque

Description

@adamesque

If we use the setting isCached: false, Vision will read & recompile top-level templates each time render is called. This is great!

But, helpers and partials are only ever read & registered on startup, so (for instance) given a handlebars template that makes heavy use of partials to break apart the view, changes to those partials will only appear after a full server restart.

Seems like it'd be expensive to reload every single partial & helper on every render call when isCached: false, but the alternative would be to listen to changes in partials in a plugin and manually call Handlebars.registerPartial on them. But that reaches way outside vision and feels weird.

Another idea would be to scan a template for partial names, and selectively recompile and reregister just those partials if caching is turned off.

Thoughts?

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions