Webpack Server does not collect .js, what to do with it?

Webpack-dev-server 2.4.2 does not collect .js (in my case it bundle.js). At startup all outputs to the terminal with no errors, says "successful", but no result - displays unchanged bundle.js
When applying for the webpack command without run locally, all works without errors, the build is happening. Do not remain indifferent to this issue on the Internet this problem is quite common.
const ExtractTextPlugin = require('extract-text-webpack-plugin');
var path = require('path');

module.exports = {
 entry: './src/app.js',
 output: {
 filename: 'bundle.js',
 path: path.resolve(__dirname),
 publicPath: path.resolve(__dirname, './static')
 // path: __dirname + '/bundle'
 module: {
 rules: [
 test: /\.js$/,
 exclude: [/node_modules/],
 use: [{
 loader: 'babel-loader',
 options: { presets: ['es2015'] }
 test: /\.css$/,
 use: ExtractTextPlugin.extract({
 fallback: 'style-loader',
 use: 'css-loader'
 devServer: {
 contentBase: path.join(__dirname, "dist"),
 compress: true
 stats: "errors-only",
 open: true
 // devServer: {

 // },
 plugins: [
 new ExtractTextPlugin('styles.css')
June 27th 19 at 14:57
1 answer
June 27th 19 at 14:59
MB the problem is that bundle.js you have just cached.
Try to use it
It adds a hash to name the file and change it each time you rebuild, so the bundle is loaded each time.
Plus, it is not necessary to register in index.html the names of the js files. It helps when several of them.
It's a shame that it's not specified in the regulations. Thank you - Emmanuelle.Gleichner commented on June 27th 19 at 15:02

Find more questions by tags Webpack