Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,19 @@ module.exports = (app, options) => {
server: app,
templatePath,
onUpdate: ({ serverBundle }, options) => {
// Re-create the bundle renderer
renderer = createBundleRenderer(serverBundle, {
const mergedOptions = {
...defaultRendererOptions,
...options,
})
}

// Re-using the cache could lead to out-of-date results,
// so clear the cache on bundle renderer rebuild
if (mergedOptions.cache && mergedOptions.cache.reset) {
mergedOptions.cache.reset()
}

// Re-create the bundle renderer
renderer = createBundleRenderer(serverBundle, mergedOptions)
},
})
}
Expand Down