Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Minification issues in ui-bootstrap-tpls #1682

Closed
valentinvieriu opened this issue Jan 27, 2014 · 9 comments
Closed

Minification issues in ui-bootstrap-tpls #1682

valentinvieriu opened this issue Jan 27, 2014 · 9 comments

Comments

@valentinvieriu
Copy link

The ui-bootstrap fails to work when minified. I've quickly looked over the code and spotted some issue like :
https://github.com/angular-ui/bootstrap/blob/gh-pages/ui-bootstrap-tpls-0.10.0.js#L95

I've fixed this but it looks that there are other places that are missing the correct number of array parameters

@mvhecke
Copy link
Contributor

mvhecke commented Jan 27, 2014

What are you using for minification? I don't have any problems in UglifyJS. At the moment I think most of the incorrect number of parameters are fixed in the master branch, so it should be solved in the next release.

@valentinvieriu
Copy link
Author

I'm using the Yeoman configuration for Grunt. So it's grunt-contrib-uglify
The only settings that allowed me to somehow make it work are:
uglify: {
options :{
mangle: false
}
}

@mvhecke
Copy link
Contributor

mvhecke commented Jan 27, 2014

I've also disabled mangle by default, because it causes quite a few problems and not only with Bootstrap.

@pkozlowski-opensource
Copy link
Member

@Gamemaniak @valentinvieriu did you guys manage to pinpoint what is causing issues with the mangle: true option? I would be really keen on fixing things if we can fix things in this library.

@valentinvieriu did you spot any other problem, besides carousel, that are visible with minification? Carousel stuff is fixed in master but as noted above, I would really like to fix other problems if present.

@pkozlowski-opensource
Copy link
Member

Ah, I think we should also switch the demo site to using a minified version of this library so any issues like this one are immediately visible.

@valentinvieriu
Copy link
Author

@pkozlowski-opensource I've only had a quick look only over the ui-bootstrap-tpls and the collapse was the only one that I've spotted, but it didn't fixed the errors. It's quite hard to debug in the minified version. I suspect that there might be some other inside some inline controller in some directive.
Sorry that I'm not more helpful. If time will allow me, I will try to digg deeper. I think that using the minified version for the demo is a good idea!

@Foxandxss
Copy link
Contributor

That has been fixed on master already. @pkozlowski-opensource It should work with mangle, we have all the directives manually prepared for that. This is just a leftover of the BS3 updated that has been fixed already :)

@pkozlowski-opensource
Copy link
Member

Thnx @Foxandxss . Just tested on my side with the minified version (latest uglify) and things seem to be in order. @valentinvieriu please let us know if you spot anything else!

@mvhecke
Copy link
Contributor

mvhecke commented Jan 27, 2014

@pkozlowski-opensource Sorry, haven't tested it separately, I meant in my project context. I will try it out when I've got time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants