title: can't set custom file naming of bundled files in webpack 3
body: <p>I expect to have my bundled files with the names <strong>index.js</strong> and <strong>styles.css</strong> <em>(like the names of source files)</em> after running webpack for production. 
  But I get files with names <strong>main.js</strong> and <strong>main.css</strong> instead. My webpack config seems to be set up correcty, when I set <em>filename</em> prop in both cases. And i can't understand why this is not working. What can be wrong with my config?</p>
  
  <p>"webpack": "^3.1.0"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const path = require('path');
  
  // Plugins
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  // Webpack Plugins
  const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
  const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin');
  
  // VARS
  const NODE_ENV = process.env.NODE_ENV;
  const DEVELOPMENT = NODE_ENV === 'development';
  const PRODUCTION = NODE_ENV === 'production';
  
  module.exports = {
   context: path.resolve(__dirname, "src"),
  
   entry: "./index.js",
  
   output: {
    path: path.resolve(__dirname, "public"),
    filename: "assets/js/[name].js"
   },
  
   module: {
    rules: [
     {
      test: /\.js$/,
      exclude: /node_modules/,
      loader: "babel-loader"
     },
     {
      test: /\.css$/,
      use: ['style-loader', 'css-loader']
     },
     {
      test: /\.scss$/,
      use: ExtractTextPlugin.extract({
       fallback: 'style-loader',
       use: ['css-loader', 'sass-loader'],
      })
     }
    ]
   },
  
   plugins: [
    new NamedModulesPlugin(),
    new LoaderOptionsPlugin({
     debug: !PRODUCTION,
     cache: !PRODUCTION,
     minimize: PRODUCTION,
     options: {
      sassLoader: {
       outputStyle: PRODUCTION ? 'compressed' : 'expanded',
       precision: 10,
       sourceComments: false,
       sourceMap: PRODUCTION,
      }
     }
    }),
    new ExtractTextPlugin({
     filename: 'assets/css/[name].css',
     disable: !PRODUCTION,
    }),
    new HtmlWebpackPlugin({
     filename: 'index.html',
     hash: false,
     inject: 'body',
     chunksSortMode: 'dependency',
     template: './index.html',
    })
   ],
  
   devtool: DEVELOPMENT ? "cheap-module-eval-source-map" : "hidden-source-map",
  
   devServer: {
    contentBase: path.resolve(__dirname, "public"),
    historyApiFallback: true,
    host: '127.0.0.1',
    port: '3000'
   }
  
  };</code></pre>
  </div>
  </div>
  </p>