gajus / gajus/babel-plugin-react-css-modules
sass @import directives is ignored
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 159
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi again.
We widely using '@import' directive in our project and it seems to be not supported for now in babel-plugin-react-css-modules. I also dig sources and found nothing in postcss pipeline that could process it.
**Would do you like to integrate postcss plugin for @import handling?**
A likely candidate is postcss-import plugin. It has one problem: it is asynchronous. So it break your flow, because of `lazyResult.root` usage. It is only works with syncronous plugins (I also unearth that this is not recommended approach: http://api.postcss.org/LazyResult.html#root).
Sync mode will not be implemented according to postcss/postcss-import#180 and postcss/postcss-import#293 but there is two workarounds:
1. Use postcss-import 7.x.x which is syncronous. I try and it works fine for a quick look.
2. Take a look at https://github.com/css-modules/postcss-icss-import which is reffered in postcss/postcss-import#293. But as author said it is in beta now and not yet working.
What do you think about?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
PostCSSパイプラインとlazyResult.rootの使用箇所から始め、次にissueで言及されているpostcss-importとpostcss-icss-importのオプションを確認します。同期処理と非同期処理の制約を比較し、文書化されている回避策を検討します。完了条件は、プラグインの既存のフローを壊さずにSass @importディレクティブが処理されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, sass
- 領域
- frontend, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100