You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of TypeScript are you using (if any)?
What browser are you using?
Chrome
Describe the Bug
Hey guys. I have a problem building my project with Vite.js + rsuite.
This is the error that appears and causes the build to fail:
I checked on the internet that the line of code:
define: { global: 'window' }
If I remove this line of code, the build works perfectly. However, I have my doubts as to whether this is a good practice and whether there would be any problem deleting it in the future.
However, I verified that the vite.js template in the repository does not have this line by default:
So, I would like to understand if this problem is directly related to define, or if there is something missing for the build to work without changing vite.config.js.
thanks
Expected Behavior
No response
To Reproduce
No response
The text was updated successfully, but these errors were encountered:
Hi @patrickbrito95. rsuite depends on @juggle/resize-observer. If define: { global: 'window' } is configured in vite.config.js, it will probably affect the global defined in @juggle/resize-observer, resulting in compilation failure.
I did not reproduce this problem when using the latest version of Vite. What is the version of Vite you are currently using?
What version of rsuite are you using?
5.49.0
What version of React are you using?
18.2.0
What version of TypeScript are you using (if any)?
What browser are you using?
Chrome
Describe the Bug
Hey guys. I have a problem building my project with Vite.js + rsuite.
This is the error that appears and causes the build to fail:
I checked on the internet that the line of code:
define: { global: 'window' }
If I remove this line of code, the build works perfectly. However, I have my doubts as to whether this is a good practice and whether there would be any problem deleting it in the future.
However, I verified that the vite.js template in the repository does not have this line by default:
So, I would like to understand if this problem is directly related to define, or if there is something missing for the build to work without changing vite.config.js.
thanks
Expected Behavior
No response
To Reproduce
No response
The text was updated successfully, but these errors were encountered: