jacobworrel / react-windowed-select

An integration of react-window with react-select to efficiently render large lists.
MIT License
142 stars 38 forks source link

Failed to resolve entry for package "react-windowed-select" on version 5.1.1 #127

Open ruisheng95 opened 11 months ago

ruisheng95 commented 11 months ago

Hello, on react-windowed-select version 5.1.1 running with Vite, it will encounter an error of Failed to resolve entry for package "react-windowed-select". The package may have incorrect main/module/exports specified in its package.json.. It seems that the changes in #116 is referring a nonexistent file of dist/index.js

I tried replacing the module field inside package.json to dist/main.js and it seem to fix the error. Though I wasn't sure is this the right way of fixing it, as my knowledge on Javascript bundling is minimal.

Here is a demo of the error.

ak274 commented 9 months ago

not working with vite

Bliqui commented 8 months ago

Same thing with React Native web

lyaonov commented 8 months ago

this helped me make friends with vite and react-windowed-select

add this to vite.config.ts

export default defineConfig({
    ....
    resolve: {
        alias: {
            'react-windowed-select': 'react-windowed-select/dist/main.js',
        },
    },
    ...
    }