DEV Community

Discussion on: Create a SPA with Laravel and Nuxt

Collapse
 
eduardolulichac profile image
Eduardo Lulichac • Edited

Hello Cristian I have a question, when I see the source code of my view, I don't see the rendered text of Hello Eduardo, why? help me please.
thepracticaldev.s3.amazonaws.com/i...

Collapse
 
skyrpex profile image
Cristian Pallarés

Hello Eduardo. What you're seeing is the generic page that Nuxt provides to you (it's always the same because there's no server side rendering). When the JS is loaded, the Vue Router will render the correct HTML (depending on the actual URL).

Collapse
 
alfredriesen profile image
alfredriesen

Hello Cristian. But the major feature to use nuxt is server side rendering from my point of view. How can I achieve that with laravel-nuxt and laravel-nuxt-js?

Thread Thread
 
skyrpex profile image
Cristian Pallarés

This is not at the scope as for now. If you want to use SSR you'll need to solve some problems like starting node from within PHP and passing some data. laravel-nuxt offers a simple and easy solution to get started, but without SSR.

Thread Thread
 
jartaud profile image
Josué Artaud

What's the point of using Nuxtjs if not for ssr?

Thread Thread
 
skyrpex profile image
Cristian Pallarés

You can still benefit from:

  • The already configured Webpack and the dev and build commands.
  • The Nuxt ecosystem: any existing module and plugin is already done for you.
  • The routes autoloading.
  • The Vuex modules autoloading.
  • The asyncData and other meta methods.
Thread Thread
 
peyaschandradas profile image
Peyas chandra das

vue routing is not working as in nuxt working . how can i config vue routing .. ? looking for solution thanks.