First , code in resources/js/app.js
function button1Clicked(){
console.log('Button 1 is clicked');
}
Second , code in testing.blade.php
<!DOCTYPE html>
<html>
<head>
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Testing</title>
</head>
<body>
<button onclick="button1Clicked()">Button 1</button>
<button onclick="button2Clicked()">Button 2</button>
<script type="text/javascript" src="{!! asset('js/app.js') !!}"></script>
<script type="text/javascript">
function button2Clicked(){
console.log('Button 2 is clicked');
}
</script>
</body>
</html>
After npm run dev and testing in localhost
As a result, JavaScript function button1Clicked() in resources/js/app.js is not defined. but the function button2Clicked() in testing.blade.php can be defined.
Is it a bug from Laravel Mix or I did some mistakes

webpack.mix.jsandapp.jsfiles?{{ }}and not{!!because{!!are used to display unescaped content