Skip to content

Native config loader based on oxnode ability #3380

Description

@liangmiQwQ

--configLoader native is about to become the default config loading method in Vite 9+.

After that, some syntax like __dirname and TypeScript enum in Vite config and would become incompatible. For pure Vite, supporting these syntax means adding oxnode or jiti dependencies, which increases its size.

But Vite+ is different, vpx already included oxnode, there is also a module vite-plus/register for adding TypeScript loading ability for Node. In other words, Vite+ already has the ability that jiti provides.

So in the future version where native become the default config loader, in order to have better compatibility, it might be a good idea to try using oxc-transformer's ability to load config, which costs little on Vite+. (provide jiti-like ability)

Not sure if we should start this experiment before Vite 9+ (config loader performance improvement #2698)

Activity

  1. fengmk2 commented on Nov 9, 2026

    @fengmk2
    Member

    You can first try creating a PoC to see how the startup speed changes. If the difference isn’t significant, we can consider it.

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

Metadata

Metadata

Assignees

No one assigned

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions