AtCoderNoviSteps
AtCoderNoviSteps copied to clipboard
ローカルサーバを起動したときにブラウザでUIが表示されるようにしましょう
Summary / 概要
- CONTRIBUTING.mdの手順に従ってローカル環境で開発用サーバを立ち上げても、ブラウザに表示されない
Steps to reproduce / 再現方法
- xxx
- yyy
- zzz
environments
-
Desktop (please complete the following information):
OS: Mac Browser Chrome Version 124.0.6367.208
Expected behavior / 期待される挙動
- ブラウザにログイン画面が表示される
Actual behavior / 実際の挙動
- ブラウザがローディングの状態のまま、何も表示されない
Screenshots
- If applicable, add screenshots to help explain your problem.
Other notes / その他
- Add any other context about the problem here.
- Will you try to create a pull request?
- yes / no
暫定的に以下の方法で表示されるようになりました。
staging環境、production環境で切り替える方法を調べる必要があります。
// vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
// 以下のseverに関する設定を追加
server: {
host: '0.0.0.0',
port: 5174,
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
environment: 'jsdom',
globals: true,
},
});
https://zenn.dev/onozaty/articles/docker-desktop-portforward-not-working
https://x.com/i/bookmarks?post_id=1844542324589855151
https://x.com/d151005/status/1844542324589855151/photo/1