-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default to Running Studio Without Strict Mode (#426)
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 the `dev` 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 offers `import.meta.env` as a way for client-side modules to access env vars, but they must be prefixed with `VITE_`. This is why the env var is called `VITE_STUDIO_STRICT`. J=SLAP-2966 TEST=manual
- Loading branch information
Showing
4 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters