Open Buom01 opened 4 years ago
Could you provide a minimal reproducible example repo?
When I got one of my computer with virtualization capable CPU back, yeah I could eventually try to recreate it. Safely. But the question is ironic. I will try to, but that's a question of time.
met similar problem...
when I start the devServer by webpack-dev-server --mode development
, the dist dir will be cleared.
here is my webpack config:
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
host: '0.0.0.0',
port: 8080,
open: true,
hot: true
},
new CleanWebpackPlugin(),
and my npm script:
"scripts": {
"build": "webpack --mode development",
"serve": "webpack-dev-server --mode development"
},
Hi An sorry, but I will be really synthetic this time.
$webpack-dev-server --open --output dist --config webpack.config.js
+ clean-webpack-plugin = EvanescoThe webpack config worked perfectly before, for a while, except webpack-dev-server complaining about missing js file while accessing in browser. I haven't any more information now since I run testdisk before getting older backups. So I can't be even sure that this issue is related to
clean-webpack-plugin
orwebpack-dev-server
But I think that in both case it should be any security stopping all if the config file is under the directory that is asked to be delete.
Edit: Just seeing https://github.com/johnagan/clean-webpack-plugin/pull/155 Edit: Unable to restore with
testdisk
, only able to list all root file, but their size are 0.Additional information: "clean-webpack-plugin": "^3.0.0", (according to atom)