@@ -143,6 +143,66 @@ test.describe(() => {
143
143
} )
144
144
} )
145
145
146
+ test . describe ( ( ) => {
147
+ const root = 'examples/e2e/temp/module-runner-hmr-false'
148
+
149
+ test . beforeAll ( async ( ) => {
150
+ await setupInlineFixture ( {
151
+ src : 'examples/starter' ,
152
+ dest : root ,
153
+ files : {
154
+ 'vite.config.ts' : /* js */ `
155
+ import rsc from '@vitejs/plugin-rsc'
156
+ import react from '@vitejs/plugin-react'
157
+ import { defineConfig, createRunnableDevEnvironment } from 'vite'
158
+
159
+ export default defineConfig({
160
+ plugins: [
161
+ react(),
162
+ rsc({
163
+ entries: {
164
+ client: './src/framework/entry.browser.tsx',
165
+ ssr: './src/framework/entry.ssr.tsx',
166
+ rsc: './src/framework/entry.rsc.tsx',
167
+ }
168
+ }),
169
+ ],
170
+ environments: {
171
+ ssr: {
172
+ dev: {
173
+ createEnvironment(name, config) {
174
+ return createRunnableDevEnvironment(name, config, {
175
+ runnerOptions: {
176
+ hmr: false,
177
+ },
178
+ })
179
+ },
180
+ },
181
+ },
182
+ rsc: {
183
+ dev: {
184
+ createEnvironment(name, config) {
185
+ return createRunnableDevEnvironment(name, config, {
186
+ runnerOptions: {
187
+ hmr: false,
188
+ },
189
+ })
190
+ },
191
+ },
192
+ },
193
+ },
194
+ })
195
+ ` ,
196
+ } ,
197
+ } )
198
+ } )
199
+
200
+ test . describe ( 'dev-module-runner-hmr-false' , ( ) => {
201
+ const f = useFixture ( { root, mode : 'dev' } )
202
+ defineTest ( f )
203
+ } )
204
+ } )
205
+
146
206
function defineTest ( f : Fixture , variant ?: 'no-ssr' ) {
147
207
const waitForHydration : typeof waitForHydration_ = ( page ) =>
148
208
waitForHydration_ ( page , variant === 'no-ssr' ? '#root' : 'body' )
0 commit comments