I need to Add Jquery Library to header using my custom Module. so that I Create requirejs-config.js file under Vendorname_ModuleName\view\frontend and Its As Below
var config = {
map: {
'*': {
mypluginjs: 'Vendorname_ModuleName/js/mypluginjs'
}
}
};
then I added mypluginjs file under view\frontend\web\js named mypluginjs.js
Then I added My js script to phtml as below
<script type="text/javascript">
require(['jquery','mypluginjs '],function($){
$(window).load(function() {
//code here
});
});
</script>
but its showing error.I think not loading mypluginjs .what was the issue. is there any way to add custom jquery plugin via module