buunguyen / combres

ASP.NET and MVC performance optimization library ⛺
Other
123 stars 37 forks source link

Combres can not minify AngularJs #39

Closed anhtata closed 9 years ago

anhtata commented 9 years ago

Hi Buu,

I tried to use combres to compress AngularJs but it didn't work. Do you have any way to move all AngularJs files into one file. My project is working with ASP.NET 2, MVC.NET 2 and Combres 2.2

It's great if you have any solution!

Thanks in advanced!

buunguyen commented 9 years ago

What's the error you have? Generally, just populate combres.xml with all the necessary scripts in the right order and it should work.

anhtata commented 9 years ago

Yes I put them in the right order and it works well if defaultDebugEnabled="true" If i change defaultDebugEnabled="false" then it displays Uncaught ReferenceError: $ is not defined You can see at http://i.imgur.com/kobwyvp.png

mrunalbrahmbhatt commented 9 years ago

Try to change minifier. Like yui to ms ajax On 30/01/2015 5:43 PM, "Anh Ta" notifications@github.com wrote:

Yes I put them in the right order and it works well if defaultDebugEnabled="true" If i change defaultDebugEnabled="false" then it displays Uncaught ReferenceError: $ is not defined You can see at http://i.imgur.com/kobwyvp.png

— Reply to this email directly or view it on GitHub https://github.com/buunguyen/combres/issues/39#issuecomment-72160915.

anhtata commented 9 years ago

Thank all very much, Now It worked well. I must fixed A Note on Minification of AgularJs at https://docs.angularjs.org/tutorial/step_05 (follow guide form https://scotch.io/tutorials/declaring-angularjs-modules-for-minification) and change minifier to msajax

mrunalbrahmbhatt commented 9 years ago

I had similar issues with Google clouser

Mrunal On 30/01/2015 9:16 PM, "Anh Ta" notifications@github.com wrote:

Thanks Buu very much, Now It worked well. I must fixed A Note on Minification of AgularJs at https://docs.angularjs.org/tutorial/step_05 (follow guide form https://scotch.io/tutorials/declaring-angularjs-modules-for-minification) and change minifier to msajax

— Reply to this email directly or view it on GitHub https://github.com/buunguyen/combres/issues/39#issuecomment-72180350.

buunguyen commented 9 years ago

Ah, the notorious AngularJS DI minification problem. Using array declaration DI syntax should fix it, I don't think it's necessary to switch the minifier although it also depends on your code.