Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HMR only works when editing the initial screen set in app.ts; other screens do not update #1099

Open
@pazfelipe

Description

@pazfelipe

HMR (Hot Module Replacement) is only working when changes are made to the component that is directly set in app.ts. If I navigate to another screen (e.g., using $navigateTo()), and make edits to that screen’s file, changes are not reflected unless I manually edit the initial screen to force a reload.


🔁 Steps to reproduce

  1. Create a new project:
ns createtest --template @nativescript-vue/template-blank@latest
  1. Create the file./src/pages/auth/sign-in.vue with this content:
<template>  <PageactionBarHidden="true">    <StackLayoutclass="p-4 bg-slate-50">      <Buttontext="Back"@tap="$navigateBack()"      />      <Labeltext="Sign In" />    </StackLayout>  </Page></template>
  1. Create the file./src/pages/Home.vue with this content:
<template>  <Frame>    <PageactionBarHidden="true">      <StackLayout>        <Buttontext="Sign In"@tap="$navigateTo(SignIn)"        />      </StackLayout>    </Page>  </Frame></template><script lang="ts" setup>importSignInfrom"./auth/sign-in.vue";</script>
  1. Make sure Home.vue is the root component used in app.ts.
import{createApp}from'nativescript-vue';importHomefrom'./pages/Home.vue';createApp(Home).start();

✅ How to test

  • Run the app
  • Tap the Sign In button to navigate to the sign-in.vue screen
  • While staying on the SignIn screen, make any change in sign-in.vue (e.g., text, layout, etc.)
  • Nothing happens.
  • Now, edit Home.vue (e.g., add a space) — the app reloads and goes back to the initial screen
  • Navigate to Sign In again — you’ll now see the updated version

💻 My environment

  • macOS Sequoia 15.5 (M2 Pro)
  • Happens on both iOS and Android
  • NativeScript Vue 3 with $navigateTo() +

🔧 Expected behavior

HMR should reflect changes in any active screen component, regardless of whether it is the initial component set in app.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp