Filepath is, **Vendor_Modulename/web/js/myfile.js** requirejs-config.js var config = { paths: { 'myfile': "Vendor_Modulename/js/myfile" }, shim: { 'myfile': { deps: ['jquery'] } } **using,You can use anywhere in your template file by below method,** <srcipt> require(["jquery","myfile"],function($,myfile){ $(document).ready(function(){ //call your js here... }) }) </script>