-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
use : var accept = require('attr-accept'); accept() accept is not a function #29
Comments
I’m not sure what this is about. |
perhaps he is talking about the README ? as it shows its use in CommonJS instead of a babel/webpack import? |
Hmm 🤔 Do we need to update it? |
Is the module available via CommonJS? if so then it should be fine as is, but if not we should perhaps either fix the README or update the module so it is available via CommonJS |
Yes, https://github.com/okonet/attr-accept/blob/master/webpack.config.js#L6 |
Reproduction here: https://runkit.com/bsonntag/5c3362f019d6b0001713a107 Adding var accept = require('attr-accept').default;
accept({
name: 'my file.png',
type: 'image/png'
}, 'image/*') |
attr-accept crashes Vite.js production builds because of this When trying to upload and using react-dropzone with Vite (production build) I get if I change:
react-dropzone works as it should. |
use : var accept = require('attr-accept');
then: accept()
result: accept is not a function
solution: import accept from 'attr-accept' ????
The text was updated successfully, but these errors were encountered: