fix(chat): resolve CORS and build issues for local development

- Add webpack builder to nest-cli.json to fix tsc noEmit issue
- Add localhost:5178 to CORS whitelist in backend
- Fix auth token key in api.ts to match @manacore/shared-auth storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-11-28 20:51:14 +01:00
parent 79acf8b8b8
commit 1958cf2c01
3 changed files with 5 additions and 2 deletions

View file

@ -5,6 +5,7 @@
"compilerOptions": {
"deleteOutDir": true,
"assets": [],
"watchAssets": false
"watchAssets": false,
"webpack": true
}
}

View file

@ -10,6 +10,7 @@ async function bootstrap() {
origin: [
'http://localhost:3000',
'http://localhost:5173',
'http://localhost:5178', // Chat web app
'http://localhost:8081',
'exp://localhost:8081',
'http://localhost:3001', // Mana Core Auth

View file

@ -23,9 +23,10 @@ async function fetchApi<T>(
const { method = 'GET', body, token } = options;
// Get token from localStorage if not provided
// Token is stored by @manacore/shared-auth under '@auth/appToken'
let authToken = token;
if (!authToken && browser) {
authToken = localStorage.getItem('mana_token') || undefined;
authToken = localStorage.getItem('@auth/appToken') || undefined;
}
if (!authToken) {