entry: {
'module/a/index': 'module/a/index.js',
'module/b/index': 'module/b/index.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
}└── module
├── a
│ └── index.js
└── b
└── index.js
from : https://stackoverflow.com/questions/35903246/how-to-create-multiple-output-paths-in-webpack-config