zayed
zayed

Reputation: 414

Nuxt 3 how to change the path of the static build

after i build the project

npm run generate

it generates a folder .output with the build files

how to change this file to anther, for example instead of .output -> Admin

my nuxt.config.ts

  export default defineNuxtConfig({ 
    ssr: false, 
    app: {
        baseURL: ...,
    },
 });

I know that i can cut and past the folder,

however, is there a propriety that can change the path of the build?

Upvotes: 3

Views: 2266

Answers (1)

DengSihan
DengSihan

Reputation: 2997

The Nuxt3 server engine is actually powered by nitro (see the document)

so, in the nuxt.config.[js|ts]

export default defineNuxtConfig({
    nitro: {
        output: {
            dir: '.output',
            serverDir: '.output/server',
            publicDir: '.output/public'
        }
    }
})

See more:

Upvotes: 6

Related Questions