Minify and Bundle Javascript

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hi i was just wondering how to get nop to minify and bundle my javascript. It's all added in the head with Html.AddScriptParts

and the setting for minification is set to true but it's not working.. does my project need to be built in release mode?
Cheers,
Tom
9 years ago
I'm wondering if you find how to fix minifying because I have same problem and don't know how to fix it.
9 years ago
1. Ensure that you have this feature enabled in admin area
2. Your "debug" attribute in web.config should be set to "false"
9 years ago
Thanks Andrei  for the prompt replay. the future is enabled and debugging is set to false but it still not working.
It stop working after updated to latest framework 4.5 and then I run report Google Page Speed Insights
9 years ago
This is not working for me either. I cannot even find a "debug" line in the web.config. Am I missing something?
9 years ago
Hi All,

I have a problem regarding the javascript minification. I have set evrything, as Andrei suggested, (debug set to false and set the option from the General settings).

But when it bundle all the scripts, an error is ocurred that undefined is not a function. Basically, it has been bundled uncorrectly, but I don't know where it the problem.

I am attaching javascript like you can see below. I tried also using the scripts tags, but no success.

    Html.AppendScriptParts("~/Themes/scripts/Scripts/styleSheetToogle.js");

    Html.AppendScriptParts("~/Scripts/jquery-ui-1.10.3.custom.min.js");

    Html.AppendScriptParts("~/Scripts/public.ajaxcart.js");
    Html.AppendScriptParts("~/Scripts/public.common.js");
    Html.AppendScriptParts("~/Scripts/jquery-migrate-1.2.1.min.js");

    Html.AppendScriptParts("~/Scripts/jquery.validate.unobtrusive.min.js");
    Html.AppendScriptParts("~/Scripts/jquery.unobtrusive-ajax.min.js");
    Html.AppendScriptParts("~/Scripts/jquery.validate.min.js");
    Html.AppendScriptParts("~/Scripts/jquery-1.10.2.min.js");

Any ideas or help pls?

Thank in advance.

Kind Regards.
8 years ago
you can try this free online javascript minifier to compress the js code,  then you can reduce your js file size.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.