Load JS in _LayoutRoot [Bug]

Jun 2, 2015 at 8:20 AM
Edited Jun 2, 2015 at 8:21 AM
Please, see my picture. are they load same lirary js ?
Jun 2, 2015 at 8:36 AM
Edited Jun 2, 2015 at 8:42 AM
Yes, this is an oversight, and we'll get it sorted, you've commented out the correct one to make it behave correctly, I'll push it as a hotfix to the github repository shortly.

These two will load the same files in when bundling is turned off, but they work in different ways, and the ~/admin/scripts/apps url is the preferred version.

This is because we've started to phase out our 'dynamic bundling' that we had in previous versions, and replaced it with the standard .NET implementation, with some helper classes to make the generation of them slightly easier. This is because the dynamic bundling proved to be a bit unreliable on larger sites, and difficult to debug the root cause of the issues we were having, as they only really manifested in production.

AddAppAdminScripts would just call into the Html.IncludeScript() method with each of the configured app script lists. What the Html.IncludeScript() method used to do was create a list of required scripts for the requests, and generate a bundle based on the URLs and the site id, which is rendered by RenderScripts(). This worked 99.9% of the time, but would sporadically just stop serving certain bundles/files, so we opted for the more low-tech create your own bundles option, but seeing as we had the app scripts and stylesheets interfaces, we created a couple of default bundles such as the apps bundles.

In the latest version, the RenderScripts() method will just output the scripts passed to IncludeScript(), without attempting to bundle or minify them. This means that we would suggest using include script for scripts that are only required on a given page.


EDIT: here's the updated release
Jun 4, 2015 at 5:39 AM
Thank Gary,