Skip to content

Commit

Permalink
fix(clean): don't clean build output in development mode
Browse files Browse the repository at this point in the history
There's no need to clean build output in development mode because no build output is written.
  • Loading branch information
djcsdy committed Feb 19, 2019
1 parent 91714b0 commit d87dea7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ function WebpackConfig(project: WebpackConfig.Project): (env: any) => Configurat
]
},
plugins: [
new CleanWebpackPlugin(destDir, {root: rootDir}),
...mode === "development"
? []
: [new CleanWebpackPlugin(destDir, {root: rootDir})],
new MiniCssExtractPlugin(),
new HtmlWebpackPlugin(htmlOptions)
],
Expand Down

0 comments on commit d87dea7

Please sign in to comment.