In DNN 9.2 I am using this tag to load a javascript file:
<dnn:DnnJsInclude runat="server" FilePath="~/DesktopModules/aivestPortfolio/Scripts/aivest/Portfolio.js" Priority="500" />
Works OK, but now Portfolio.js depends on PortfolioUtils.js (var utils = new PortfolioUtils(), I know it's not the fine wine), so I add PortfolioUtils.js:
<dnn:DnnJsInclude runat="server" FilePath="~/DesktopModules/aivestPortfolio/Scripts/aivest/PortfolioUtils.js" Priority="300" />
This throws "PortfolioUtils is not defined" in Portfolio.js, but only when "Enable Composite Files" (Servers / Server Settings / Performance) is enabled. Otherwise it works OK. I can see the Portfolio.js code in one of the DependencyHandler.axd files, but the PortfolioUtil type is missing completely.
It also works, when I am loading PortfolioUtils.js like this:
<script src='<%=ResolveClientUrl("~/DesktopModules/aivestPortfolio/Scripts/aivest/PortfolioUtils.js") %>' type="text/javascript"></script>
I tried increasing the "site version" to no avail.
Strangely, it also works (with composite files enabled) on my local machine, but not on my production Azure web app.