Skip to content

Changes of loaded files will not trigger a rebuild in rolldown watch mode #34

Description

@CyanSalt

Describe the bug

In a tsdown project, editing files will trigger a rebuild properly when using tsdown --watch. However, editing files imported via ?raw does not trigger a rebuild.

This is likely because the watcher is not notified via this.addWatchFile.

Reproduction

https://stackblitz.com/edit/stackblitz-starters-jrquvz9z?file=src%2Findex.ts

System Info

System:
    OS: macOS 26.5
    CPU: (12) arm64 Apple M3 Pro
    Memory: 297.59 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.15.0
    pnpm: 11.0.9
  Browsers:
    Chrome: 149.0.7827.156
    Safari: 26.5

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

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