Base solution for your next web application
Open Closed

Angular 7 HMR #8152


User avatar
0
adhub created

Hi guys

I been trying to use HMR and its not really doing much difference to me.

I can update a css/less file and it will still live reload the entire page, if i however just put a blank space in it wont reload the entire page, and it wont reload the page as i expect it to do.

Is this normal behaviour?

How do i get it to hot replace the css/less files, and not update the entire page?

my package.json

{
  "name": "abp-zero-template",
  "version": "6.9.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "publish": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod",
    "start": "node_modules/.bin/nswag run nswag/service.config.nswag && ng serve --host localhost --port 4200 --sourceMap=true --progress=false --vendorChunk=true",
    "hmr": "ng serve --host localhost --port 4200 --configuration hmr --sourceMap=true --progress=false --vendorChunk=true",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook",
    "nswag": "node_modules/.bin/nswag run nswag/service.config.nswag"
  },
  "private": false,
  "dependencies": {
    "@angular/animations": "^7.2.11",
    "@angular/cdk": "^7.3.6",
    "@angular/common": "^7.2.11",
    "@angular/compiler": "^7.2.11",
    "@angular/core": "^7.2.11",
    "@angular/forms": "^7.2.11",
    "@angular/http": "^7.2.11", 
    "@angular/platform-browser": "^7.2.11",
    "@angular/platform-browser-dynamic": "^7.2.11",
    "@angular/platform-server": "^7.2.11",
    "@angular/router": "^7.2.11",
    "@aspnet/signalr": "^1.1.2",
    "@babel/core": "^7.4.5",
    "@cloudinary/angular-5.x": "^1.0.3",
    "@fullcalendar/angular": "^4.2.1",
    "@fullcalendar/bootstrap": "^4.2.0",
    "@fullcalendar/core": "^4.2.0",
    "@fullcalendar/daygrid": "^4.2.0", 
    "@fullcalendar/interaction": "^4.2.0",
    "@fullcalendar/list": "^4.2.0",
    "@fullcalendar/resource-timeline": "^4.2.0",
    "@fullcalendar/timegrid": "^4.2.0",
    "@ng-select/ng-select": "2.20.5",
    "@storybook/angular": "^5.1.9",
    "@storybook/cli": "^5.1.9",
    "@swimlane/ngx-charts": "^10.1.0",
    "abp-ng2-module": "^3.2.4",
    "abp-web-resources": "^3.8.5",
    "adal-angular": "^1.0.17",
    "angular-oauth2-oidc": "^5.0.2",
    "angular2-counto": "^1.2.5",
    "angular2-text-mask": "^9.0.0",
    "animate.css": "^3.7.0",
    "babel-loader": "^8.0.6",
    "cloudinary-core": "^2.5.0",
    "cookieconsent": "^3.1.0",
    "core-js": "^2.6.5",
    "famfamfam-flags": "^1.0.0",
    "js-cookie": "^2.2.0",
    "localforage": "^1.7.3",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "moment-timezone": "^0.5.23",
    "ng-recaptcha": "^4.2.1",
    "ng2-file-upload": "^1.3.0",
    "ngx-bootstrap": "^4.0.0",
    "ngx-countdown": "^3.2.0",
    "ngx-image-cropper": "^1.3.8",
    "ngx-perfect-scrollbar": "^7.2.1",
    "object-path": "^0.11.4",
    "primeicons": "^1.0.0",
    "primeng": "^7.1.0",
    "push.js": "^1.0.9",
    "quill": "^1.3.6",
    "rtl-detect": "^1.0.2",
    "rxjs": "^6.4.0",
    "simple-line-icons": "^2.4.1",
    "sweetalert2": "^8.8.0",
    "text-mask-addons": "^3.8.0",
    "tooltip.js": "^1.3.3",
    "zone.js": "^0.9.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.7",
    "@angular/cli": "^7.3.7",
    "@angular/compiler-cli": "^7.2.11",
    "@angularclass/hmr": "^2.1.3",
    "@angularclass/hmr-loader": "^3.0.4",
    "@storybook/addon-actions": "^5.1.9",
    "@storybook/addon-links": "^5.1.9",
    "@storybook/addon-notes": "^5.1.9",
    "@storybook/addons": "^5.1.9",
    "@types/jasmine": "~3.3.12",
    "@types/jasminewd2": "~2.0.6",
    "@types/lodash": "^4.14.123",
    "@types/moment-timezone": "^0.5.12",
    "@types/node": "^11.13.0",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.3.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^4.0.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~2.0.0",
    "karma-coverage-istanbul-reporter": "^2.0.5",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "nswag": "12.0.20",
    "protractor": "~5.4.2",
    "ts-node": "~8.0.3",
    "tslint": "~5.15.0",
    "typescript": "3.2.4"
  }
}

4 Answer(s)
  • User Avatar
    0
    XugoWebTeam created

    would also like to hear the answer to this. I had HMR working reasonably on earlier version of aspnetzero, but haven't been able to get it working on the latest version.

  • User Avatar
    0
    adhub created

    No update on this ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @adhub

    Sorry for my late reply. Could you create an issue on GitHub ? We will test this and fix the problem.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.