bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.43k stars 3.06k forks source link

unused import bpfrpt_proptype_WindowScroller causing issue in Vite #1849

Open reuben-gomesBP opened 1 month ago

reuben-gomesBP commented 1 month ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-virtualized@9.22.5 for the project I'm working on.

on vite this unused import seems to be throwing a build issue

Here is the diff that solved my problem:

diff --git a/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js b/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
index d00f0f1..c8496e8 100644
--- a/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
+++ b/node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
@@ -71,4 +71,3 @@ export function unregisterScrollListener(component, element) {
     }
   }
 }
\ No newline at end of file
-import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";
\ No newline at end of file

This issue body was partially generated by patch-package.

lxlyjss commented 1 month ago

Me too!

ysmood commented 3 weeks ago

Does older version of react-virtualized not having this issue?

reuben-gomesBP commented 3 weeks ago

i haven't been able to try with an older version

the issue mainly showed up when migrated to ViteJS

rehangit commented 3 weeks ago
  1. How come we are seeing the 9.22.5 in dependencies when it does not even exist? The latest version shown 9.22.4
  2. Can someone explain what this commit achieved? Because it seems to be the root cause of this error