I'm not sure when to use what.
Using nuxt build
you will get two directories (client
and server
), which means you are actually deploying the node.js server (i.e. express, right?)
Use nuxtgenerate
and you will get .html
It seems that both ways can achieve the good SEO that nuxt is pursuing. To me, the nuxtgenerate
option seems cleaner since it doesn't involve the server.
What am I missing here? Why should I use nuxt build
and obfuscate the server code?
This is shown in the documentation: https://nuxtjs.org/docs/get-started/commands/ p>
nuxt build
: Use webpack to build your app and minify JS and CSS (for production).nuxtgenerate
: Build the application and generate each route as an HTML file (for static hosting). Josh