clean-webpack-plugin icon indicating copy to clipboard operation
clean-webpack-plugin copied to clipboard

Removing all the project

Open Buom01 opened this issue 6 years ago • 3 comments

Hi An sorry, but I will be really synthetic this time. $webpack-dev-server --open --output dist --config webpack.config.js + clean-webpack-plugin = Evanesco

The 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 or webpack-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)

devServer: {
      contentBase: './dist',
      historyApiFallback: true,
      hot: true,
      overlay: true
    },

Buom01 avatar Sep 29 '19 03:09 Buom01

Could you provide a minimal reproducible example repo?

chrisblossom avatar Oct 15 '19 18:10 chrisblossom

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.

Buom01 avatar Oct 15 '19 19:10 Buom01

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"
  },

KeithTt avatar Dec 15 '19 16:12 KeithTt