- Added React integration to the Astro configuration.
- Included Tailwind CSS as a Vite plugin. - Updated package.json to include dependencies for React, React DOM, and Tailwind CSS. - Adjusted TypeScript configuration to support JSX with React.
This commit is contained in:
parent
cf34ada8fb
commit
62855f4006
@ -6,10 +6,15 @@ import { defineConfig } from 'astro/config';
|
|||||||
|
|
||||||
import cloudflare from '@astrojs/cloudflare';
|
import cloudflare from '@astrojs/cloudflare';
|
||||||
|
|
||||||
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
|
|
||||||
|
import react from '@astrojs/react';
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://example.com',
|
site: 'https://example.com',
|
||||||
integrations: [mdx(), sitemap()],
|
integrations: [mdx(), sitemap(), react()],
|
||||||
|
|
||||||
adapter: cloudflare({
|
adapter: cloudflare({
|
||||||
platformProxy: {
|
platformProxy: {
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -17,4 +22,8 @@ export default defineConfig({
|
|||||||
|
|
||||||
imageService: "cloudflare"
|
imageService: "cloudflare"
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
vite: {
|
||||||
|
plugins: [tailwindcss()],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
@ -13,10 +13,17 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/cloudflare": "^12.6.12",
|
"@astrojs/cloudflare": "^12.6.12",
|
||||||
"@astrojs/mdx": "^4.3.12",
|
"@astrojs/mdx": "^4.3.12",
|
||||||
|
"@astrojs/react": "^4.4.2",
|
||||||
"@astrojs/rss": "^4.0.14",
|
"@astrojs/rss": "^4.0.14",
|
||||||
"@astrojs/sitemap": "^3.6.0",
|
"@astrojs/sitemap": "^3.6.0",
|
||||||
|
"@tailwindcss/vite": "^4.1.17",
|
||||||
|
"@types/react": "^19.2.7",
|
||||||
|
"@types/react-dom": "^19.2.3",
|
||||||
"astro": "^5.16.4",
|
"astro": "^5.16.4",
|
||||||
"sharp": "^0.34.3"
|
"react": "^19.2.1",
|
||||||
|
"react-dom": "^19.2.1",
|
||||||
|
"sharp": "^0.34.3",
|
||||||
|
"tailwindcss": "^4.1.17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^24.10.1",
|
"@types/node": "^24.10.1",
|
||||||
|
|||||||
784
pnpm-lock.yaml
generated
784
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,19 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"include": [".astro/types.d.ts", "**/*"],
|
"include": [
|
||||||
"exclude": ["dist"],
|
".astro/types.d.ts",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"types": [
|
"types": [
|
||||||
"./worker-configuration.d.ts",
|
"./worker-configuration.d.ts",
|
||||||
"node"
|
"node"
|
||||||
]
|
],
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"jsxImportSource": "react"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user