Vike / SSR

Hi, I have a vite/vue project and I need to use ssr for the public part, for indexing. Except that I can’t configure it correctly with vike, should I do something else?

here is the error when launching the front:

npm run dev

reseau@1.0.0 dev
vite


This content originally appeared on DEV Community and was authored by tuwix

Hi, I have a vite/vue project and I need to use ssr for the public part, for indexing. Except that I can't configure it correctly with vike, should I do something else?

here is the error when launching the front:

npm run dev

reseau@1.0.0 dev
vite

09:40:31 [vike][config][Wrong Usage] /src/pages/+config.js sets an unknown config vue
09:40:31 [vike][Warning] Update to the new V1 design to get rid of Vite's warning: The glob option "as" has been deprecated in favour of "query". See https://vike.dev/migration/v1-design for how to migrate.
The glob option "as" has been deprecated in favour of "query". Please update as: 'extractExportNames' to query: '?extractExportNames'.
VITE v5.4.4 ready in 660 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help

and my "+config.js":

export default {
vue: {
hydrationCanBeAborted: true
},
clientRouting: true,
prerender: {
partial: true
},
meta: {
title: {
env: { server: true, client: true },
value: (pageContext) => *** - ${pageContext.route}
},
description: {
env: { server: true, client: true },
value: 'Site ***'
}
}
}

my vite.config.json :

i added :
import vike from 'vike/plugin'

and

plugins: [
vue(),
vuetify({ autoImport: true }),
vike()
],

i tried to use "vike-vue" following the doc but same problem, or worse, is there a solution or is it better to stop using vike ?


This content originally appeared on DEV Community and was authored by tuwix


Print Share Comment Cite Upload Translate Updates
APA

tuwix | Sciencx (2024-09-12T09:00:36+00:00) Vike / SSR. Retrieved from https://www.scien.cx/2024/09/12/vike-ssr/

MLA
" » Vike / SSR." tuwix | Sciencx - Thursday September 12, 2024, https://www.scien.cx/2024/09/12/vike-ssr/
HARVARD
tuwix | Sciencx Thursday September 12, 2024 » Vike / SSR., viewed ,<https://www.scien.cx/2024/09/12/vike-ssr/>
VANCOUVER
tuwix | Sciencx - » Vike / SSR. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/12/vike-ssr/
CHICAGO
" » Vike / SSR." tuwix | Sciencx - Accessed . https://www.scien.cx/2024/09/12/vike-ssr/
IEEE
" » Vike / SSR." tuwix | Sciencx [Online]. Available: https://www.scien.cx/2024/09/12/vike-ssr/. [Accessed: ]
rf:citation
» Vike / SSR | tuwix | Sciencx | https://www.scien.cx/2024/09/12/vike-ssr/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.