Closed nhm1990 closed 2 months ago
Hi 👋 Please try what's explained here: https://github.com/Shopify/hydrogen/issues/2129#issuecomment-2119588510
Let me know if that doesn't work.
Hey @frandiox , this did the trick. I had to add some more stuff to the array until it worked. Thanks a lot!
export default defineConfig({
...
ssr: {
optimizeDeps: {
include: [
'@react-three/fiber',
'@react-three/drei',
'react',
'react-dom',
'react-dom/client',
'prop-types',
'react-dropzone',
'merge-value',
],
},
},
})
What is the location of your example repository?
https://github.com/nhm1990/hydrogen-quickstart
Which package or tool is having this issue?
hydrogen-react
What version of that package or tool are you using?
2024.4.2
What version of Remix are you using?
2.8.0
Steps to Reproduce
Expected Behavior
Sample .glb file is loaded in the canvas without errors and app works.
Actual Behavior
Error: "ReferenceError: module is not defined" appears
Could only reproduce it with hydrogen apps/remix since using Vite. With pure remix, react or nextJS app it's working fine.
Also with older versions it's not working.
Maybe related: https://github.com/facebook/react/issues/20327