title: Requiring a package is causing an error
body: <p>Each time I am bundling scripts, I have following error:</p>
  
  <pre><code>ERROR in ./resources/assets/scripts/main.js
  Module not found: Error: Can't resolve 'datatables.net-colreorder-bs4' in '/home/vagrant/sites/laravel/resources/assets/scripts'
   @ ./resources/assets/scripts/main.js 12:23-63
  </code></pre>
  
  <p>My webpack config js:</p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  
  module.exports = {
      entry:  './resources/assets/scripts/main.js',
      output: {
          path: path.resolve(__dirname, './public/js'),
          filename: 'mainBundle.js'
      },
      module: {
          loaders: [
              {
                  test: /\.js$/,
                  exclude: /node_modules/,
                  loader: 'babel-loader',
                  query: {
                      presets: ['env']
                  }
              }
          ]
      },
      stats: {
          colors: true
      },
      node: {
          fs: 'empty'
      },
      devtool: 'source-map'
  };
  </code></pre>
  
  <p>And my main js file looks like this (no other modules are causing any problems).</p>
  
  <pre><code>var jszip = require('jszip');
  var pdfmake = require('pdfmake');
  var netBs4 = require('datatables.net-bs4')();
  var netButtonsBs4 = require('datatables.net-buttons-bs4')();
  var buttonsHtml5 = require('datatables.net-buttons/js/buttons.html5.js')();
  var buttonsPrint = require('datatables.net-buttons/js/buttons.print.js')();
  var netColreorderBs4 = require('datatables.net-colreorder-bs4')();
  var netReponsiveBs4 = require('datatables.net-responsive-bs4')();
  </code></pre>
  
  <p>I checked the path and it is ok, I also changed the path to absolute but it did not have any effect.</p>
  
  <p>package json: </p>
  
  <pre><code>"dependencies": {
          "add": "^2.0.6",
          "babel-core": "^6.26.0",
          "babel-loader": "^7.1.2",
          "chart.js": "^2.7.1",
          "datatables.net-bs4": "^1.10.16",
          "datatables.net-buttons-bs4": "^1.5.1",
          "datatables.net-colreorder-bs4": "^1.4.1",
          "datatables.net-responsive-bs4": "^2.2.1",
          "gulp-changed": "^3.2.0",
          "gulp-debug": "^3.2.0",
          "jquery": "^3.2.1",
          "jquery-ui": "^1.12.1",
          "jszip": "^3.1.5",
  </code></pre>
  
  <p>This question is still not resolved, for some reason 'datatables.net-colreorder-bs4' will not be found when using npm... I decided to load it as a ready to use bundle instead of webpacking it...</p>