Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
When building with Vite while using the emptyOutDir flag, the Shopify CLI should delete and then update the newly compiled files.
Actual behavior
Currently, it only deletes them and requires you to rerun theme dev in order to update those files. Otherwise, it gets stuck, as you can see here

Stack trace
No response
Reproduction steps
- Install shopify-cli@latest
- Install Vite and setup
vite.config.js
- Set
build.emptyOutDir: true
- Run
vite build --watch --mode development
- Run
theme dev --store X
- Change an input file referenced in Vite
Operating System
Mac OSX
Shopify CLI version (check your project's package.json if you're not sure)
3.22.0
Shell
zsh
Node version (run node -v if you're not sure)
v18.11.0
What language and version are you using in your application?
No response
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
When building with Vite while using the
emptyOutDirflag, the Shopify CLI should delete and then update the newly compiled files.Actual behavior
Currently, it only deletes them and requires you to rerun
theme devin order to update those files. Otherwise, it gets stuck, as you can see hereStack trace
No response
Reproduction steps
vite.config.jsbuild.emptyOutDir: truevite build --watch --mode developmenttheme dev --store XOperating System
Mac OSX
Shopify CLI version (check your project's
package.jsonif you're not sure)3.22.0
Shell
zsh
Node version (run
node -vif you're not sure)v18.11.0
What language and version are you using in your application?
No response