Skip to content

Commit 425e093

Browse files
authored
chore(repo): allow PORT and UI_PORT overrides for sandbox dev servers (#8673)
1 parent 0796911 commit 425e093

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/clerk-js/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ const devConfig = ({ mode, env }) => {
434434
template: './sandbox/template.html',
435435
inject: false,
436436
templateParameters: {
437-
uiScriptUrl: 'http://localhost:4011/npm/ui.browser.js',
437+
uiScriptUrl: `http://localhost:${process.env.UI_PORT || 4011}/npm/ui.browser.js`,
438438
},
439439
}),
440440
].filter(Boolean),

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"dev": "rspack serve --config rspack.config.js",
8383
"dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4011}",
8484
"dev:sandbox": "pnpm -w dev:sandbox",
85-
"dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011",
85+
"dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${UI_PORT:-4011}",
8686
"format": "node ../../scripts/format-package.mjs",
8787
"format:check": "node ../../scripts/format-package.mjs --check",
8888
"lint:attw": "attw --pack . --exclude-entrypoints themes/shadcn.css --profile esm-only",

turbo.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"GITHUB_TOKEN",
3737
"ACTIONS_RUNNER_DEBUG",
3838
"ACTIONS_STEP_DEBUG",
39-
"VERCEL_AUTOMATION_BYPASS_SECRET"
39+
"VERCEL_AUTOMATION_BYPASS_SECRET",
40+
"PORT",
41+
"UI_PORT"
4042
],
4143
"tasks": {
4244
"build": {

0 commit comments

Comments
 (0)