Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets file cannot be copied to output public directory #2782

Closed
j10ccc opened this issue Oct 8, 2024 · 2 comments
Closed

Assets file cannot be copied to output public directory #2782

j10ccc opened this issue Oct 8, 2024 · 2 comments

Comments

@j10ccc
Copy link

j10ccc commented Oct 8, 2024

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

@geromegrignon
Copy link
Contributor

I'll update this doc part with #2775

@pi0
Copy link
Member

pi0 commented Jan 7, 2025

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)

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants