File tree Expand file tree Collapse file tree 8 files changed +667
-35
lines changed
src/content/docs/examples Expand file tree Collapse file tree 8 files changed +667
-35
lines changed Original file line number Diff line number Diff line change 22import { defineConfig } from 'astro/config' ;
33import starlight from '@astrojs/starlight' ;
44import tailwindcss from '@tailwindcss/vite' ;
5+ import path from 'path' ;
6+
7+ import cloudflare from '@astrojs/cloudflare' ;
58
69// https://astro.build/config
710export default defineConfig ( {
@@ -30,7 +33,15 @@ export default defineConfig({
3033 ] ,
3134 } ) ,
3235 ] ,
36+
3337 vite : {
3438 plugins : [ tailwindcss ( ) ] ,
39+ resolve : {
40+ alias : {
41+ '@example' : path . resolve ( '../example' ) ,
42+ } ,
43+ } ,
3544 } ,
45+
46+ adapter : cloudflare ( ) ,
3647} ) ;
Original file line number Diff line number Diff line change 1010 "astro" : " astro"
1111 },
1212 "dependencies" : {
13+ "@astrojs/cloudflare" : " ^12.6.0" ,
1314 "@astrojs/starlight" : " ^0.34.4" ,
1415 "@astrojs/starlight-tailwind" : " ^4.0.1" ,
1516 "@fontsource/ibm-plex-serif" : " ^5.2.6" ,
Original file line number Diff line number Diff line change 77---
88
99import { Code } from ' @astrojs/starlight/components' ;
10- import appleCodeStyle from ' ../ example/src/examples/apple.tsx?raw' ;
10+ import appleCodeStyle from ' @ example/src/examples/apple.tsx?raw' ;
1111
12- import appleCodeNativeWind from ' ../ example/src/examples/apple-nativewind.tsx?raw' ;
12+ import appleCodeNativeWind from ' @ example/src/examples/apple-nativewind.tsx?raw' ;
1313
1414## Using Nativewind
1515
Original file line number Diff line number Diff line change 77---
88
99import { Code } from ' @astrojs/starlight/components' ;
10- import dashedCodeStyle from ' ../ example/src/examples/dashed.tsx?raw' ;
10+ import dashedCodeStyle from ' @ example/src/examples/dashed.tsx?raw' ;
1111
12- import dashedCodeNativeWind from ' ../ example/src/examples/dashed-nativewind.tsx?raw' ;
12+ import dashedCodeNativeWind from ' @ example/src/examples/dashed-nativewind.tsx?raw' ;
1313
1414## Using Nativewind
1515
Original file line number Diff line number Diff line change 77---
88
99import { Code } from ' @astrojs/starlight/components' ;
10- import revoltCodeStyle from ' ../ example/src/examples/revolt.tsx?raw' ;
10+ import revoltCodeStyle from ' @ example/src/examples/revolt.tsx?raw' ;
1111
12- import revoltCodeNativeWind from ' ../ example/src/examples/revolt-nativewind.tsx?raw' ;
12+ import revoltCodeNativeWind from ' @ example/src/examples/revolt-nativewind.tsx?raw' ;
1313
1414## Using Nativewind
1515
Original file line number Diff line number Diff line change 77---
88
99import { Code } from ' @astrojs/starlight/components' ;
10- import stripCodeStyle from ' ../ example/src/examples/stripe.tsx?raw' ;
10+ import stripCodeStyle from ' @ example/src/examples/stripe.tsx?raw' ;
1111
12- import stripCodeNativeWind from ' ../ example/src/examples/stripe-nativewind.tsx?raw' ;
12+ import stripCodeNativeWind from ' @ example/src/examples/stripe-nativewind.tsx?raw' ;
1313
1414## Using Nativewind
1515
Original file line number Diff line number Diff line change 11{
22 "extends" : " astro/tsconfigs/strict" ,
33 "include" : [" .astro/types.d.ts" , " **/*" ],
4- "exclude" : [" dist" ]
4+ "exclude" : [" dist" ],
5+ "compilerOptions" : {
6+ "paths" : {
7+ "@example/*" : [" ../example/*" ]
8+ }
9+ }
510}
You can’t perform that action at this time.
0 commit comments