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

update to autobind-decorator breaks react-dnd-html5-backend when minifying with uglify and babel #1152

Closed
calumbutler opened this issue Nov 5, 2018 · 5 comments
Labels
awaiting release This issue has been fixed, but is not released

Comments

@calumbutler
Copy link

Running a production build with create react app is broken due to the latest change to autobind-decorator (2.2.1) conflicting with react-dnd-html5-backend

babel 6
screen shot 2018-11-05 at 9 43 05 am

babel 7
screen shot 2018-11-05 at 9 47 50 am

@darthtrevino
Copy link
Member

Recent commits to this project remove the autobind-decorator and replace it with bound class-member semantics. I want to take a pass through the PRs and then I'll cut a release afterwards.

@darthtrevino darthtrevino added the awaiting release This issue has been fixed, but is not released label Nov 5, 2018
@noeffred
Copy link

noeffred commented Nov 6, 2018

Is there any workaround in the meantime?

@calumbutler
Copy link
Author

calumbutler commented Nov 6, 2018

  "dependencies": {
    "react": "^16.3.2",
    "react-dnd": "^5.0.0",
    "react-dnd-html5-backend": "4.0.6",
    "autobind-decorator": "2.1.0",
  },

if you install autobind-decorator pinned at 2.1.0 after you install react-dnd-html5-backen it should work.

Or alternatively just npm install autobind-decorator@2.1.0

@calumbutler
Copy link
Author

@darthtrevino thanks for the update!

@catamphetamine
Copy link

catamphetamine commented Nov 27, 2018

For those using yarn, the workaround is to go to yarn.lock and replace

autobind-decorator@^2.1.0:
  version "2.3.1"
  resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-2.3.1.tgz#d7ef8b752d6874ffe713f45431018a6565f9e8da"

with

autobind-decorator@^2.1.0:
  version "2.1.0"
  resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-2.1.0.tgz#4451240dbfeff46361c506575a63ed40f0e5bc68"

And then run yarn.

It will reset on every yarn upgrade/add/whatever console command so re-apply the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed, but is not released
Projects
None yet
Development

No branches or pull requests

4 participants