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

Lodash always exported to window._ in lodash@^4 #2251

Closed
nowells opened this issue Apr 14, 2016 · 1 comment
Closed

Lodash always exported to window._ in lodash@^4 #2251

nowells opened this issue Apr 14, 2016 · 1 comment

Comments

@nowells
Copy link

nowells commented Apr 14, 2016

It appears that lodash@^4 added the (freeWindow || freeSelf || {})._ = lodash; line to address some AMD issues. However, this seems to have the side effect of always exporting lodash to window._ in our webpack builds. Was this intended? Is there a way to better restrict this fix for the AMD issue by checking for typeof window.define or something?

It appears this was added in 7862ae6

Thanks for your excellent work on lodash, it is as always a wonderful library.

@jdalton jdalton closed this as completed Apr 14, 2016
@jdalton jdalton removed the invalid label Apr 14, 2016
@lodash lodash locked and limited conversation to collaborators Jun 3, 2016
@lodash lodash unlocked this conversation Oct 13, 2016
@jdalton
Copy link
Member

jdalton commented Mar 12, 2017

It turns out this issue is due to a Webpack transform that's catered to end users and not libraries, like Lodash, that have AMD support. For the time being, Webpack recommends opting-out of their AMD parsing if you're running into issues.

@lodash lodash locked and limited conversation to collaborators Mar 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants