title: Webpack Exclude folder
body: <p>I'm shoving a rather large app through Webpack, which pulls from two library folders: thirdparty and node_modules. I've setup my rule for js files as such:</p>
  
  <pre><code>{
      test: /\.js$/,
      loader: 'babel-loader',
      include: [
        /src\/js\/client/
      ],
      exclude: [
        /node_modules/,
        /thirdparty/
      ]
    }
  </code></pre>
  
  <p>My hope was that webpack wouldn't parse any folders under either of those two directories, but I'm getting errors for libraries that are. For instance:</p>
  
  <pre><code>WARNING in ./~/durandal/js/system.js
  51:8-15 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
  
  WARNING in ./~/durandal/js/system.js
  52:8-15 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
  
  ERROR in ./~/durandal/js/system.js
  Cannot statically analyse 'require(..., ...)' in line 278
   @ ./src/js/client/lib/durandal/overrides/views.js 2:0-37
   @ ./src/js/client/index.js
  </code></pre>
  
  <p>Am I misunderstanding the functionality of include/exclude, or is this a bug with Webpack?</p>