https://github.com/tf63/astro-playground
https://github.com/tf63/astro-playground
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tf63/astro-playground
- Owner: tf63
- Created: 2024-11-30T16:23:03.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T13:55:53.000Z (6 months ago)
- Last Synced: 2025-02-09T06:32:09.398Z (4 months ago)
- Language: Astro
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Playground
## 備忘録
### セットアップ
**プロジェクトの作成**
```shell
pnpm create astro@latest
```**インテグレーションの追加**
- https://docs.astro.build/ja/guides/integrations-guide/
```shell
pnpm astro add react
pnpm astro add tailwind
````astro.config.mjs`にインテグレーションが生える
```javascript
import react from '@astrojs/react'
import tailwind from '@astrojs/tailwind'
import { defineConfig } from 'astro/config'// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), react()],
})
```**path aliasの指定**
`tsconfig.json`でbaseUrlとpathsを指定する```
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
```### Vite
AstroはViteを使ってるっぽい
- https://docs.astro.build/ja/recipes/add-yaml-support/