This repository was archived by the owner on Nov 17, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 449
[DO NOT MERGE] New nsconfig option for enabling HMR by default #1593
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fatme
reviewed
Mar 21, 2019
docs/start/cli-basics.md
Outdated
|
||
> **Note:** There are conceptual differences when the `useLegacyWorkflow` is used in **debug** build versus when used in **release** builds. When the flag is enabled against a debug build, the extended HMR experience is enabled. However, in cases where the `--release` flag is passed (release build) then only the `--bundle` is executed in the background (No HMR). The reason for this is to avoid bringing additional HMR logic and files into production. For details about the differences between Webpack livesync and HMR refer to [the comparative table](/performance-optimizations/bundling-with-webpack#hot-module-replacement). | ||
|
||
In case, when you have enabled the default HMR via the `useLegacyWorkflow` option, but you need to test without using HMR you can pass the `--no-hmr` flag to disable the feature for the current build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-bundle
provides the default experience
no-hmr
provides webpack build without hmr
docs/start/cli-basics.md
Outdated
@@ -238,6 +239,49 @@ The `run` command will again take a few seconds, as the NativeScript CLI will be | |||
|
|||
Now that you have a full setup in place for developing your apps let’s look at a few additional things you can do. | |||
|
|||
### Using RUN with HMR | |||
|
|||
The developer experience significantly improves by using the [HMR (Hot Module Replacement)](/performance-optimizations/bundling-with-webpack#hot-module-replacement) feature introduced in NativeScript 5. The option requires Webpack (enabled by default in all NativeScript 5.x.x templates) and behind the scene is creating Webpack bundle with the enhancement of Hot Module Replacement developer experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option requires nativescript-dev-webpack plugin
(enabled by default in all NativeScript 5.x.x templates) maybe?
tsonevn
approved these changes
Mar 21, 2019
test |
Fatme
approved these changes
Mar 21, 2019
test |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to NativeScript/nativescript-cli#4411
To be merged after CLI v.53 is released.