https://github.com/tf63/vercel-exp
https://github.com/tf63/vercel-exp
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tf63/vercel-exp
- Owner: tf63
- Created: 2023-06-28T08:36:03.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-29T02:06:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-27T05:39:24.384Z (5 months ago)
- Language: CSS
- Homepage: https://vercel-test-tf63.vercel.app
- Size: 231 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### vercel のテスト用リポジトリ
**プロジェクトの作成**
- docker-compose の次の部分をコメントアウト
```
command: sh -c "npm install & npm run dev"
```- コンテナの立ち上げ
```
docker compose up -d
```- React (TypeScript)プロジェクトの作成
```
docker compose exec react npm create vite@latest
```- vite.config.ts ファイルの編集
```
export default defineConfig({
plugins: [react()],
server: {
host: true,
},
});
```- コメントアウト部分を戻してコンテナを立ち上げ直す
```
docker compose down
docker compose up -d
```- http://localhost:5173 にアクセスし,Vite の初期ページが表示されることを確認

### CDのテスト
- masterの変更は即反映される
- devの変更はmasterにマージしないと反映されない (masterをデプロイしている)
- react-routerが上手く機能していない

- app/に`vercel.json`を追加したらうまくいった
```
{
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
}
```