Nuxt/packages/vue-renderer/src/renderers/base.js
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

26 lines
615 B
JavaScript

export default class BaseRenderer {
constructor (serverContext) {
this.serverContext = serverContext
this.options = serverContext.options
this.vueRenderer = this.createRenderer()
}
createRenderer () {
throw new Error('`createRenderer()` needs to be implemented')
}
renderTemplate (templateFn, opts) {
// Fix problem with HTMLPlugin's minify option (#3392)
opts.html_attrs = opts.HTML_ATTRS
opts.head_attrs = opts.HEAD_ATTRS
opts.body_attrs = opts.BODY_ATTRS
return templateFn(opts)
}
render () {
throw new Error('`render()` needs to be implemented')
}
}