Skip to content

Commit

Permalink
add clean webpack plugin
Browse files Browse the repository at this point in the history
add clean-webpack-plugin to clean build folders before build process
  • Loading branch information
Seogeurim committed Jul 29, 2021
1 parent a5d76d4 commit eec3a30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const paths = require('./paths');
Expand Down Expand Up @@ -50,6 +51,7 @@ module.exports = {
],
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
title: 'webpack-es6-boilerplate',
template: paths.public + '/index.html',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@babel/core": "^7.14.8",
"@babel/preset-env": "^7.14.8",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"css-loader": "^6.2.0",
"eslint": "^7.31.0",
"eslint-config-airbnb-base": "^14.2.1",
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,13 @@ clean-css@^4.2.3:
dependencies:
source-map "~0.6.0"

clean-webpack-plugin@^4.0.0-alpha.0:
version "4.0.0-alpha.0"
resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-4.0.0-alpha.0.tgz#2aef48dfe7565360d128f5caa0904097d969d053"
integrity sha512-+X6mASBbGSVyw8L9/1rhQ+vS4uaQMopf194kX7Aes8qfezgCFL+qv5W0nwP3a0Tud5kUckARk8tFcoyOSKEjhg==
dependencies:
del "^4.1.1"

cliui@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
Expand Down

0 comments on commit eec3a30

Please sign in to comment.