NativeScript / NativeScript/nativescript-cli

[LiveSync] allow for custom files (extensions) to be handled by liveSync

Open
#4,957 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debug feature livesync run unit testing
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

In my app i need to allow fast live sync for files ".mss"
When those files are changed (in assets), only a reload of the map style is needed.
I already handle that through global.__onLiveSync

But now it does not work anymore. It comes from that line:
https://github.com/NativeScript/nativescript-cli/blob/5069f29fcb0a1dc9abbf3eb5523b298141bb3b11/lib/services/webpack/webpack-compiler-service.ts#L59

I was working a few releases before. If i

Here only files with 'hot-update' will allow live sync. How can i make it work?
Actually how does it work today for images live sync. I can see that it is supposed to be handled seeing fastLivesyncFileExtensions:
https://github.com/NativeScript/nativescript-cli/blob/9320a1de8462e8451f08a4798d35912573f78ac3/lib/services/android-project-service.ts#L85

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lib/services/webpack/webpack-compiler-service.ts around line 59 and compare it with lib/services/android-project-service.ts around line 85, especially fastLivesyncFileExtensions. Trace how image changes reach liveSync and how global.__onLiveSync is involved. Done means a custom .mss asset change triggers the required liveSync behavior without affecting existing image handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
cli, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.