Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Use "window" instead of "this"#24

Open
jonespen wants to merge 2 commits intofilamentgroup:masterfrom
jonespen:babel-window
Open

Use "window" instead of "this"#24
jonespen wants to merge 2 commits intofilamentgroup:masterfrom
jonespen:babel-window

Conversation

@jonespen
Copy link
Copy Markdown

@jonespen jonespen commented Jul 6, 2016

I'm trying to load snapper using webpack and babel-loader, but it seems that babel transpiles this to undefined (ref webpack/imports-loader#23, http://stackoverflow.com/questions/34973442/how-to-stop-babel-from-transpiling-this-to-undefined)

It seems like w always refers to the window object, so it should be safe to replace this with window.

Also added some npm script aliases for the grunt tasks

jonespen added 2 commits July 6, 2016 13:15
since babel transpiles “this” to “undefined”
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant