universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

Add runInNewContext option to renderer options #39

Closed academici closed 4 years ago

academici commented 4 years ago

Option runInNewContext: true is useful for static sites for better performance.

yabab-dev commented 4 years ago

Hey,

you can already pass this option to vue renderer via server.config.js (but it's undocumented):

export default {
  renderer: {
    runInNewContext: true
  }
}

Anyway, can you link me where you found that this config is better for performance in this case ? Vue SSR docs the opposite:

However, this mode comes at some considerable performance cost because re-executing the bundle is expensive especially when the app gets bigger.

https://ssr.vuejs.org/api/#runinnewcontext

yabab-dev commented 4 years ago

Docs updated