I am using SharePoint framework and until some recent changes in master page everything worked well, but after removal of few scripts, minification and bundling, few users started complaining that page crashed with error "The value of the property '$' is null or undefined, not a Function object". The way script is added seems correct, in bundle it is placed first, and it is not browser based issue (tried same browsers as client), so the only reason I thought of was so that my custom script (which resides at the end of body section) starts working before jQuery is loaded (in head section). If so, how to prevent it without loosing performance? If not, what could be other causes?
I use user control to add jQuery, which is registered in master page with few other javascripts and css
<asp:PlaceHolder runat="server" ID="phSkin">
<script type="text/javascript" src="<%= pathToJS %>"></script>
</asp:PlaceHolder>
The master page looks roughly like that (tried to minify as mush as I can)
<%@ Register TagPrefix="nf" TagName="CssSkin" Src="path_to_user_control" %>
<html>
<head>
//few initializations
<nf:CssSkin runat="server" __designer:Preview="
<link type="text/css" href="/path/GetBrandSiteSkin.ashx" rel="stylesheet" />
" __designer:Values="<P N='TemplateControl' R='0' />"/>
</head>
<body>
//layout formating
<script type="text/javascript" src="path_to_custom.js"></script>
</body>
</html>