Jaaneek / useFilePicker

Simple react hook to open browser file selector.

Home Page:https://use-file-picker.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESM Dist files have different name than package.json

gustavorino opened this issue · comments

I'm using VITE bundler and I am getting import errors :

The module entry on package.json is :

{
"module": "dist/usefilepicker.esm.js",
}

however the build file is
Screen Shot 2021-05-07 at 08 35 41

For now, I'm importing directly from /dist/use-file-picker.esm.js which solves the issue, but It would be nice to fix it

I've investigated the issue and as You said, it seems like it just needs the module entry change. We'll fix this soon.

We've just released new version 1.1.2 which incorporates the solution to the issue mentioned above. Everything should be working correctly right now.