petehunt/webpack-howto

webpack.optimize.CommonsChunkPlugin optimizes common stylesheets to an unexpected file name

Opened this issue · 1 comments

when i use both "extract-text-webpack-plugin" and "webpack.optimize.CommonsChunkPlugin"

var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
 plugins: [
    new ExtractTextPlugin("css/[name].css"),
    new webpack.optimize.CommonsChunkPlugin('js/common.js')
  ]
}

i have multiple entrypoints and require the same style file,and after packaging,there is a common style file named common.js.css

how i can control the common style file's name or avoid optimizing style files to a common file ?

This is still an issue with webpack 2.2.0