-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when running webpack dev server with clean plugin clearing dist folder and content not served #96
Comments
|
hi I figured it out. webpack dev server causing the recompile and thus invocation of clean webpack plugin, which clears dist folder. but to keep files there in dist folder you must instruct it to write to disk. then after every recompile it writes files to disk this can be set through writeToDisk:true, devServer: { this solved my question of keeping output files generated intact. |
|
What version of the webpack-dev-server do you use. I have tried, but failed |
|
thanks it worked for me :) |
|
Oh, thank so much |
|
Thank you dear. it worked for me . |
That's worked for me :) |
hi I am running webpack dev server with clean webpack plug in. It is working fine if we are just building it. but when I start dev server this plugin is clearing dist folder and so there is nothing to serve for the server and my screen is empty.
This is wepack configuratio I used.
plugins: [
new cleanWebPackOutPut(['dist/.']),
new HtmlWebpackPlugin
({
template: './src/index.html',
filename: 'index.html',
hash:true,
inject: true
})
],
devServer: {
index: 'index.html',
contentBase: path.join(__dirname, 'dist'),
compress: true,
hot: true, //Hot module replacement
port: 9000,
open: 'chrome' //open in chrome
}
The text was updated successfully, but these errors were encountered: