title: Generating AMD modules with webpack and CommonsChunkPlugin
body: <p>I am developing multiple plugins to a system that loads these plugins as AMD modules (with requirejs). Plugins are written as ES6 modules and packed with webpack (output.libraryTarget = 'amd'). Everything works as expected so far.</p>
  
  <p>But plugins share quite a lot of common code that is bundled into every entry. I tried to use <code>CommonsChunkPlugin</code> webpack plugin but initial chunk contains code that is not AMD module. However other entry points relaying on common chuck are still generated correctly. Also <a href="https://webpack.github.io/docs/code-splitting.html#multiple-entry-chunks">documentation</a> says that it is not good idea to have multiple initial chunks (with JSONp runtime) on one page - there is possibility that another plugin author would use same approach.</p>
  
  <p>Is there a way to optimize this use case in AMD compatible manner?
  It seems to me as a bug in <code>CommonsChunkPlugin</code> that the initial entry is not AMD (but still its code is not safe to be loaded in plugin env)... Is there a configuration I am missing?</p>