title: Missing entries in manifest.json
body: <p>I could not find a solution either searching for issues with <strong>CopyWebpackPlugin</strong> nor <strong>ManifestPlugin</strong> through github and google.</p>
  
  <p>When I build the bundles using <code>webpack -p</code> the following gets done.</p>
  
  <ul>
  <li>Code runs through transpilers, minify, etc. (see webpack.config.js)</li>
  <li>imported css assets will be emitted (<strong>MiniCssExtractPlugin</strong>)</li>
  <li>the output folder (<code>public/build</code>) is emptied (<strong>CleanWebpackPlugin</strong>)</li>
  <li>some resources from <code>assets/img/static</code> get copied to <code>public/build/img</code> (<strong>CopyWebpackPlugin</strong>)</li>
  <li>a manifest.json gets written, which works nicely with symfony's assets helper, that lets you reference the same paths no matter whether the files are served from <code>/build</code> or <code>localhost:8080/build</code> (aka production build or devserver) (<strong>ManifestPlugin</strong>)</li>
  </ul>
  
  <p>This is working well.</p>
  
  <p>If I watch and serve files with <code>webpack-dev-server -d --env.development</code>, the same is achieved.</p>
  
  <p>But when I change some JS Code and everything gets rebuilt, the assets copied by the CopyWebpackPlugin disappear from the manifest.json lookup-file.</p>
  
  <p>The files are still served from eg. <code>http://localhost:8080/build/img/app-logo.png</code>.</p>
  
  <p>Does anyone have a clue which plugin this issue is related to? Or even better how to solve that problem?</p>
  
  <p>I'll paste the output of a correct <code>manifest.json</code>, an uncompleted one and of my webpack.config.js below.</p>
  
  <p><strong>correct manifest.json</strong></p>
  
  <pre><code>{
    "main.css": "http://localhost:8080/build/main.css",
    "main.js": "http://localhost:8080/build/main.bundle.js",
    "img/app-logo.png": "http://localhost:8080/build/img/app-logo.png"
  }
  </code></pre>
  
  <p><strong>manifest.json after changing a file the first time and let devserver rebuild</strong></p>
  
  <pre><code>{
    "main.css": "http://localhost:8080/build/main.css",
    "main.js": "http://localhost:8080/build/main.bundle.js"
  
  }
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>const webpack = require('webpack');
  const path = require('path');
  const fs = require('fs');
  const ManifestPlugin = require('webpack-manifest-plugin');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  const CopyWebpackPlugin = require('copy-webpack-plugin');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  
  module.exports = env =&gt; {
    const dev = env &amp;&amp; env.development;
  
    let publicPath = '/build/';
    if (dev) {
      publicPath = 'http://localhost:8080/build/';
    }
    return {
      entry: {
        main: './assets/js/main.js',
      },
  
      output: {
        path: path.resolve(__dirname, 'public', 'build'),
        filename: '[name].bundle.js',
        publicPath: publicPath
      },
  
      module: {
        rules: [
          {
            test: /\.(js|jsx)$/,
            exclude: /node_modules/,
            use: [
              'babel-loader',
            ],
          },
          {
            test: /\.css$/,
            use: [
              MiniCssExtractPlugin.loader,
              'css-loader'
            ]
          },
          {
            test: /\.(eot|svg|ttf|woff|woff2)$/,
            exclude: /node_modules/,
            use: [
              {
                loader: 'url-loader',
                options: {
                  context: path.resolve(__dirname, 'assets'),
                  name: '[path][name].[ext]',
                  limit: 1024
                }
              }
            ]
          },
          {
            test: /\.(jpe?g|png|gif)$/i,
            exclude: /node_modules/,
            use: [
              {
                loader: 'file-loader',
                options: {
                  context: path.resolve(__dirname, 'assets'),
                  name: '[path][name].[ext]',
                }
              }
            ]
          }
  
        ]
      },
  
      devtool: dev ? 'cheap-source-map' : false,
  
      devServer: {
        contentBase: path.join(__dirname, 'public'),
        headers: {
          "Access-Control-Allow-Origin": "*",
          "Access-Control-Allow-Methods": "GET",
          "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
        }
      },
  
      resolve: {
        extensions: ['.js', '.jsx'],
        alias: {
          css: path.resolve(__dirname, 'assets', 'css')
        }
      },
  
      plugins: [
        new webpack.ProvidePlugin({
          $: 'jquery',
          jQuery: 'jquery'
        }),
        new MiniCssExtractPlugin({
          filename: "[name].css",
          chunkFilename: "[id].css"
        }),
        new CopyWebpackPlugin([
          {
            from: 'assets/img/static/',
            to: 'img/',
          }
        ]),
        new CleanWebpackPlugin(
          [
            'public/build'
          ]
          ,
          {
            exclude: ['public/build/img/']
          }
        ),
        new ManifestPlugin({
          writeToFileEmit: true
        }),
      ]
    };
  };
  </code></pre>