Luma errors when using Vite: Super expression must either be null or a function
Issue
I'm migrating from CRA to Vite for my UI builds, however, when I try to run the project I get the following error:
inherits.js:4 Uncaught TypeError: Super expression must either be null or a function
which traces back to:

if I look at the code throwing the error:

It shows that superClass is null which is referring to the Resource class.
If you do some quick research, it seems like its related to the class extends with static props: https://stackoverflow.com/questions/30116430/reactjs-giving-error-uncaught-typeerror-super-expression-must-either-be-null-or
Versions
"@msrvida/sanddance-react": "3.0.1",
"@deck.gl/core": "8.3.7",
"@deck.gl/layers": "8.3.7",
"@luma.gl/core": "8.3.1",
"vite": "^3.0.8",
On the master branch all examples in the luma.gl examples folder use vite and this has not come up. It could of course be specific to the v8 release branch. An isolated repro case might be useful.
There could have been some circular referencing that was fixed between 8.3 and 8.5.
My suggestion is to upgrade deck/luma to the latest releases. There are plenty of users using vite/esbuild right now.
Sadly I'm locked due to Sanddance. I was able to work around this by forcing it to use the ES5 version in Vite:
resolve: {
alias: {
'@luma.gl/core': '@luma.gl/core/dist/es5/index.js',
@danmarshall