I have my webpack config as below
entry : {
lib: "./path/to/index",
sublib: "./path/to/sub/index"
},
output : {
filename: "[name]/[name].lib.js",
path: __dirname + "/dist",
}
It currently building in below folder structure
- src
|
|- /dist
|-- lib/lib.lib.js
|-- sublib/sublib.lib.js
But what I want is both should build in same folder i.e., lib
like below
- src
|
|- /dist
|-- lib/lib.lib.js
|---- lib.lib.js
|---- sublib.lib.js
And I don't want to make two different webpack config & I don't even want to merge my class in single export file because I want them in be separate.
Any Idea how I can achieve this I am using webpack 4. Any help will be appreciated.