[Vuejs]-Nuxt 3 (nuxt generate) change static output directory?

5👍

In nuxt3 it can be done by overriding nitro’s config in nuxt.config.ts like this:

const path = require('path');

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  ...
  nitro: {
    output: {
      publicDir: path.join(__dirname, 'your path here')
    }
  },
  ...
}

You can check Nitro’s documetantion

Leave a comment