Skip to content

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

Open
@Druelik

Description

@Druelik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bug 🔨An edge case that only affects very specific usage (priority)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions