[node-resolve] Replace `resolve` and some rollup-baked `exports` fields handling with a Rust-based resolver

Abierto
#1,874 9 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
javascript, rust

Línea de trabajo

Start with @rollup/plugin-node-resolve and review how it currently relies on resolve, including its extra browser-field and export-map handling. Compare the mentioned oxc-resolver and rspack-resolver options, then establish whether a Rust-based replacement preserves those behaviors and improves performance before considering Rollup core.

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

Descripción

  • Rollup Plugin Name: @rollup/plugin-node-resolve
  • Rollup Plugin Version: 16.0.1
Feature Use Case

Currently, @rollup/plugin-node-resolve relies on resolve, a resolver created and maintained by Browserify, which hasn't been actively maintained and lacks the export map feature.

Rollup builds @rollup/plugin-node-resolve on top of resolve with extra code to handle the browser field and export map.

The resolve plugin is a hot path during the build process, ranging from 10 to thousands or even more. Rustifying the resolver could benefit performance.

Feature Proposal

Maybe Rollup could rustify the resolve part, starting with @rollup/plugin-node-resolve. It is possible to use a Rust-based resolver, like oxc-resolver or rspack-resolver directly. Rollup could also build a rollup-flavored one on top of those crates.

Also, those resolvers already support features (that resolve doesn't have) like export map and the browser field, so @rollup/plugin-node-resolve wouldn't need to re-implement those features again.

After experimenting with @rollup/plugin-node-resolve, we could then decide whether the Rollup core's built-in resolver can benefit from rustify as well.

Lenguaje dominante
JavaScript
Estrellas
3.8k
Forks
635
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

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 rollup/plugins

Todos los issues de rollup/plugins

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.