Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): live reload cannot be disabled
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Alan Agius authored and vikerman committed Apr 29, 2019
1 parent 29609fb commit b2262e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/angular_devkit/build_angular/src/dev-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b2262e9

Please sign in to comment.