SquishIt icon indicating copy to clipboard operation
SquishIt copied to clipboard

SquishIt can't minify e5-shim

Open drewfreyling opened this issue 9 years ago • 4 comments

Getting a javascript error: Unexpected token ,

Steps to repo:

  • Create a new mvc app
  • Install Squishit 0.9.8
  • Add https://github.com/es-shims/es5-shim/blob/v4.1.6/es5-shim.min.js to your scripts folder
  • Add the following bundle:
@(Bundle.JavaScript()
      .Add("~/Scripts/jquery-1.10.2.min.js")
      .Add("~/Scripts/es5-shim.min.js").ForceRelease().MvcRender("~/Scripts/main.js"))
  • Run it and you should get the error

drewfreyling avatar Jun 11 '15 04:06 drewfreyling

This is unlikely to be a SquishIt problem, try using the YUI minifier.

AlexCuse avatar Jun 19 '15 16:06 AlexCuse

I usually configure this globally in Application_Start

            Bundle.ConfigureDefaults()
                  .UseYuiForCssMinification()
                  .UseYuiForJsMinification()

AlexCuse avatar Jun 19 '15 16:06 AlexCuse

@AlexCuse I think it is a SquishIt issue because the version of ajaxmin is capped (AjaxMin (≥ 4.48.4489.28432 && ≤ 4.97.4951.28483) - so out of the box the maximum version of the minifier that is specified does not work.

drewfreyling avatar Jun 21 '15 22:06 drewfreyling

That is because there are breaking changes in ajaxmin past that version. I plan to update in v1.0. f you want to use a newer version in the meantime you can implement your own minifiers but I would suggest using YUI (this is going to be the default in 1.0)

AlexCuse avatar Jun 22 '15 00:06 AlexCuse