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:
parent
eda6d6f455
commit
d18599458c
9 changed files with 14 additions and 240 deletions
|
@ -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',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue