statianzo / webpack-livereload-plugin

LiveReload during webpack --watch
ISC License
204 stars 51 forks source link

Compatibility with CleanWebpackPlugin? #53

Open nawlbergs opened 5 years ago

nawlbergs commented 5 years ago

Does this plugin trigger a full build? After triggering a change... all my files get deleted except for the chunk with the file change...

for instance... all my files in dist/auth remain but the files in dist/tenant and everywhere get nuked. im assuming the dist/auth files still remain because my HtmlWebpackPlugin is running again... but CopyWebpackPlugin is not? im just confused.

entry: {
    auth:   `src/auth/index.js`
},
output: {
    filename: '[name]/[name]-bundle-[contenthash].js',
    path: path.resolve(__dirname, 'dist'),
    publicPath: "/"
},
plugins:[
    new CleanWebpackPlugin(),
    new HtmlWebpackPlugin({
      chunks: ['auth']
    }),
    // copy a bunch of files from src/tenant to dist/tenant
    new CopyWebpackPlugin([ { from:'./src/tenant', to:'tenant' } ]),
    new LiveReloadPlugin({})
]