johnagan / clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing all the project

Buom01 opened this issue · 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 #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
    },

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