nitro
nitro copied to clipboard
Assets file cannot be copied to output public directory
Environment
- nitro: 2.9.7
- node: 18.19.0
Reproduction
https://codesandbox.io/p/github/unjs/nitro/csb-jx28lh/draft/distracted-wing
Describe the bug
I read the document Assets part. When I create the public folder in repo root directory(exists package.json),and run build command, assets will not be copied into .output/public. However, I tried to move the public directory to srcDir defined in nitro.config.ts, it works.
So it is a feature or a misleading of document?
Additional context
No response
Logs
No response
I'll update this doc part with #2775
You should use server/public when srcDir is set to server currently.
In the future, we might also auto add top level public to be similar to Nuxt (#2924)