Emotion plugin does not support disabling `cssPropOptimization`

Abierto
#691 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
57/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
frontend

Línea de trabajo

Start by reading the Emotion plugin implementation and its tests for the cssPropOptimization option; the issue does not name file paths. Compare the behavior with the linked Babel plugin documentation and reproduction, then check how the option is handled when set to false. Done means JSX css props are passed through untouched with the option disabled, matching the expected behavior in the issue.

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

Descripción

Describe the bug
The babel emotion plugin includes a cssPropOptimization prop config. in 14.7.0 and earlier, @swc/plugin-emotion never applied this optimization. In later versions it is enabled with no way to disable.

Repro (This repro shows the behavior in 3 versions of the plugin as well as in the babel plugin)

Expected behavior
When cssPropOptimization is set to false, css props in JSX elements should be left untouched. Something like <HStack css={{height: '100%'}} should pass the object to the component untouched. This is how it works in the babel version of this plugin.

Thank you! ❤️

Lenguaje dominante
Rust
Estrellas
387
Forks
111
Merge medio
3 h 40 min
PR fusionados (30 d)
18

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 swc-project/plugins

Todos los issues de swc-project/plugins

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.