I had a library which was internally using another library but was not included in it. So, the other library has to be loaded first. But it was not happening. To solve it I had to create a new js file which will import the other library and put as the first entry point in the webpack config and then the second library will be included later as it will be traversed later.
e.g. You have libraries “one” and “two” and you want to include “one” before “two” then your entry configuration should look like below:
entry: { app: ['./src/one', './src/two'] },