revert(dev): フロントエンド・バックエンドを分離する開発モードを廃止

(cherry picked from commit 35104d87d5174a080143d3604e50bbef974ab04e)

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
あわわわとーにゅ 2025-01-26 06:47:36 +09:00
parent eda6d6f455
commit d18599458c
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
9 changed files with 14 additions and 240 deletions

View file

@ -303,9 +303,12 @@ export class ClientServerService {
done();
});
} else {
const configUrl = new URL(this.config.url);
const urlOriginWithoutPort = configUrl.origin.replace(/:\d+$/, '');
const port = (process.env.VITE_PORT ?? '5173');
fastify.register(fastifyProxy, {
upstream: 'http://localhost:' + port,
upstream: urlOriginWithoutPort + ':' + port,
prefix: '/vite',
rewritePrefix: '/vite',
});