webpack 输出多个文件
http://react-china.org/t/webpack/1870/2
entry = {
"button": "demo/button/index.jsx"),
"grid": "demo/grid/index.jsx")
},
output: {
path: 'dist/js',
filename: "[name].js",
chunkFilename: "[name].js"
},
plugins: [
new CommonsChunkPlugin("common.js", ["button", "grid"])
]
output中的[name]对应于entry中的key值,因此生成后的文件名是button.js和grid.js。