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

feat(HMR): expose context #724

Merged
merged 1 commit into from
Dec 5, 2018
Merged

feat(HMR): expose context #724

merged 1 commit into from
Dec 5, 2018

Conversation

vchimev
Copy link
Contributor

@vchimev vchimev commented Dec 3, 2018

The context consists of an object with type and module properties:

  • type could be markup, script or style
  • module is the relative path to the module

PR Checklist

What is the current behavior?

Currently, global.__hmrRefresh() function accepts atype parameter which doesn't pass to global.__onLiveSync function.

What is the new behavior?

The new behavior changes global.__hmrRefresh() function to accept a context { type, module } object and pass it to global.__onLiveSync function.

In this way, the cross-platform modules (tns-core-modules) could handle different scenarios based on the context.

Relates to NativeScript/NativeScript#6665.
Implements a part of NativeScript/NativeScript#6645.

The context consists of an object with `type` and `module` properties:
- `type` could be `markup`, `script` or `style`
- `module` is the path to the module
@SvetoslavTsenov SvetoslavTsenov merged commit c14110c into master Dec 5, 2018
@SvetoslavTsenov SvetoslavTsenov deleted the vchimev/app-css-hmr branch December 5, 2018 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants