Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload not working #36

Closed
luizbills opened this issue Jun 23, 2019 · 3 comments
Closed

Hot reload not working #36

luizbills opened this issue Jun 23, 2019 · 3 comments

Comments

@luizbills
Copy link
Contributor

When I run the svelte-native-template with tns run android --bundle and I update the source, the app is reinitialized.

@ghost
Copy link

ghost commented Jun 30, 2019

Do you mean it is not re-initialized? I have the same issue. Basic svelte-native-template installation and when I make a change to source code, preview on phone does not get updated.

@ghost
Copy link

ghost commented Jun 30, 2019

I get the following error from the basic template:

Webpack compilation complete. Watching for file changes.
Webpack build done!
Start syncing changes for platform ios.
Successfully synced bundle.ea480f97af22f8fe1cc4.hot-update.js,ea480f97af22f8fe1cc4.hot-update.json for platform ios.
LOG from device *** iPhone:
CONSOLE WARN file:///app/vendor.js:121:36: HMR: Cannot apply update. A previous update aborted. Application needs to be restarted in order to apply the changes.

Every change I make in the source causes the sync to start, but then it aborts.

This is a second error I get:

Webpack build done!
Start syncing changes for platform ios.
Successfully synced bundle.2f4e7fe0a20239b90172.hot-update.js,2f4e7fe0a20239b90172.hot-update.json for platform ios.
LOG from device *** iPhone:
CONSOLE INFO file:///app/vendor.js:120:36: HMR: Checking for updates to the bundle with hmr hash 2f4e7fe0a20239b90172.
LOG from device *** iPhone: CONSOLE WARN file:///app/vendor.js:121:36: HMR: Ignored an update to unaccepted module:
LOG from device *** iPhone: CONSOLE WARN file:///app/vendor.js:121:36: HMR:          ➭ ./app.ts
LOG from device *** iPhone: CONSOLE ERROR file:///app/vendor.js:122:38: HMR: Cannot apply update with hmr hash 2f4e7fe0a20239b90172.
LOG from device *** iPhone: CONSOLE WARN file:///app/vendor.js:121:36: HMR:          ➭ ./App.svelte
LOG from device *** iPhone: CONSOLE ERROR file:///app/vendor.js:122:38: HMR: Aborted because ./App.svelte is not accepted
Update propagation: ./App.svelte -> ./app.ts

@halfnelson
Copy link
Owner

The ignored update is to be expected. Out of the box Svelte-native and Svelte don't support HMR. sveltejs/svelte#2377
You can use the HMR branch of svelte-loader to get an early preview
https://github.com/rixo/demo-svelte-native-hmr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants