Skip to content

Commit

Permalink
fix(@angular/build): always provide Vite client helpers with developm…
Browse files Browse the repository at this point in the history
…ent 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.
  • Loading branch information
clydin committed Feb 4, 2025
1 parent 25dbe7c commit e474235
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,6 @@ export async function setupServer(
outputFiles,
templateUpdates,
external: externalMetadata.explicitBrowser,
skipViteClient: serverOptions.liveReload === false && serverOptions.hmr === false,
}),
],
// Browser only optimizeDeps. (This does not run for SSR dependencies).
Expand Down

0 comments on commit e474235

Please sign in to comment.