From 210a65f8890d32295a5534159835eb29e25b4da0 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 29 Apr 2019 13:16:13 +0200 Subject: [PATCH] fix(@angular-devkit/build-angular): live reload cannot be disabled By default the application will be served with inline mode enabled. This means that a script will be inserted in your bundle to take care of live reloading. However at the moment we are already adding these scripts in `_addLiveReload` method. With this change we always disable this behaviour and only add it when needed via the `_addLiveReload` logic. Eventually we should try to remove the logic and rely on webpack-dev-server interals. Fixes #14300 --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 121056c54ac8..ea8f7d60232a 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -274,6 +274,8 @@ export function buildServerConfig( errors: !(styles || scripts), warnings: false, }, + // inline is always false, because we add live reloading scripts in _addLiveReload when needed + inline: false, public: serverOptions.publicHost, disableHostCheck: serverOptions.disableHostCheck, publicPath: servePath,