Native config loader based on `oxnode` ability

Abierto
#3,380 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript, vite
Área
build-system

Línea de trabajo

Start by reading the linked Vite issue about making the native config loader the default and the referenced config loader performance issue #2698. The issue proposes experimenting with oxc-transformer to provide jiti-like config loading through Vite+'s existing oxnode and vite-plus/register support, but leaves timing and implementation scope open. Done means establishing whether that approach is viable and, if pursued, demonstrating compatibility with syntax such as __dirname and TypeScript enums.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

pending triage

--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)

Lenguaje dominante
TypeScript
Estrellas
6.6k
Forks
303
Merge medio
1 d 5 h
PR fusionados (30 d)
212

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de voidzero-dev/vite-plus

Todos los issues de voidzero-dev/vite-plus

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.