@@ -175,7 +175,7 @@ export async function* serveWithVite(
175
175
// If server is active, send an error notification
176
176
if ( result . errors ?. length && server ) {
177
177
hadError = true ;
178
- server . ws . send ( {
178
+ server . hot . send ( {
179
179
type : 'error' ,
180
180
err : {
181
181
message : result . errors [ 0 ] . text ,
@@ -188,7 +188,7 @@ export async function* serveWithVite(
188
188
} else if ( hadError && server ) {
189
189
hadError = false ;
190
190
// Send an empty update to clear the error overlay
191
- server . ws . send ( {
191
+ server . hot . send ( {
192
192
'type' : 'update' ,
193
193
updates : [ ] ,
194
194
} ) ;
@@ -249,9 +249,6 @@ export async function* serveWithVite(
249
249
const projectRoot = join ( context . workspaceRoot , root as string ) ;
250
250
const browsers = getSupportedBrowsers ( projectRoot , context . logger ) ;
251
251
const target = transformSupportedBrowsersToTargets ( browsers ) ;
252
- const polyfills = Array . isArray ( ( browserOptions . polyfills ??= [ ] ) )
253
- ? browserOptions . polyfills
254
- : [ browserOptions . polyfills ] ;
255
252
256
253
// Setup server and start listening
257
254
const serverConfiguration = await setupServer (
@@ -263,7 +260,7 @@ export async function* serveWithVite(
263
260
! ! browserOptions . ssr ,
264
261
prebundleTransformer ,
265
262
target ,
266
- isZonelessApp ( polyfills ) ,
263
+ isZonelessApp ( browserOptions . polyfills ) ,
267
264
browserOptions . loader as EsbuildLoaderOption | undefined ,
268
265
extensions ?. middleware ,
269
266
transformers ?. indexHtml ,
@@ -300,7 +297,7 @@ export async function* serveWithVite(
300
297
key : 'r' ,
301
298
description : 'force reload browser' ,
302
299
action ( server ) {
303
- server . ws . send ( {
300
+ server . hot . send ( {
304
301
type : 'full-reload' ,
305
302
path : '*' ,
306
303
} ) ;
0 commit comments