Trying to apply bundling to scripts, which worked fine when were located at pages in old way (manually). This is bundles registration:
Bundle sbundle = new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/menu-correction.js",
"~/Scripts/validation-rules.js",
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery-ui-{version}.js",
"~/Scripts/jquery.validate*");
bundles.Add(sbundle);
bundles.Add(new ScriptBundle("~/bundles/session").Include(
"~/Scripts/jquery.plugin.js",
"~/Scripts/jquery.countdown.js",
"~/Scripts/session-management.js"));
//others
Then in Layout page call: @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/session") But when minification is become enabled, i got this errors in chrome console:
- Uncaught SyntaxError: Unexpected identifier jqueryval:1
- Uncaught SyntaxError: Unexpected identifier session:1
Also i can see my scripts in tab page "Sources" of chrome developer tools - they are minificated successfully. Spent enough time trying to fix this. What can be a reason of this mistake? Thanks in advance.