build.emptyOutDir
no longer empties out the entire directory since v3.2.x
#10696
Labels
build.emptyOutDir
no longer empties out the entire directory since v3.2.x
#10696
Describe the bug
In the past, using
build.emptyOutDir
would empty out the entire directory defined bybuild.outDir
even when thebuild.rollupOptions.output.dir
was set to a different directory. Since v3.2.0 this has changed to only empty out what is defined inbuild.rollupOptions.output.dir
Reproduction
https://stackblitz.com/edit/vitejs-vite-lmgy3k?file=vite.config.js,package.json
Steps to reproduce
There is a file inside
dist
called:file-to-be-removed.html
. This file should be deleted when a new build is made (dist directory is emptied).run
npm run build
to see that the files inside thedist
directory are not deleted, only the files inside thedist/assets
directory are deleted.Alternatively, use the following for 3.1.8 to see it working as expected: https://stackblitz.com/edit/vitejs-vite-lmgy3k?file=vite.config.js,package.json
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: