So following this thread In Visual Studio, how can I set the Build Action for an entire folder? the solution works for me. I have a webpack configuration that creates hashed files in a Build folder that get published. The problem that I have now is that the files that are no longer generated are still available on live. Here's the scenario:
- On every build the script removes everything from the ./Build folder
- First time
index.js
andmain.js
are generated and are published using wildcard configuration in .csproj file - Second time ./Build folder is again cleaned and only
index.js
is generated howevermain.js
is still available on live.
I guess it is a problem as beside .js and .css media files are bundled as well, images and fonts are loaded and hashed and in current state it will become quite crowded with a bunch of versions of the same files. Any idea how to solve this?