i have a function in my resource/js/app.js like:
function notifme(text) {
alert(text);
}
i am using webpack.. after compiling with npm run dev..
when i'm calling this in my template/body
$(document).ready(function(){
notifme('alert');
});
it's not working. and there is some file like
(function(module, exports) {....
in my js file. i think webpack add extra to my compiled file.. because if i add the main function separately or right before my calling script tag in html, it's working..!!!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community