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

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

Open
#295 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

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


;
};

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.