index-file-webpack-plugin
A webpack resolver plugin to specify directory index file.
Install
npm i -D index-file-webpack-plugin
webpack config
var IndexFilePlugin = var webpack =
plugins: '[name].js' // '[name]' is directory name. 'main.js' 'index.js'
webpack2 config
var IndexFilePlugin = var webpack =
resolve: plugins: '[name].js' // '[name]' is directory name. 'main.js' 'index.js'