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

Nitro build deletes all app files with empty publicDir #584

Closed
itpropro opened this issue Oct 15, 2022 · 2 comments
Closed

Nitro build deletes all app files with empty publicDir #584

itpropro opened this issue Oct 15, 2022 · 2 comments

Comments

@itpropro
Copy link
Member

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

@pi0
Copy link
Member

pi0 commented Oct 16, 2022

Thanks for issue. I've added fix + new noPublicDir to achieve what you want. Cheers.

@itpropro
Copy link
Member Author

Thanks for the quick fix @pi0 !

WinterYukky pushed a commit to WinterYukky/nitro that referenced this issue Nov 1, 2022
WinterYukky pushed a commit to WinterYukky/nitro that referenced this issue Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants