Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

no "livereload" for changes of *.tns.* of sharing project #601

Closed
sis0k0 opened this issue Jul 5, 2018 · 8 comments · Fixed by #615
Closed

no "livereload" for changes of *.tns.* of sharing project #601

sis0k0 opened this issue Jul 5, 2018 · 8 comments · Fixed by #615
Labels

Comments

@sis0k0
Copy link
Contributor

sis0k0 commented Jul 5, 2018

From @hafstad on June 12, 2018 21:0

I've just tried following the installation / usage guide in the readme so I'm using the recommended version of angular cli.

After install I did the following command:
ng new --collection=@nativescript/schematics --name=my-shared-app --shared

And after that I did following inside the newly created project:
tns run ios --bundle --emulator

The app starts in the iOS simulator as expected, but I noticed that changes made in the files with the *.tns.ts are not refreshing the app.

The console writes:

File change detected. Starting incremental webpack compilation...
Webpack compilation complete. Watching for file changes.
Webpack build done!
main.ns.ts

However if I change in other files such *.html the changes are triggering the app to refresh.

Is this intended behaviour, or am I doing something wrong?

Copied from original issue: NativeScript/nativescript-schematics#19

@sis0k0 sis0k0 added the bug label Jul 5, 2018
@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 5, 2018

Hey @hafstad, thanks for reporting that! It's not the intended behavior for sure. We'll work on fixing it.

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 5, 2018

From @iMarwan-k on June 20, 2018 19:22

Hi @sis0k0 , I'm having the opposite behavior. when I make a change to HTML or CSS, I don't see the change until I completely bundle the whole project. however, the change to any .ts file refresh the app and it is reflected

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 5, 2018

From @jkod on June 24, 2018 22:38

yes, also getting the same opposite behavior as @iMarwan-k - only .ts file changes casues the app to reload.

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 5, 2018

Moving this to the nativescript-dev-webpack repo as it's related to the virtual file system we're using with webpack.

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 5, 2018

Related to angular/angular-cli#11339

sis0k0 added a commit that referenced this issue Jul 18, 2018
The new approach fixes the problems with watching platform-specific
files.

depends on #611
fixes #601
sis0k0 added a commit that referenced this issue Jul 18, 2018
The new approach fixes the problems with watching platform-specific
files.

depends on #611
fixes #601
sis0k0 added a commit that referenced this issue Jul 18, 2018
The new approach fixes the problems with watching platform-specific
files.

depends on #611
fixes #601
sis0k0 added a commit that referenced this issue Jul 19, 2018
The new approach fixes the problems with watching platform-specific
files.

depends on #611
fixes #601
@iMarwan-k
Copy link

release 0.15.0 crash the app

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 26, 2018

@iMarwan-k, can you send stack trace and your package.json?

@gschora
Copy link

gschora commented Apr 22, 2019

I'm hoping that this is the right place, because I'm having the same issue on an nativescript-vue project:

  • created an project from the vue-cli like in quickstart
  • created an html-file in the assets folder (in my case a simple file loading google maps)
  • added a webview in app.vue where the src property is the created html-file
  • google maps is showing fine when i bundle the app with tns run android --bundle, so I know that the reference to the file is working and the html is transfered
  • when I change something in the html-file I get this message:
    File change detected. Starting incremental webpack compilation...
    Webpack compilation complete. Watching for file changes.
    Webpack build done!
    Preparing project...
    Project successfully prepared (Android)
    Successfully transferred map.html on device 192.168.176.102:5555.
    Refreshing application on device 192.168.176.102:5555...
    Successfully synced application org.nativescript.application on device 192.168.176.102:5555

but the changes are not shown.

There are only 3 ways I got the changes I've made in the html-file to show in the app.

  • when I close the app in the emulator and then save the changes in the html, the app gets restartet and everything works as expected
  • when I save the changes in the html, then hit the back button in the emulator, to send the app in the background and when I get the app back in foreground the changes are working
  • or when I completely rebundle the app

Same behavior in the preview app on a real device.

So any help would be appreciated.

tns-cli version: 5.3.2
vue-cli version: 3.6.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants