-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
react-dropzone enable importing as es6 module #17904
Conversation
types/react-dropzone/index.d.ts to authors (@matdube @LynxEyes @goblindegook @benbayard). Could you review this PR? Checklist
|
Unfortunately |
@benbayard importing the module using If you try to compile the require syntax to ES6 modules, typescript throws this error: Using |
I'll wait for the DT team to comment here, but there is #17718 which is similar to this PR. If this is blocking you I believe v0.0.32 used an ES6 compatible export. |
Fair enough but I would just point out that this makes it impossible to use commonjs modules and compile to to es2015 which is necessary to take advantage of webpack tree-shaking or use Rollup. I will now have to pin these typings to 0.0.32 (which does support |
@frankwallis does |
@benbayard that enables using |
I don't understand in what scenario you would want to use |
The scenario is:
I can see a couple of solutions to this:
|
Please fill in this template.
npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If changing an existing definition:
tslint.json
containing{ "extends": "dtslint/dt.json" }
.