react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

vite prebuild error

Open pittleCheung opened this issue 2 years ago • 4 comments

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 avatar Jan 31 '23 10:01 pittleCheung

this is vite prebuild error

pittleCheung avatar Jan 31 '23 10:01 pittleCheung

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

hal-shin avatar Feb 01 '23 02:02 hal-shin

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],
    },
  },
})

abemedia avatar Jan 26 '24 08:01 abemedia

bump this

SQReder avatar May 26 '24 12:05 SQReder