Replies: 7 comments 2 replies
-
SInce there was no response to this, and I needed to move on and couldn't find another solution. I switched to use But for some reason it works fine with react-date-range 🤷♂️ If anyone finds a solution to this in the future, please comment on here so I can revert to using antd. |
Beta Was this translation helpful? Give feedback.
-
Did anyone figure out a easy fix for something like this? |
Beta Was this translation helpful? Give feedback.
-
I am going through the same problem. Unfortunately there seem to be no solution apart from replacing the failing components. |
Beta Was this translation helpful? Give feedback.
-
you should change your import of antd from
source #3413 |
Beta Was this translation helpful? Give feedback.
-
I am also shucked in this problem. my dev mode is running well and has no error but when I create a build using yarn build command then my production gives me error and my whole application breaks 😢 |
Beta Was this translation helpful? Give feedback.
-
Same situation here! I get this error: |
Beta Was this translation helpful? Give feedback.
-
I am still encountering this issue, any solutions or workarounds from a build config perspective? I believe the issue is the format of some imports as @stillalivx mentioned above, but they are in a dependency that I do not control the source of, so modifying the code directly is not an option |
Beta Was this translation helpful? Give feedback.
-
I've just spent the last 2 days trying to migrate from CRA to vitejs, and in dev I have everything working great now.
However, when I tried to do my first deployment with it, I discovered that when it's bundled for production there's a site breaking error :(
The minified error is not very helpful and it leads to code I did not write.
My project is pretty large, +200 components and around 100 dependencies and I noticed the error only happened on a specific page, so I was able to narrow it down to the specific component that breaks everything in vite.
My DateRangePicker...
Some context; This code works perfectly fine in CRA, and vite dev environment. But (for me) it breaks when doing
vite build && vite preview
...So I thought I would just go create a minimal reproduction and post a bug issue. (I remember the creator stated that the goal is that if it works in dev, it should work in production for vite).
But to my dismay... I cannot reproduce it on stackblitz for the life of me. I tried everything I can think of but I cannot get it to fail on stackblitz the same way it does in my project (and it is not just my local machine, it fails with the same error when deployed on Vercel).
I don't know what else to do at this point.
I have tried to remove all the lazy loading as well. And that changed the error from "r" to "_" but it's still breaking in the same code:
Any ideas why this breaks in vite production, but not in CRA and not in Vite dev environment?
Beta Was this translation helpful? Give feedback.
All reactions