gajus / gajus/babel-plugin-react-css-modules
Can I use webpack resolve.extensions = [".css"] and use import './table' instead of './table.css' in js
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2k
- Forks
- 159
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
};
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react, webpack
- Bereich
- frontend, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100