Skip to content

Minification is stripping the basic IIFE wrapper from the cached templates #161

Closed

Description

@dmellstrom

My issue is with the moduleSystem option, value 'IIFE'.

When minifying a build containing concatenated cached templates provided by this plugin, using UglifyJS, the functional wrapper is removed from the prepared templates.

Activity

  1. added a commit that references this issue on Oct 17, 2018
    2f4cb33
  2. simonua commented on Oct 17, 2018

    @simonua
    Collaborator

    While I principally tend to agree with this change, I'm wondering whether introducing strict mode in the function context might break sloppy code contained in the IIFE.

  3. simonua commented on Oct 17, 2018

    @simonua
    Collaborator

    We currently don't have any tests for IIFE. IMHO, this would necessitate adding some coverage.

  4. dmellstrom commented on Oct 17, 2018

    @dmellstrom
    ContributorAuthor

    In theory, there won't be any sloppy or even non-static code contained in the IIFE, as it will just contain the template strings plus the surrounding Angular boilerplate added by this plugin.
    However, I concur that test coverage for IIFE is a good idea. I will add a relevant commit to my PR.

  5. simonua commented on Oct 24, 2018

    @simonua
    Collaborator

    @dmellstrom, thanks very much for adding the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions