petehunt/webpack-howto

Question: clear build dir

karlmikko opened this issue · 2 comments

  1. Do you use anything to clear the build directory prior to starting webpack?

I believe we just rm -fr build/* in our shell script that kicks off webpack.

I guess that your package.json could have the scripts loaded there for NPM users

{
  "name": "webpack",
  "description": "webpack",
  "version": "0.0.1",
  "scripts": {
    "build": "rm -Rf build/* && webpack"
  }
}