File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
packages/plugin-rsc/examples/basic Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,13 @@ import assert from 'node:assert'
22import rsc , { transformHoistInlineDirective } from '@vitejs/plugin-rsc'
33import tailwindcss from '@tailwindcss/vite'
44import react from '@vitejs/plugin-react'
5- import { type Plugin , defineConfig , normalizePath , parseAstAsync } from 'vite'
5+ import {
6+ type Plugin ,
7+ createRunnableDevEnvironment ,
8+ defineConfig ,
9+ normalizePath ,
10+ parseAstAsync ,
11+ } from 'vite'
612import inspect from 'vite-plugin-inspect'
713import path from 'node:path'
814
@@ -157,6 +163,30 @@ export default { fetch: handler };
157163 '@vitejs/test-dep-server-in-client/client' ,
158164 ] ,
159165 } ,
166+ environments : {
167+ ssr : {
168+ dev : {
169+ createEnvironment ( name , config ) {
170+ return createRunnableDevEnvironment ( name , config , {
171+ runnerOptions : {
172+ hmr : false ,
173+ } ,
174+ } )
175+ } ,
176+ } ,
177+ } ,
178+ rsc : {
179+ dev : {
180+ createEnvironment ( name , config ) {
181+ return createRunnableDevEnvironment ( name , config , {
182+ runnerOptions : {
183+ hmr : false ,
184+ } ,
185+ } )
186+ } ,
187+ } ,
188+ } ,
189+ } ,
160190} ) as any
161191
162192function vitePluginUseCache ( ) : Plugin [ ] {
You can’t perform that action at this time.
0 commit comments