add options.ssr

This allows setting custom vue renderer options. including:
- shouldPreload(file, type)
- runInNewContext
- directives

https://ssr.vuejs.org/en/api.html#renderer-options
This commit is contained in:
Pooya Parsa 2017-04-30 17:10:04 +04:30
parent 87172100c7
commit 2e75f22a08

View File

@ -486,10 +486,10 @@ function createRenderer (bundle, manifest) {
maxAge: 1000 * 60 * 15
}))
}
this.renderer = createBundleRenderer(bundle, {
this.renderer = createBundleRenderer(bundle, Object.assign({
cache: cacheConfig,
clientManifest: manifest
})
}, this.options.ssr))
this.renderToString = pify(this.renderer.renderToString)
this.renderToStream = this.renderer.renderToStream
}