File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,45 @@ export const renderer = reactRenderer(({ children }) => {
77
77
})
78
78
```
79
79
80
+ ## Guides
81
+
82
+ ### Change the client entry point
83
+
84
+ If you want to change the path of the client entry point, add a ` src ` attribute to the ` Script ` component and set the path.
85
+
86
+ ``` tsx
87
+ // src/client/main.tsx
88
+ import { Script , Link } from ' hono-vite-react-stack/components'
89
+
90
+ export const renderer = reactRenderer (({ children }) => {
91
+ return (
92
+ <html >
93
+ <head >
94
+ { /** Add src attribute to Script component */ }
95
+ <Script src = ' /src/client/main.tsx' />
96
+ </head >
97
+ <body >{ children } </body >
98
+ </html >
99
+ )
100
+ })
101
+ ```
102
+
103
+ For the build, you can specify it in the ` vite.config.ts ` .
104
+
105
+ ``` ts
106
+ // vite.config.ts
107
+ import reactStack from ' hono-vite-react-stack'
108
+ import { defineConfig } from ' vite'
109
+
110
+ export default defineConfig ({
111
+ plugins: [
112
+ reactStack ({
113
+ clientEntry: ' ./src/client/main.tsx' ,
114
+ }),
115
+ ],
116
+ })
117
+ ```
118
+
80
119
## Example Project
81
120
82
121
Directory structure:
You can’t perform that action at this time.
0 commit comments