Versions
Angular CLI: 6.0.0-rc.2
Node: 9.11.1
OS: darwin x64
Angular: 6.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 6.0.0-rc.2
@angular-devkit/architect: 0.5.4
@angular-devkit/build-angular: 0.5.4
@angular-devkit/build-optimizer: 0.5.4
@angular-devkit/core: 0.5.4
@angular-devkit/schematics: 0.5.4
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 6.0.0-rc.2.4
@schematics/angular: 0.5.4
@schematics/update: 0.5.4
typescript: 2.7.2
webpack: 4.5.0
Repro steps
Changes needed?
Run script
"scripts": {
...
"hmr": "ng serve --hmr -e=hmr"
}
becomes
"scripts": {
...
"hmr": "ng serve --hmr"
}
angular.json
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"hmr": "environments/environment.hmr.ts",
"prod": "environments/environment.prod.ts"
},
becomes
"configurations": {
"hmr": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.hmr.ts"
}
]
},
"production": {
...
After making the above changes, the app will be served but I get an console error with the following
dev-server.js:60 Uncaught Error: [HMR] Hot Module Replacement is disabled.
at Object../node_modules/webpack/hot/dev-server.js
Versions
Repro steps
ng newyarn run hmrChanges needed?
Run script
becomes
angular.json
becomes
After making the above changes, the app will be served but I get an console error with the following