Nuxt Hooks

updated: 07.04.2021
  1. Hide data in window.__NUXT__={} for SSR pages.

It’s help hide unnecessary data and increase Speed Index for Google Pagespeed.

# ~/nuxt.config.js
export default {
  hooks: {
    'vue-renderer:ssr:context'(context) {
      const routePath = JSON.stringify(context.nuxt.routePath)
      context.nuxt = { serverRendered: true, routePath }
    }
  }
}