-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
core-js 2 as dependency #1629
Comments
I'm experiencing the same issue using webpack with core-js 3 |
@Bielik20 would you mind sharing your babel settings? I'm trying to reproduce on a webpack 4 installation from scratch |
@carlosagsmendes I am using nrwl to manage my monorepo. It is default config from there. |
I'm not sure what the best approach for us should be. Any thoughts @TrySound @theKashey |
There are two moment - safety and the ease of use. In short:
|
Ideally, we are not pollyfilling anything. My understanding is that we are only using ponyfills |
From the code - no, you are not. At least it's not documented - https://github.com/atlassian/react-beautiful-dnd/search?q=runtime-corejs2&unscoped_q=runtime-corejs2 and the only expected polyfills are Number.isInteger and Object.values, which could be ponyfilled... but you can't import thst ponyfill from some specific core-js version(though |
core-js 3 polyfills required for RBDND for the IE11 target:
For
|
Users should provide own polyfills. Though the library may omit usage of a set of functions and implement their loose versions for specific need. I would prefer to drop core-js. rbd is the only lib in my app with core-js in dependencies. And one of a few last commonjs modules. |
Yep. "omit usage of a set of functions" is one of the reasons why I tend not to use |
@TrySound happy for a PR to make this happen! It was my understanding that we did not polyfill anything (only ponyfills). If we are polyfilling that is bad news. |
Ref atlassian#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Looks like this has already been resolved by @TrySound (Thanks)! Will close for now but please feel free to reopen if this is still an issue for you! |
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Ref atlassian/react-beautiful-dnd#1629 (comment) I forbid using es6+ methods I added eslint-plugin-es6. It does not forbid isInteger but I send PR nkt/eslint-plugin-es5#37.
Expected behavior
Polyfills should not be included in library, there should be an instruction what is expected to be included in actual app to support given browser.
Actual behavior
App expects core-js 2 as a dependency. That breaks apps based on core-js 3.
Steps to reproduce
If your react app polyfills look somewhat like that:
Then compilation will fail.
Suggested solution?
Remove polyfills from bundle.
What version of
React
are you using?16.10.2
What version of
react-beautiful-dnd
are you running?11.0.3
The text was updated successfully, but these errors were encountered: