-
Notifications
You must be signed in to change notification settings - Fork 710
Closed
Copy link
Description
Reproduction link or steps
I use react-dropzone 14.3.8.
With npm:rolldown-vite@7.0.4 it worked correctly: the dropzone accepted files to upload.
After updating to npm:rolldown-vite@7.0.5, the dropzone throws an error when adding files to it:
TypeError: accepts is not a function
at fileAccepted (react-dropzone.js?v=d38f4292:1571:63)
at react-dropzone.js?v=d38f4292:2260:24
at Array.forEach (<anonymous>)
at react-dropzone.js?v=d38f4292:2259:9
at react-dropzone.js?v=d38f4292:2312:4
The function where the exception is thrown looks like this:
function fileAccepted(file, accept) {
var isAcceptable = file.type === "application/x-moz-file" || accepts(file, accept);
return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];
}
In the debugger, the accepts variable is different between both versions of rolldown-vite:
before the update of rolldown-vite:
after the update of rolldown-vite:
What is expected?
I don't know if it's a problem in rolldown-vite or in react-dropzone.
Anyways, it seems to be a breaking change with a bugfix release of rolldown-vite.
What is actually happening?
see exception above
System Info
System:
OS: macOS 15.5
CPU: (14) arm64 Apple M4 Pro
Memory: 1.13 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /usr/local/bin/node
npm: 11.0.0 - /usr/local/bin/npm
Browsers:
Chrome: 138.0.7204.93
Safari: 18.5Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels