title: Running Webpack with different entry point each time, but still use a config file?
body: <p>I have a project which holds code for numerous different websites. These are not websites that I build or maintain, I just build components for them and deliver these bits of code to be implemented on the site.</p>
  
  <p>The folder structure looks like this:</p>
  
  <pre><code>.
  +-- tsconfig.json
  +-- site_A
  |   +-- component1
  |   |   +-- component1.html
  |   |   +-- component1.css
  |   |   +-- component1.js
  +-- site_B
  |   +-- component2
  |   |   +-- component2.ts
  +-- my_modules
  |   +-- module1.ts
  |   +-- module2.ts
  |   +-- module3.ts
  </code></pre>
  
  <p>The <code>my_modules</code> folder holds functions I use frequently across many components, and therefore I would like to write them as reusable modules. My problem is, that since this is not a single project, I can't really run a single build script on all of it, but actually need to specify the entry point each time I run Webpack. </p>
  
  <p>What I'm currently using as a solution is the following npm build script:</p>
  
  <p><code>"build": webpack --module-bind 'js=babel-loader' --module-bind 'ts=ts-loader' --output-path './build' --output-filename '[name].js'</code> </p>
  
  <p>and I pass it the entry point as an argument. However, this prevents me from using a <code>webpack.config.js</code> file, and all its advanced capabilities.</p>
  
  <p>Is there a way I can use a config file and still be able to specify the entry point when running the build? I'm also open for suggestions on other module bundlers if they would offer a better experience.</p>