gajus / gajus/babel-plugin-react-css-modules

Can I use webpack resolve.extensions = [".css"] and use import './table' instead of './table.css' in js

Abierto
#295 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
2k
Forks
159
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Course
![image](https://user-images.githubusercontent.com/12373328/102491577-5f74af80-40ab-11eb-9d41-519c80ea6bf5.png)

// webpack.config.js

```
resolve: {
extensions: ['*', '.js', '.json', '.jsx', '.tsx', '.ts', '.css', '*.css', '.scss'],
},
```
// RuntimeStyleResolution.js
```
/**
* @file Demonstrates runtime "styleName" resolution.
* @see https://github.com/gajus/babel-plugin-react-css-modules#runtime-stylename-resolution
*/

import React from 'react';
import './table';

export default () => {
return



0.5 ? ' yellow' : '')}>A2

0.5 ? ' yellow' : '')}>B2

0.5 ? ' yellow' : '')}>C2


;
};

```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Read the webpack.config.js resolve.extensions example and the import in RuntimeStyleResolution.js. Check whether importing ./table without an extension works with the shown configuration and how that interacts with the plugin's CSS module resolution. Done means a reproducible answer or a narrowly scoped change request.

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

Evaluación

Stack tecnológico
javascript, react, webpack
Área
frontend, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.