-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Encapsulate build files in IIFE #5196
Comments
The actual error is: Because in my file the next thing is an IIFE, so concatenated code looks like: angulat.module.run(...)(function(){...}()); So the js engine tries to evaluate it as a function. |
Not sure why it is like that - this should be fixed on next release after #5197 gets in. There is no benefit of wrapping everything in an IIFE here - all of the innards are encapsulated in angular modules, and there is no global being set by UI Bootstrap. |
@philBrown please read the Code of Conduct - if you do not change the tone/attitude in your comments (as this is not the first issue where this is exhibited), you will be blocked from commenting, and the Angular team will be notified of this violation. |
@wesleycho my apologies, it's been a long day (previous comment removed). I am able to work around this by using the pre-minified version of Do you have a rough timeframe on a 1.0.1 release? |
@philBrown not a problem, we all have them - hope you get some rest! We're likely to release a 1.0.1 on Monday evening PST or Tuesday morning PST if I have agreement from the others. |
I general it is best practice to wrap library to IIFE and also use strict mode
I don't get it why angular bootstrap don't do it? |
When using
ui-bootstrap-tpls.js
withgulp-useref
into a build process resulting code is not working. This is due to a missing;
at the end of the file. Adding the;
or encapsulating into an IIFE solves the issue.I suggest better to encapsulate all the lib into an IIFE.
The text was updated successfully, but these errors were encountered: