petehunt / webpack-howto

10.12k stars 697 forks source link

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

Open Leechikit opened 8 years ago

Leechikit commented 8 years ago

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 ?

phun-ky commented 7 years ago

This is still an issue with webpack 2.2.0