With this option, you will have to lose the server side of Nuxt. But the good news is that there are many popular hosts for hosting a static-generated Nuxt app and you can serve it on almost any host online, quickly. Let's find out how in the following steps:
- Change server to static as the target in the Nuxt config file, as follows:
// nuxt.config.js
export default {
target: 'static'
}
- Launch the nuxt generate commands locally via npm to generate the static files for your Nuxt app:
$ npm run generate
- Upload all the content in the /dist/ folder generated by Nuxt to the host.
The following list details the hosts you can choose from. The deployment processes for all of them are well documented on the Nuxt site. You should check out the Nuxt FAQ at https://nuxtjs.org/faq to check deployment examples and see how to deploy the static generated Nuxt app to any of these specific hosts...