Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get lodash to reference global._ in UMD? #154

Open
lukescott opened this issue Apr 22, 2015 · 0 comments
Open

How do I get lodash to reference global._ in UMD? #154

lukescott opened this issue Apr 22, 2015 · 0 comments

Comments

@lukescott
Copy link

When using the bundler I get this:

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('lodash')) :
  typeof define === 'function' && define.amd ? define(['lodash'], factory) :
  global.app = factory(global.lodash)
}(this, function (lodash) { 'use strict';

But on the "try it now" (single file) I get this:

(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('lodash')) :
    typeof define === 'function' && define.amd ? define(['lodash'], factory) :
    factory(global._)
}(this, function (_) { 'use strict';

global.lodash doesn't exist. Is there any way to tell it to use global._ instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant