Skip to content

Update dependency tracking after modules are loaded from AVA's "require" configuration #2049

Closed
@lo1tuma

Description

@lo1tuma

See next steps at #2049 (comment).

Original issue description follows.


According to the watch-mode documentation dependency tracking should work when custom extensions/transpilers are configured directly in ava.config.js or in the package.json. The linked documentation (06-configuration.md) doesn’t really explain how this should be done. In the babel recipe however it is explained how to utilize babel transpiling for source files, the recommendation is to use the require option to load e.g. @babel/register. The problem with that is, that dependency tracking is installed before the require option is executed.

I followed the instructions in the babel recipe to transpile typescript source files with @babel/register and @babel/preset-typescript via the ava require option. Since the dependency tracking is installed before this step, it is unaware of the additional file extensions like ts and tsx that @babel/register adds.

I’m a little bit confused right now, because the documentation says it should work somehow, but it doesn’t explain how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions