Webpack-dev-server doesn't create dist folder on local
The webpack-dev-server successfully bundles the html, scss and js files and also outputs to localhost:8080
, but the dist folder is not generated on the local machine. Below is my webpack config:
var extractPlugin = new ExtractTextPlugin({
filename: 'main.css'
});
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
},
devtool: 'inline-source-map',
devServer: {
port: 3000
},
plugins: [
extractPlugin,
new HtmlWebpackPlugin({
template: 'public/index.html'
}),
new CleanWebpackPlugin(['dist'])
]
};
+3
source to share