gajus / gajus/babel-plugin-react-css-modules
Make babel-plugin-react-css-modules work with commonjs require
- Lenguaje dominante
- JavaScript
- Estrellas
- 2k
- Forks
- 159
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello,
when requiring scss files using `require()` syntax I get `Cannot use styleName attribute without importing at least one stylesheet.`. However if I switch to using import it works (minus an eslint parsing error).
I'm trying to introduce css-modules into an old code base. I have the es6 babel preset running (that's why imports work), but code is linted without modules support and I would love to keep it that way for the time being. Is there anyway to make this plugin work with require?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza reproduciendo el fallo informado al hacer require de archivos SCSS y compáralo con la ruta de importación ES6 que funciona en el plugin. Se considera terminado cuando la compatibilidad con CommonJS require funcione sin el error “Cannot use styleName attribute”, preservando al mismo tiempo el comportamiento de importación existente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100