Did you try yarn run rmdist ? I’m just starting with Sage 9 but it looks like that should clear your dist folder. The scripts are all listed in the package.json file.
You might also be able to simply delete the dist folder.
By the way, in Sage 8, I always had to run gulp clean and then gulp buildto go back to development mode after running the production flag…
@ben, I’m trying to do some css fixes on my local env before deploying. So I’m running into these issues on local. I tried deleting the .cache-loader folder. Is there another local cache or manifest that is referencing the files that were created in build:production?
@stephen, thanks for the response! Dist is deleted automatically each time build is run, so that’s not the issue here. It definitely was a bit more straightforward in Sage 8!
@isabisa, you’re welcome and I’m sorry it wasn’t more helpful… It’s certainly a learning process with Sage but it beats dealing with the painful mess that is “traditional” WP development!
@ben: do you have any plans to make a command for clearing all the caches? In Laravel there’s the view:clear command and maybe there could be something similar for Sage to streamline situations like this. I think all the Roots projects are amazing and I’ve already learned a lot, so thanks to you and the rest of the team for being so generous with your work and knowledge!
Good call, I just tried deleting that cache directory and had high hopes but it didn’t fix the issue. I’m digging around in the theme trying to find a manifest file so I can try to debug but don’t see one. Is there not one in Sage 9?
Hah, yes! Well to answer your questions in case anyone refers to this in the future, the files in dist were plain, hash-free file names and the outdated references were coming from the HTML, which were in cached PHP files in my uploads directory, put there by the plugin. Derp.