Open andrelandgraf opened 6 years ago
https://laravel.com/docs/5.6/blade#stacks to import js the right way
ES6 imports are still not supported by current browser versions. Workaround would be: https://stackoverflow.com/questions/42237388/syntaxerror-import-declarations-may-only-appear-at-top-level-of-a-module?rq=1
TODO: window.myFunction = function(){...}
is working now but the aim is to define interactive functions like: button.addEventListener('click', myFunction)
and this is not working so far.