Q:

Laravel 5.8 require function in app.js not found

I'm trying to add a chart in my Laravel frontend application. 

In app.js I added require('./horizBarChart');
In app.scss I added @import 'horizBarChart.scss';
After app.js I added the function call method (and a jQuery test, that works):

Now, after compiling I see that the horizBarChart function is included in my app.js generated file:

But when opening the website I still get funtion not found error:

If I dont use require but include it as basic <script src="../jquery.horizBarChart.min.js"></script> all works fine. 
What am I doing wrong here? 

A:

link tag in HTML is used for css, for scripts it should be:
<script src="/js/app.js"></script>

And also I think you should put this line below jQuery, not above as I see the library also uses jQuery, so make sure that jQuery is loaded first.