File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/angular/build/src/builders/dev-server Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { loadProxyConfiguration, normalizeSourceMaps } from '../../utils';
2828import { useComponentStyleHmr , useComponentTemplateHmr } from '../../utils/environment-options' ;
2929import { loadEsmModule } from '../../utils/load-esm' ;
3030import { Result , ResultFile , ResultKind } from '../application/results' ;
31+ import { OutputHashing } from '../application/schema' ;
3132import {
3233 type ApplicationBuilderInternalOptions ,
3334 BuildOutputFileType ,
@@ -158,6 +159,19 @@ export async function* serveWithVite(
158159 process . setSourceMapsEnabled ( true ) ;
159160 }
160161
162+ if (
163+ serverOptions . hmr &&
164+ ( browserOptions . outputHashing === OutputHashing . All ||
165+ browserOptions . outputHashing === OutputHashing . Bundles )
166+ ) {
167+ serverOptions . hmr = false ;
168+
169+ context . logger . warn (
170+ `Hot Module Replacement (HMR) is disabled because the 'outputHashing' option is set to '${ browserOptions . outputHashing } '. ` +
171+ 'HMR is incompatible with this setting.' ,
172+ ) ;
173+ }
174+
161175 const componentsHmrCanBeUsed =
162176 browserOptions . aot && serverOptions . liveReload && serverOptions . hmr ;
163177
You can’t perform that action at this time.
0 commit comments