Skip to content

Support Async and ESM Plugins #5154

Open
@sxzz

Description

What problem does this feature solve?

@vue/language-tools now loads plugins using CJS require and enforces that plugins be in CJS format. Although node 22 supports require(ESM), it is still not fully supported in old versions.

Additionally, dynamically loading configurations (e.g., using importx / unconfig) for plugins remains unachievable.

Thus, supporting dynamic import and async plugins is necessary.

I guess we also need support from TypeScript team. Maybe we should have an issue on their repo?

What does the proposed solution look like?

export type VueLanguagePlugin = (ctx: ...) => Awaitable<Arrayable<VueLanguagePluginReturn>>;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions