Skip to content

Angular apps do not work with HMR out of the box #4325

Closed

Description

@DimitarTachev

Environment

  • CLI: 5.1.1
  • Cross-platform modules: 5.1.0
  • Android Runtime: 5.1.0
  • iOS Runtime: 5.1.0
  • Plugin(s): nativescript-dev-webpack: 0.19.1

To Reproduce

  1. tns create ngApp --ng && cd ngApp
  2. tns run android --hmr or tns run ios --hmr
  3. Apply some change in order to trigger the LiveSync process.
  4. The app will not get the change applied.

Expected behavior
The app should get the change applied.

Additional context
In order to get the HMR working in Angular apps, I have to follow the steps in this wiki: https://github.com/NativeScript/nativescript-angular/wiki/HMR.

Activity

  1. added this to the 5.2.0 milestone on Jan 31, 2019
  2. endarova commented on Jan 31, 2019

    @endarova
    Contributor

    With CLI 5.2.0 and nativescript-dev-webpack@0.20.0

    • env flag should leave your project with its current setup
    • --hmr should automatically setup your project for hmr and apply changes on device without additional snippets
    • no warning for --hmr + Angular are shown on tns run and tns debug
    • tns run --hmr should work as expected in angular projects
    • tns debug --hmr should work as expected in angular projects
    • tns preview --hmr should work as expected in angular projects
    • --hmr should work as expected in angular projects with lazy loading
  3. self-assigned this
    on Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions