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

Disable Babel modules transform for dependencies #455

Merged
merged 1 commit into from
Apr 13, 2018

Conversation

goto-bus-stop
Copy link
Member

This a 🐛 bug fix

The Babel modules transform turns top level this into undefined. This
causes issues with some libraries that expect this to refer to the
global object (or at least expect it to exist). See #423 for an example.

Because browserify looks for the package.json main key, which should
not contain ES modules code, it should be safe to just disable the
modules transform.

Checklist

  • tests pass
  • tests and/or benchmarks are included

Context

#423
And a different take on #422

Semver Changes

Patch

@goto-bus-stop goto-bus-stop mentioned this pull request Apr 11, 2018
3 tasks
The Babel modules transform turns top level `this` into undefined. This
causes issues with some libraries that expect `this` to refer to the
global object (or at least expect it to exist). See #423 for an example.

Because browserify looks for the package.json `main` key, which should
not contain ES modules code, it should be safe to just disable the
modules transform.
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

Successfully merging this pull request may close these issues.

1 participant