-
-
Notifications
You must be signed in to change notification settings - Fork 197
Pass the HMR option to the hooks and preview URL #3907
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
Conversation
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.
You need to add the option in the following file:
https://github.com/NativeScript/nativescript-cli/pull/3907/files#diff-ce2a772bf174b37fc93372c01de3302cL691
lib/commands/preview.ts
Outdated
}); | ||
|
||
await this.$playgroundQrCodeGenerator.generateQrCodeForCurrentApp(); | ||
await this.$playgroundQrCodeGenerator.generateQrCodeForCurrentApp({ useHmr: this.$options.hmr }); |
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.
We can unify useHmr
option name with useHotModuleReload
await this.$playgroundQrCodeGenerator.generateQrCodeForCurrentApp({ useHotModuleReload: this.$options.hmr })
@@ -10,7 +10,7 @@ declare global { | |||
interface IPreviewAppLiveSyncData extends IProjectDir, IAppFilesUpdaterOptionsComposition, IEnvOptions { } | |||
|
|||
interface IPreviewSdkService { | |||
qrCodeUrl: string; | |||
getQrCodeUrl(options: { useHmr: boolean }): string; |
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.
We can use IHasUseHotModuleReloadOption
interface here
getQrCodeUrl(options: IHasUseHotModuleReloadOption): string;
@@ -255,7 +268,7 @@ function execute(options: { | |||
}); | |||
} | |||
|
|||
describe("previewAppLiveSyncService", () => { | |||
describe.only("previewAppLiveSyncService", () => { |
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.
Remove this .only()
849fa5f
to
d5cb873
Compare
d5cb873
to
c2a47b9
Compare
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.
after green build!
PR Checklist
related to #3813