Skip to content

[Bug]: root sources aren't added with incremental --watch #526

@pjeby

Description

@pjeby

Plugin

@knodes/typedoc-pluginutils

Typedoc plugin(s) version(s)

@knodes/[email protected], @knodes/[email protected]

Typedoc version

0.25.4

Describe the problem

ABasePlugin._addSourceToProject() is only called once for the lifetime of a typedoc run, but this means that when you run typedoc --watch, the added sources aren't present in the project when later calls to findModuleRoot are made. This causes the pages plugin to crash with errors when trying to process pages for a subsequent build.

What did you expected ?

The extra sources should be added on each resolve begin event, so that they're present in all builds, not just the first one. Removing the once() wrapper fixes the issue for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions