bvaughn / react-virtualized

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

vite prebuild error #1799

Open pittleCheung opened 1 year ago

pittleCheung commented 1 year ago

Bug Report

Please include either a failing unit test or a simple repro. You can start by forking this Code Sandbox: https://codesandbox.io/s/03qpzq1p9p?module=%2FExample.js

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React and react-virtualized. Paste the link to your Code Sandbox below:

What is the expected behavior?

Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?

Browser
OS
React
React DOM
react-virtualized
image
pittleCheung commented 1 year ago

this is vite prebuild error

hal-shin commented 1 year ago

Looks like a duplicate of https://github.com/bvaughn/react-virtualized/issues/1632

abemedia commented 5 months ago

I wrote an esbuild plugin to fix this which can also be used for vite: https://npmjs.com/package/esbuild-plugin-react-virtualized


// vite.config.js
import { defineConfig } from 'vite'
import fixReactVirtualized from 'esbuild-plugin-react-virtualized'

export default defineConfig({
  optimizeDeps: {
    esbuildOptions: {
      plugins: [fixReactVirtualized],
    },
  },
})
SQReder commented 1 month ago

bump this