title: JavaScript function is not defined with Laravel Mix
body: <p>First , code in resources/js/app.js</p>
  
  <pre><code>function button1Clicked(){
    console.log('Button 1 is clicked');
  }
  </code></pre>
  
  <p>Second , code in testing.blade.php</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta name="csrf-token" content="{{ csrf_token() }}"&gt;
    &lt;title&gt;Testing&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;button onclick="button1Clicked()"&gt;Button 1&lt;/button&gt;
    &lt;button onclick="button2Clicked()"&gt;Button 2&lt;/button&gt;
  
    &lt;script type="text/javascript" src="{!! asset('js/app.js') !!}"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      function button2Clicked(){
        console.log('Button 2 is clicked');
      }
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>After <code>npm run dev</code> and testing in localhost</p>
  
  <p><a href="https://i.stack.imgur.com/AyuDG.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/AyuDG.jpg" alt="enter image description here"></a></p>
  
  <p>As a result, JavaScript function <code>button1Clicked()</code> in <code>resources/js/app.js</code> is not defined. but the function <code>button2Clicked()</code> in <code>testing.blade.php</code> can be defined.
  Is it a bug from Laravel Mix or I did some mistakes</p>