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

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

オープン
#295 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
2k
フォーク
159
PR マージ指標
30日以内にマージされた PR はありません

説明

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


;
};

```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react, webpack
領域
frontend, tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。