Skip to content

1.3.0 can not be wrapped in an IIFE #705

@craigteegarden

Description

@craigteegarden

This is the same issue as #539.

If the library is wrapped in an IIFE, such as when using grunt-neuter, the global verison of Handlebars won't actually be global.

var Handlebars = (function() {
//...
})();

The code from the PR#534 worked, but it must not have made it into the current version.

(function(undefined) {
  var Handlebars = {};

  //...

  } else {
    // other, i.e. browser
    this.Handlebars = Handlebars;
  }
).call(this);

I dug into it a little bit and it seems that the change would probably be in es6-module-packager (https://github.com/kpdecker/es6-module-packager/blob/master/tasks/packager.js#L15).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions