Skip to content

Rollup watches a path even if that id is loaded by load hook #5013

@sapphi-red

Description

@sapphi-red

Rollup Version

3.22.0

Operating System (or Browser)

stackblitz

Node Version (if applicable)

No response

Link To Reproduction

https://stackblitz.com/edit/rollup-repro-zpgwkm?file=run.js

Expected Behaviour

If the content is loaded by a load hook (= the content isn't loaded by the rollup's default behavior), that path is not added to the watcher. If the content is loaded by a load hook, the content is not necessarily dependent on the file at that path.

Actual Behaviour

Even if the content is loaded by a load hook, that path is added to the watcher.

I'm not sure if this is an intended behavior. I'm wondering if this is a behavior to make it easier to create plugins.

related: vitejs/vite#13234

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions