frandiox / vite-ssr

Use Vite for server side rendering in Node
MIT License
830 stars 92 forks source link

[v0.10.6] `request` & `response` not available in entry hook when importing from `vite-ssr/vue` #54

Closed m4rvr closed 3 years ago

m4rvr commented 3 years ago

Hey!

After I've upgraded from v0.10.5 to v0.10.6, TypeScript no longer knows that the request & response properties exist in the entry hook.

import viteSSR from 'vite-ssr/vue'

export default viteSSR(
  App,
  {
    routes,
    // This works fine now
    pageProps: {
      passToPage: false,
    },
  },
  // Property `request`/`response` does not exist on type ...
  ({ app, initialState, router, request, response }) => {
    // ...
  }
)