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

Hot Module Replacement (HMR) not pushing style changes for Single File Vue Components #762

Closed
tsonevn opened this issue Jan 7, 2019 · 6 comments

Comments

@tsonevn
Copy link

tsonevn commented Jan 7, 2019

@saibbyweb commented on Sun Jan 06 2019

Environment
√ Component nativescript has 5.1.0 version.
√ Component tns-core-modules has 5.1.1 version.
√ Component tns-android has 5.1.0 version.
√ Component tns-ios has 5.1.0 version.

Hot Replacement Module not pushing styles changes on a Vue component
Changing simple class properties such as font-size does not reflect on the app instantly even though the terminal says:
Refreshing application on device emulator-5554...
Successfully synced application org.nativescript.PilotVueApp on device emulator-5554.

However, any change in the script part instantly updates the app (including the backlog of the un-updated style changes)

Expected behavior
Style changes should be instantly updated like the script changes.

Sample project to reproduce (contains 1 simple Vue component)
Here's the link of a sample project on which I'm facing the problem: [https://github.com/saibbyweb/nativescript-vue-pilot]

Additional context
I tested on an Android Emulator and using NS Preview App on an iOS device. I am having the same issue on both Android and iOS. (Windows 10 Home)


@tsonevn commented on Mon Jan 07 2019

Hi @saibbyweb,
I tested the case on my side and was able to recreate the problem. I will mark this as a bug, and we will investigate further the issue. For now, I would suggest keeping track on the issue for further info.

@KristianDD KristianDD self-assigned this Jan 7, 2019
@saibbyweb
Copy link

I found the origin of the problem.

I had initialized this project using NativeScript Sidekick, selecting Blank Vue.js template. It's something wrong with the template which Sidekick fetches because when I manually initialized another project using vue-cli-template: https://github.com/nativescript-vue/vue-cli-template, this problem didn't persist.

May be the blank Vue.js template in Sidekick needs to be routed to vue-cli-template.

Also, do check the Master-Detail with (with Firebase) Vue.js template for similar issues.

@vchimev vchimev transferred this issue from NativeScript/nativescript-cli Jan 7, 2019
@vchimev vchimev assigned vchimev and unassigned KristianDD Jan 7, 2019
vchimev added a commit that referenced this issue Jan 7, 2019
The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.
vchimev added a commit that referenced this issue Jan 12, 2019
The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.
vchimev added a commit that referenced this issue Jan 12, 2019
vchimev added a commit that referenced this issue Jan 12, 2019
vchimev added a commit that referenced this issue Jan 14, 2019
* fix(Vue): apply style changes with HMR

The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.

* Revert "fix(Vue): resolve full path for entry module (#744)"

This reverts commit 4d31ea0.

It causes #762.

* fix(Vue): entry module path

Fixes #742, fixes #762.
SvetoslavTsenov pushed a commit that referenced this issue Jan 28, 2019
* fix(Vue): apply style changes with HMR

The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.

* Revert "fix(Vue): resolve full path for entry module (#744)"

This reverts commit 4d31ea0.

It causes #762.

* fix(Vue): entry module path

Fixes #742, fixes #762.
SvetoslavTsenov added a commit that referenced this issue Jan 28, 2019
* fix(Vue): apply style changes with HMR

The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.

* Revert "fix(Vue): resolve full path for entry module (#744)"

This reverts commit 4d31ea0.

It causes #762.

* fix(Vue): entry module path

Fixes #742, fixes #762.
SvetoslavTsenov added a commit that referenced this issue Jan 28, 2019
* fix(Vue): apply style changes with HMR (#763)

* fix(Vue): apply style changes with HMR

The `bundle-config-loader` executes for `entryPath` with all extensions: `css`, `js`, `ts`, `scss`, etc. Limit only to `js` and `ts`.

Fixes #762.

* Revert "fix(Vue): resolve full path for entry module (#744)"

This reverts commit 4d31ea0.

It causes #762.

* fix(Vue): entry module path

Fixes #742, fixes #762.

* Release 0.19.0 (#757)

* fix: lazy-ngmodule-hot-loader breaks the sourceMaps

The `lazy-ngmodule-hot-loader` breaks sourceMaps as it does not pass them to the next loaders. This breaks debugging with `--bundle` in VSCode extension as the files included in the `sourcesContent` cannot be mapped correctly to local files.
@hgc2002
Copy link

hgc2002 commented Apr 21, 2019

Some style changes does not trigger the HMR, but I'm not quite sure which ones or when it happens. Sometimes you make more style changes and it does the triggering...
Sometimes you need to change something silly in the code to make it reload, but it does not work all the time.

@newtmex
Copy link

newtmex commented Apr 8, 2020

I am having this issue, especially on android emulator and device

@salvationarinze
Copy link

I'm also having this issue esp. on styles

@kabaluyot
Copy link

sad issue still open

@AlejandroGuzmanCL
Copy link

as of july 28th, the problems is still present, I have to manually edit other files that triggers a full reload or stop and run project on each edit.

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

No branches or pull requests

9 participants