title: Laravel using select2 plagin and change app.js in laravel
body: <p>I have aproblem. I built a project using Laravel 5.8 and it depends on the select2 plugin. I did everything correctly. But after compiling the project </p>
  
  <pre><code>npm run dev
  </code></pre>
  
  <p>I have the following exception:</p>
  
  <pre><code>Uncaught TypeError: $(...).select2 is not a function
  </code></pre>
  
  <p>I know what has to be done. <code>jQuery</code> is connecting twice in this project. At first in my <code>.blade.php</code>:</p>
  
  <pre><code>{{asset('adminlte/bower_components/jquery/dist/jquery.min.js')}}
  </code></pre>
  
  <p>and a second time after compiling (<code>npm run dev</code>), the Laravel, by itself, does it in <code>public/js/app.js</code></p>
  
  <pre><code>  window.$ = window.jQuery = 
    __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
  </code></pre>
  
  <p>If I delete this code, I don't see the issue and select2 works correctly. 
  Here is the compiled code from <code>public/js/app.js</code></p>
  
  <p><img src="https://i.ibb.co/f2vqXTv/1.jpg" alt="two muppets"></p>
  
  <p>It says: code may be modified to fit the specific needs of your application.</p>
  
  <p>Does anyone know how to hide this line after compilation? </p>
  
  <p>Or should I delete this code after each compiling turn? </p>