Prior to the next build, I am considering removing the previous build. If we do not delete the old build, any changes that did not result in an output file may go unnoticed for a while. Currently, I am attempting to achieve this using the following command in the package.json
:
"dev": "rm -rf src/bundle && webpack --mode development --config build/webpack.dev.config.js"
However, I have some concerns about the safety of using the rm -rf
command. Does anyone have a better suggestion?