Skip to content

vite build --watch does not pickup prop changes when using external ts file #563

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

Open
8 of 9 tasks
Druelik opened this issue Apr 4, 2025 · 0 comments
Open
8 of 9 tasks
Labels
p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)

Comments

@Druelik
Copy link

Druelik commented Apr 4, 2025

Related plugins

Describe the bug

Props are not updated in the build files when they are imported from another file when using vite build with --watch.

The problematic component is the Button, the other Components (Card & Foo) are working correctly.

Reproduction

https://stackblitz.com/edit/vitejs-vite-k4f9th7e?file=src%2Fcomponents%2FButton%2Ftypes.ts

Steps to reproduce

  1. Wait until npm packages are installed
  2. Run npm run start
  3. Look into dist/test-components.js every prop is build correctly.
  4. Change a prop in /src/components/Button/types.ts -> Vite triggers a rebuild
  5. Look into test-components.js -> Button props have not been updated

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 26.92 GB / 31.31 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 22.14.0 - /run/user/1000/fnm_multishells/984_1743758725581/bin/node
    npm: 10.9.2 - /run/user/1000/fnm_multishells/984_1743758725581/bin/npm
  npmPackages:
    @vitejs/plugin-vue: 5.2.3 => 5.2.3 
    vite: 6.2.3 => 6.2.3

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added p3-minor-bug 🔨 An edge case that only affects very specific usage (priority) and removed pending triage labels Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants