Im new to webpack 3. Im working on a project that we want to split in libraries: AppLibrary and MyLibrary. 

My purpose is to be able to build these two files:

```
<script src="./MyLibrary.js"></script>
<script src="./AppLibrary.js"></script>
<script>

new AppLibrary(MyLibrary);

</script>

```

**I would like to do the building using only one webpack command instead of building the libraries with two commands**.

Because I dont know how to do it, **I have two webpack.config files. One for AppLibrary and another one for the MyLibrary.**

**appLibrary.webpack.js**

```
const path = require('path');

module.exports = {
  entry: {
    app: './src/App/app.js'
  },
  module: {
    rules: [{
      test: /\.js$/,
      exclude: /(node_modules|bower_components|device)/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: ['env']
        }
      }
    }]
  },
  output: {
    path: path.resolve( __dirname, 'dist'),
    filename: '[name].js',
    library: 'AppLibrary'
  }
};

```

**library.webpack.js**

```
const path = require('path');

module.exports = {
  entry: {
    library: './src/Library/Library.js'
  },
  externals: {
    "some": "some"
  },
  module: {
    rules: [{
      test: /\.js$/,
      exclude: /(node_modules|bower_components|externals)/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: ['env']
        }
      }
    }]
  },
  output: {
    path: path.resolve( __dirname, 'dist'),
    filename: '[name].js',
    library: 'MyLibrary'
  }
};

```

Currently **I need to exec two commands to output two libraries.** Is there any way to handle this situation?

Folder structure is like follow:

```
- src
  |
  |- /dist
  |-- library.js
  |-- app.js
  |
  |- /Library
  |-- library.webpack.js
  |
  |- /App
  |-- app.webpack.js

```