Skip to content

Angular module that uses IIFE breaking minification #391

@sethlesky

Description

@sethlesky

I've installed angular-embedly with angular-fullstack (bower install angular-emebedly ) and it works when running 'grunt serve'.

When building or running with 'grunt serve:dist' I get the service injection error (can't find service).

I noticed the module is wrapped in an IIFE:
https://github.com/Urigo/angular-embedly/blob/master/angular-embedly.js#L7

Removing the IIFE and chaining instead allows minification to work, although I'm uncertain why.

I'm looking for any insight here as I'm unsure the source of the error. Should IIFE be avoided in modules, or is it the minifier?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions