nitro
nitro copied to clipboard
Nitro build deletes all app files with empty publicDir
Environment
Nitro: latest Node: 16.17.1
Reproduction
nitro.config.ts:
import { defineNitroConfig } from 'nitropack'
export default defineNitroConfig({
output: { dir: '.output', serverDir: '.output/server', publicDir: '' },
})
Describe the bug
I only have a api
folder and don't want an empty public
folder to be generated on every build. I played around with the configurations, and nothing fixed my problem, but I recognized that when setting the publicDir
entry in the output
configuration entry to an empty string, it deletes your whole application on nitro build
. Every folder and file in your nitro application folder except .output
and .nitro
is deleted.
Additional context
No response
Logs
No response