clean-webpack-plugin is deleting the files inside dist folder (runs twice)
bbest123 opened this issue · comments
Hi,
I am using the below configuration for clean-webpack-plugin but it seems to be running 2 times and ends up cleaning all the files insider /dist folder. Any idea how to fix this issue?
// the path(s) that should be cleaned
let pathsToClean = [
'dist/*.*']
// the clean options to use
let cleanOptions = {
root: __dirname,
verbose: false,
dry: false,
watch: false
}
I am running the below command:
webpack -p && node --max-old-space-size=4076 server/index.js myapp
clean-webpack-plugin: /Users/baranibikshandi/WebstormProjects/1810-shop/shop/dist/*.* has been removed.
Hash: e079d4f3bd034788f4bc
Version: webpack 4.16.5
Time: 4928ms
Built at: 08/14/2018 11:12:53 AM
Asset Size Chunks Chunk Names
main.98e27620d4798c57162a.js 34.9 KiB 0 [emitted] main
vendors~main.a93293a84e6b758d6560.js 440 KiB 1 [emitted] [big] vendors~main
main.98e27620d4798c57162a.js.map 95.9 KiB 0 [emitted] main
vendors~main.a93293a84e6b758d6560.js.map 1.79 MiB 1 [emitted] vendors~main
../views/devicelisting.ejs 1.71 KiB [emitted]
Entrypoint main [big] = vendors~main.a93293a84e6b758d6560.js vendors~main.a93293a84e6b758d6560.js.map main.98e27620d4798c57162a.js main.98e27620d4798c57162a.js.map
[30] (webpack)/buildin/global.js 489 bytes {1} [built]
[54] ./node_modules/react-redux/es/index.js + 14 modules 37.4 KiB {1} [built]
+ 746 hidden modules
Child html-webpack-plugin for "../views/devicelisting.ejs":
1 asset
Entrypoint undefined = ../views/devicelisting.ejs
[0] ./node_modules/raw-loader!./views/devicelisting_template.ejs 1.65 KiB {0} [built]
clean-webpack-plugin: /Users/baranibikshandi/WebstormProjects/1810-shop/shop/dist/*.* has been removed.
Closed in v2.0.0
via #99. See johnagan/clean-webpack-plugin#usage. Please open a new issue if you continue to have problems.