I am using laravel mix, which produces files correctly. Everything works fine, except when I call function form console I receive
Uncaught ReferenceError: test is not defined
at <anonymous>:1:1
This is part of code I get from running npm run dev. How can I call this function from console?
__webpack_require__(14);
function test() {
return 'testing';
}
$(document).ready(function () {
console.log(test());
});