How to deploy Nuxt on Netlify
01/10/2021 · by Feb Dao
Deploying to Netlify is a option for getting a statically generated Nuxt.js site online quickly.
First of all, you need to config your nuxt.config.js
file with:
buildDir: 'dist',
target: 'static',
generate: {
fallback: true,
}
Then create a new custom command called deploy in package.json
file:
"scripts": {
...
"deploy": "nuxt build && nuxt generate"
},
Finally, you need to set up the Netlify build settings like this:
Base directory
to the nuxt.config.js
located folder.
Please remember to set the
CSS and Javascript media queries
Font-face and Font File Types