I've added this code to web/static/js/app.js,
export var App = {
run: function(){
console.log("Hello!")
}
}
Then add this in web/templates/layout/app.html.eex
<script>require("web/static/js/app").App.run()</script>
Then refresh the browse its showing this in console:
TypeError: require(...).App is undefined
<script>require("web/static/js/app").App.run()</script>
Some one please tell me how to finish it.