Skip to content

Commit 4bd38aa

Browse files
coreymartinLightspark Eng
authored andcommitted
[site] Fix preview login redirects (#28555)
## Summary - Normalize post-login redirect targets against the active Vite/router basename. - Prevent UI preview links from redirecting to duplicated paths like `/preview/pr-28544/preview/pr-28544/`. - Preserve the existing full-page redirect behavior for `/ops` paths, including preview ops paths. ## Testing - `yarn workspace @lightsparkdev/site exec vitest run src/hooks/loginRedirect.test.ts` - `yarn workspace @lightsparkdev/site exec eslint src/hooks/useLoginAndRedirect.tsx src/hooks/loginRedirect.ts src/hooks/loginRedirect.test.ts` - `yarn workspace @lightsparkdev/site exec prettier --check src/hooks/useLoginAndRedirect.tsx src/hooks/loginRedirect.ts src/hooks/loginRedirect.test.ts` ## Notes - Full `@lightsparkdev/site` typecheck is blocked locally by existing unresolved workspace package exports such as `@lightsparkdev/ui/router`. GitOrigin-RevId: d0319351285faf26145bf5d920525218a47fbcad
1 parent 779ce90 commit 4bd38aa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
"./src/router": "./src/router.js"
8484
},
8585
"scripts": {
86-
"build:bundle": "tsdown",
86+
"build:bundle": "tsdown --config-loader unrun",
8787
"build": "yarn tsc && yarn build:bundle",
88-
"build:watch": "tsdown --watch --no-clean",
88+
"build:watch": "tsdown --config-loader unrun --watch --no-clean",
8989
"circular-deps": "madge --circular --extensions ts,tsx .",
9090
"clean": "rm -rf .turbo",
9191
"format:fix": "prettier . --write",

0 commit comments

Comments
 (0)