Skip to content

Commit e474235

Browse files
committed
fix(@angular/build): always provide Vite client helpers with development server
In addition to the WebSocket code, the Vite client module contains helper functions which may be injected into modules at request time. These helpers are required for certain behavior to function. Previously, when `--no-live-reload` was used, these helpers may not have been available which led to runtime errors. These runtime errors will no longer occur. However, the browser console will now log that the Vite client cannot connect to the development server WebSocket. This is expected in this case since live reload functionality was disabled and the server side is intentionally not available.
1 parent 25dbe7c commit e474235

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

packages/angular/build/src/builders/dev-server/vite-server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ export async function setupServer(
854854
outputFiles,
855855
templateUpdates,
856856
external: externalMetadata.explicitBrowser,
857-
skipViteClient: serverOptions.liveReload === false && serverOptions.hmr === false,
858857
}),
859858
],
860859
// Browser only optimizeDeps. (This does not run for SSR dependencies).

0 commit comments

Comments
 (0)