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

Mitosis does not always accurately delete old files #280

Open
samijaber opened this issue Apr 12, 2022 · 0 comments
Open

Mitosis does not always accurately delete old files #280

samijaber opened this issue Apr 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@samijaber
Copy link
Contributor

Ran into a tricky bug the other day. Had a file src/helpers/foo.ts, and moved it to src/helpers/foo/index.ts to be able to add helpers. Unfortunately, the clean() function will only delete outputs that match the current list of existing files. Since there was no longer a src/helpers/foo.ts, clean() did not attempt to delete it.

We don't want to blindly delete the entire output dir. We have cases where we have files there that need to stay, such as a dist/package.json, etc.

https://github.com/BuilderIO/mitosis/blob/main/packages/cli/src/build/build.ts#L94-L102

@samijaber samijaber added the bug Something isn't working label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant