-
Notifications
You must be signed in to change notification settings - Fork 3
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
Default to Running Studio Without Strict Mode #426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we want to look into this approach to achieve similar behavior?
Talked with Tom, and I think that he wants to get Strict mode working for now, then look into this later. I think there's a lot to test with regards to that change, and I think we want to get some QA feedback addressed first. We'll keep the item around, though! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what's the reasoning behind not wanting strict mode in e2e-tests?
This PR adds a flag that will render Studio in React Strict Mode. Now, Studio runs without React Strict Mode by default, but can be specified to run in Strict Mode by adding
strict
as an argument to the empty--
flag (i.e.npx studio -- strict
). This was also added to thedev
command in the test site, but not the e2e-tests.Since we are trying to access an env variable to determine a conditional render in Studio client-side, we cannot access
process.env
directly. Vite offersimport.meta.env
as a way for client-side modules to access env vars, but they must be prefixed withVITE_
. This is why the env var is calledVITE_STUDIO_STRICT
.J=SLAP-2966
TEST=manual