vike
vike copied to clipboard
TypeError when adding plugin to existing vite project
Question / Discussion
Hi all,
Im having an issue when adding the plugin to an existing vite project with typescript.
On the server side, the html renders fine but when it reaches the front end, i keep getting this error in the console
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'accept')
at all.page.vue:5:23
I found that if i remove the lang="ts" from the script tag the error goes away, but that defeats the purpose of using typescript.
Has anyone had a similar issue?
See https://github.com/brillout/vite-plugin-ssr/issues/461.
Also see https://github.com/brillout/vite-plugin-ssr/issues/460.