StyleX example doesn't setup styles correctly
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- build-system, frontend
Línea de trabajo
Start with the rsbuild/stylex example, its package.json build script, and the generated stylex.css referenced in the report. Reproduce with rsbuild build, then compare the production HTML and CSS output with the linked unplugin-stylex example's public/index.html. Done means production styles load without runtime injection and output.inlineStyles handles stylex.css as intended.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
(1) Files generated by rsbuild stylex example do not use the stylex.css file.
Instead styles are present because of StyleX runtimeInjection=true feature, which should be disabled for production builds,
(2) yet apparently it is enabled for production builds
(production builds being considered the result of rsbuild build command, i.e. "build" script in package.json)
and if runtimeInjection is force-disabled like this:
tools: {
rspack: {
plugins: [stylexPlugin({
stylex: {
runtimeInjection: false,
}
})],
},
},
then styles are not loaded by the browser at all
The unplugin-stylex rsbuild example solves this by embedding the <link rel="stylesheet" href="stylex.css"> to the template index.html
(3) As a result, the output.inlineStyles=true doesn't work for the stylex.css file generated by the plugin.
(the reason I wrote this github-issue is because of this third problem)
Git repo to reproduce: https://github.com/mechan1sm/stylex-bug-reproduce-1
- Lenguaje dominante
- TypeScript
- Estrellas
- 168
- Forks
- 47
- Merge medio
- 3 h 45 min
- PR fusionados (30 d)
- 11
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rstackjs/rstack-examples
-
能帮忙看下吗?如果我配置了 workspace Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
rstackjs/rstack-examples#416 ·
-
rstackjs/rstack-examples#331 · 1 comentario · 1 asignado ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
rstackjs/rstack-examples#231 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
rstackjs/rstack-examples#190 ·
-
PR welcome
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
rstackjs/rstack-examples#144 ·
Todos los issues de rstackjs/rstack-examples
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mksglu/context-mode#1200 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anthropics/claude-code#96687 ·
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
AOSSIE-Org/DebateAI#582 · 2 comentarios ·