-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Known Issue: F5 failed for Fluent UI Tab & Dashboard Tab #12801
Comments
Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned. |
@Yimin-Jin, thanks for sharing details about the issue and recommended solution. This will be beneficial to developers who are facing this issue. |
Describe the bug
When serving projects using the Vite dev server, if you follow these steps to create a tab template/sample:
you may encounter an error page in the browser console when pressing F5, with the following error:
Screenshots
Cause
The root cause of this issue is that some dependencies assume they are running in a Node.js environment and thus use the Node.js global variable global. However, in a browser environment, this variable is not defined, leading to the
global is not defined
error.Workaround
To resolve this issue, you can define the global variable in the
vite.config.js
file. This workaround ensures compatibility with libraries that rely on Node.js global variables when running in a browser environment.Here is an example of how to update the vite.config.js:
If you need more solutions, you can refer to the GitHub issue. This issue has been discussed in the Vite GitHub discussions: Uncaught ReferenceError: global is not defined when served from vite dev server
VS Code Extension Information
Upcoming Fix
We are actively working on a fix for this issue and plan to include it in an upcoming pre-release version, which will be available in the next couple of days.
The text was updated successfully, but these errors were encountered: