You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that this task supports UglifyJS's wrap and define features for wrapping the entire code output in a closure to prevent global leaks and collisions. I have a growing collection of non-application-specific Angular modules from which I can pull specific components (dependencies) into my individual Angular applications. I enjoy having the flexibility to bundle only those global components which I need for my app, instead of requiring an entire global module (and all of its usable components).
This works well in terms of the DRY principle, but it can lead to name collisions / overwrites in the compressed output if both codebases—global and app—use the same function name for functions with similar purposes (e.g.—to define default configuration vs. custom configuration).
// In /global-stuff/modules/global.backend/config/config.set-response-interceptors.jsangular.module('global.backend').config(setResponseInterceptors);…functionsetResponseInterceptors($httpProvider){// Global configuration}
// In /my-cool-app/modules/app.backend/config/config.set-response-interceptors.jsangular.module('app.backend').config(setResponseInterceptors);…functionsetResponseInterceptors($httpProvider){// Application-specific configuration}
Can this task support the optional wrapping of individual src files in IIFEs before the final output is written to dest? (My alternative would be to manually wrap all of my existing components, as well as all future components, in closures).
The text was updated successfully, but these errors were encountered:
I understand that this task supports UglifyJS's
wrap
anddefine
features for wrapping the entire code output in a closure to prevent global leaks and collisions. I have a growing collection of non-application-specific Angular modules from which I can pull specific components (dependencies) into my individual Angular applications. I enjoy having the flexibility to bundle only those global components which I need for my app, instead of requiring an entire global module (and all of its usable components).This works well in terms of the DRY principle, but it can lead to name collisions / overwrites in the compressed output if both codebases—global and app—use the same function name for functions with similar purposes (e.g.—to define default configuration vs. custom configuration).
Can this task support the optional wrapping of individual
src
files in IIFEs before the final output is written todest
? (My alternative would be to manually wrap all of my existing components, as well as all future components, in closures).The text was updated successfully, but these errors were encountered: