nuxt build and generate
P粉713866425
P粉713866425 2024-03-26 08:43:40
0
1
382

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?

P粉713866425
P粉713866425

reply all(1)
P粉242535777

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template