revert(dev): フロントエンド・バックエンドを分離する開発モードを廃止 (#15284)
* Revert "chore: 開発モードでフロントエンドとバックエンドを独立して起動するようにする(再) (#12593)" This reverts commitb0039f0946
. * revert dev command * revert embed dev * 消しすぎた * filesをプロキシするように * fix chromatic ci * Revert "filesをプロキシするように" This reverts commit41be2548ce
. * fix: configのhostnameでサーバーを起動するように * fix * lint * Update Changelog * fix --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -317,16 +317,19 @@ 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',
|
||||
});
|
||||
|
||||
const embedPort = (process.env.EMBED_VITE_PORT ?? '5174');
|
||||
fastify.register(fastifyProxy, {
|
||||
upstream: 'http://localhost:' + embedPort,
|
||||
upstream: urlOriginWithoutPort + ':' + embedPort,
|
||||
prefix: '/embed_vite',
|
||||
rewritePrefix: '/embed_vite',
|
||||
});
|
||||
|
Reference in New Issue
Block a user