Skip to content

Commit e3e0b2e

Browse files
authored
Use CleanWebpackPlugin instead of rimraf (#110)
Use `CleanWebpackPlugin` instead of `rimraf`
2 parents cc7e61f + a4f1b4c commit e3e0b2e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.1.0",
44
"description": "A workflow for Angular made with Webpack",
55
"scripts": {
6-
"build": "rimraf dist && webpack --bail --progress --profile",
6+
"build": "webpack --bail --progress --profile",
77
"server": "webpack-dev-server --history-api-fallback --inline --progress",
88
"test": "karma start",
99
"test-watch": "karma start --auto-watch --no-single-run",
@@ -29,6 +29,7 @@
2929
"babel-core": "^6.26.3",
3030
"babel-loader": "^7.1.4",
3131
"babel-preset-es2015": "^6.1.18",
32+
"clean-webpack-plugin": "^2.0.2",
3233
"copy-webpack-plugin": "^4.5.1",
3334
"css-loader": "^0.28.11",
3435
"extract-text-webpack-plugin": "2.0.0-beta.5",
@@ -48,7 +49,6 @@
4849
"phantomjs-prebuilt": "^2.1.4",
4950
"postcss-loader": "^2.1.5",
5051
"raw-loader": "^0.5.1",
51-
"rimraf": "^2.5.1",
5252
"style-loader": "^0.21.0",
5353
"webpack": "^2.7.0",
5454
"webpack-dev-server": "^2.11.2"

webpack.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var autoprefixer = require('autoprefixer');
66
var HtmlWebpackPlugin = require('html-webpack-plugin');
77
var ExtractTextPlugin = require('extract-text-webpack-plugin');
88
var CopyWebpackPlugin = require('copy-webpack-plugin');
9+
var CleanWebpackPlugin = require('clean-webpack-plugin');
910

1011
/**
1112
* Env
@@ -160,6 +161,7 @@ module.exports = function makeWebpackConfig() {
160161
* List: http://webpack.github.io/docs/list-of-plugins.html
161162
*/
162163
config.plugins = [
164+
new CleanWebpackPlugin(),
163165
new webpack.LoaderOptionsPlugin({
164166
test: /\.scss$/i,
165167
options: {

0 commit comments

Comments
 (0)