Skip to content

Commit d7bfa8d

Browse files
committed
Add new env var
1 parent 55b3a41 commit d7bfa8d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

develop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ cd "${PROJECT_ROOT}"
1313
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script
1414
(
1515
trap 'kill 0' SIGINT
16-
CODERV2_HOST=http://127.0.0.1:3000 yarn --cwd=./site dev &
16+
CODERV2_HOST=http://127.0.0.1:3000 INSPECT_XSTATE=true yarn --cwd=./site dev &
1717
go run cmd/coder/main.go start --dev --tunnel=false
1818
)

site/src/Main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { inspect } from "@xstate/inspect";
44
import { Interpreter } from "xstate"
55
import { App } from "./app"
66

7-
// if this is a development build
8-
if (process.env.NODE_ENV === "development") {
7+
// if this is a development build and the developer wants to inspect
8+
if (process.env.NODE_ENV === "development" && process.env.INSPECT_XSTATE === "true") {
99
// configure the XState inspector to open in a new tab
1010
inspect({
1111
url: "https://stately.ai/viz?inspect",

0 commit comments

Comments
 (0)