fix: Fix frontend build when using VSCode debugger (#29672)

This commit is contained in:
Rafael Audibert
2025-03-10 16:33:35 -03:00
committed by GitHub
parent 54f549247c
commit 9387caea9a
3 changed files with 29 additions and 26 deletions

48
.vscode/launch.json vendored
View File

@@ -6,7 +6,7 @@
"configurations": [
{
"name": "Frontend",
"command": "bin/turbo --filter=@posthog/frontend start",
"command": "bin/start-frontend",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}",
@@ -17,21 +17,24 @@
},
{
"name": "Frontend (no typegen)",
"command": "pnpm start-http",
"command": "bin/start-frontend",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}/frontend",
"cwd": "${workspaceFolder}",
"presentation": {
"group": "main"
},
"skipFiles": ["${workspaceFolder}/node_modules/kea-typegen/**/*.js"]
"skipFiles": ["${workspaceFolder}/node_modules/kea-typegen/**/*.js"],
"env": {
"SKIP_TYPEGEN": "1"
}
},
{
"name": "Frontend (https)",
"command": "bin/turbo --filter=@posthog/frontend start",
"command": "bin/start-frontend",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}/frontend",
"cwd": "${workspaceFolder}",
"presentation": {
"group": "main"
},
@@ -276,7 +279,6 @@
],
"stopAll": true,
"presentation": {
"order": 1,
"group": "compound"
}
},
@@ -292,7 +294,21 @@
],
"stopAll": true,
"presentation": {
"order": 1,
"group": "compound"
}
},
{
"name": "PostHog (https)",
"configurations": [
"Backend",
"Celery Threaded Pool",
"Celery Beat",
"Frontend (https)",
"Plugin Server",
"Temporal Worker"
],
"stopAll": true,
"presentation": {
"group": "compound"
}
},
@@ -307,22 +323,6 @@
],
"stopAll": true,
"presentation": {
"order": 2,
"group": "compound"
}
},
{
"name": "PostHog (https)",
"configurations": [
"Backend",
"Celery Threaded Pool",
"Frontend (https)",
"Plugin Server",
"Temporal Worker"
],
"stopAll": true,
"presentation": {
"order": 2,
"group": "compound"
}
}

View File

@@ -23,7 +23,9 @@
"build:esbuild": "DEBUG=0 node ./build.mjs",
"build:tailwind": "pnpm --filter=@posthog/tailwind build",
"watch:tailwind": "pnpm --filter=@posthog/tailwind start",
"start": "concurrently -n ESBUILD,TYPEGEN,TAILWIND -c yellow,green,blue \"pnpm start-http\" \"pnpm run typegen:watch\" \"pnpm watch:tailwind\"",
"start": "if [ -n \"$SKIP_TYPEGEN\" ]; then pnpm start-no-typegen; else pnpm start-all; fi",
"start-all": "concurrently -n ESBUILD,TYPEGEN,TAILWIND -c yellow,green,blue \"pnpm start-http\" \"${SKIP_TYPEGEN:-pnpm run typegen:watch}\" \"pnpm watch:tailwind\"",
"start-no-typegen": "concurrently -n ESBUILD,TAILWIND -c yellow,green,blue \"pnpm start-http\" \"pnpm watch:tailwind\"",
"start-http": "pnpm clean && pnpm copy-scripts && pnpm build:esbuild --dev",
"start-docker": "pnpm start-http --host 0.0.0.0",
"typegen:write": "cd .. && kea-typegen write --delete --show-ts-errors",

View File

@@ -21,7 +21,8 @@
"start": {
"dependsOn": ["^build"],
"persistent": true,
"cache": false
"cache": false,
"passThroughEnv": ["SKIP_TYPEGEN"]
},
"dev": {
"dependsOn": ["^build"],