-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
fileTypeFromBlob is not exported from index.js #521
Comments
It's only available in the browser: Lines 16 to 17 in e4a809e
|
I tried to import it in my react app like 'import { fileTypeFromBlob } from 'file-type';' but it says: How should i import this in a react app? |
This is not really the place to ask for support about React or CRA. It sounds like either your build tool does not support export conditions or you have not configured your project correctly. |
For some unknown reasons that import condition worked in vite-react app
|
According to the docs for versions 17.x.x the fileTypeFromBlob should be exported from main module 'file-type' instead of 'file-type/browser', but looking at index.js and core.js 'fileTypeFromBlob' is not exported.
The text was updated successfully, but these errors were encountered: