gajus / gajus/babel-plugin-react-css-modules
Can I use webpack resolve.extensions = [".css"] and use import './table' instead of './table.css' in js
- Langage dominant
- JavaScript
- Étoiles
- 2k
- Forks
- 159
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Course

// 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
};
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, react, webpack
- Domaine
- frontend, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100