gajus / gajus/babel-plugin-react-css-modules
Make babel-plugin-react-css-modules work with commonjs require
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 159
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello,
when requiring scss files using `require()` syntax I get `Cannot use styleName attribute without importing at least one stylesheet.`. However if I switch to using import it works (minus an eslint parsing error).
I'm trying to introduce css-modules into an old code base. I have the es6 babel preset running (that's why imports work), but code is linted without modules support and I would love to keep it that way for the time being. Is there anyway to make this plugin work with require?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、SCSS ファイルを require したときに報告された失敗を再現し、プラグインで動作している ES6 の import パスと比較します。CommonJS require のサポートが “Cannot use styleName attribute” エラーなしで動作し、既存の import 動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100